1 | <?php |
||
5 | class Package extends BaseContainer |
||
6 | { |
||
7 | public $id; |
||
8 | public $name; |
||
9 | public $page_image; |
||
10 | public $header; |
||
11 | public $small_logo; |
||
12 | public $apps; |
||
13 | public $page_content; |
||
14 | public $price; |
||
15 | public $platforms; |
||
16 | public $release; |
||
17 | |||
18 | public function __construct($package, $id) |
||
32 | |||
33 | protected function getFakePriceObject() |
||
39 | } |
||
40 |
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: