Add __toString magic method
*/
protected $id;
- /**
- * @var string
- */
- protected $short;
-
/**
* @var string
*/
return $this->id;
}
- /**
- * Set short
- *
- * @param string $short
- *
- * @return Title
- */
- public function setShort($short) {
- $this->short = $short;
-
- return $this;
- }
-
- /**
- * Get short
- *
- * @return string
- */
- public function getShort() {
- return $this->short;
- }
-
/**
* Set title
*
public function getUsers() {
return $this->users;
}
+
+ /**
+ * Returns a string representation of the title
+ *
+ * @return string
+ */
+ public function __toString(): string {
+ return $this->title;
+ }
}
options:
unsigned: true
fields:
- short:
- type: string
- length: 4
title:
type: string
length: 16