1 | <?php |
||
3 | class Ajde_Crud_Options extends Ajde_Object_Standard |
||
4 | { |
||
5 | protected $_key; |
||
6 | |||
7 | /** |
||
8 | * @var Ajde_Crud_Options |
||
9 | */ |
||
10 | protected $_parent = null; |
||
11 | |||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | public $_stack = []; |
||
16 | |||
17 | public function __construct() |
||
21 | |||
22 | // Protected functions |
||
23 | |||
24 | protected function _select($name, $key = null) |
||
39 | |||
40 | protected function _set($key, $value) |
||
46 | |||
47 | // Public functions |
||
48 | |||
49 | /** |
||
50 | * @return Ajde_Crud_Options |
||
51 | */ |
||
52 | public function up($obj = false) |
||
64 | |||
65 | /** |
||
66 | * @return Ajde_Crud_Options |
||
67 | */ |
||
68 | public function finished() |
||
77 | |||
78 | /** |
||
79 | * @return Ajde_Crud_Options |
||
80 | */ |
||
81 | public function display() |
||
87 | |||
88 | /** |
||
89 | * @return array |
||
90 | */ |
||
91 | public function getArray() |
||
95 | |||
96 | // ========================================================================= |
||
97 | // Select functions |
||
98 | // ========================================================================= |
||
99 | |||
100 | /** |
||
101 | * @return Ajde_Crud_Options_Fields |
||
102 | */ |
||
103 | public function selectFields() |
||
107 | |||
108 | /** |
||
109 | * @return Ajde_Crud_Options_List |
||
110 | */ |
||
111 | public function selectList() |
||
115 | |||
116 | /** |
||
117 | * @return Ajde_Crud_Options_Edit |
||
118 | */ |
||
119 | public function selectEdit() |
||
123 | |||
124 | // ========================================================================= |
||
125 | // Set functions |
||
126 | // ========================================================================= |
||
127 | } |
||
128 |
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: