1 | <?php |
||
14 | class Group extends BaseGroup |
||
15 | { |
||
16 | /** |
||
17 | * @var integer |
||
18 | * |
||
19 | * @ORM\Column(name="id", type="integer", nullable=false) |
||
20 | * @ORM\Id |
||
21 | * @ORM\GeneratedValue(strategy="AUTO") |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * @var boolean |
||
27 | * |
||
28 | * @ORM\Column(name="display", type="boolean", nullable=false) |
||
29 | */ |
||
30 | protected $display; |
||
31 | |||
32 | /** |
||
33 | * Constructor. |
||
34 | */ |
||
35 | public function __construct() |
||
39 | |||
40 | public function __toString() |
||
44 | |||
45 | /** |
||
46 | * Get id. |
||
47 | * |
||
48 | * @return integer |
||
49 | */ |
||
50 | public function getId() |
||
54 | |||
55 | /** |
||
56 | * Gets the value of display. |
||
57 | * |
||
58 | * @return boolean |
||
59 | */ |
||
60 | public function getDisplay() |
||
64 | |||
65 | /** |
||
66 | * Sets the value of display. |
||
67 | * |
||
68 | * @param boolean $display the display |
||
69 | * |
||
70 | * @return self |
||
71 | */ |
||
72 | public function setDisplay($display) |
||
78 | } |
||
79 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: