1 | <?php |
||
24 | class Section implements \ArrayAccess |
||
25 | { |
||
26 | use \PHPDaemon\Traits\ClassWatchdog; |
||
27 | |||
28 | /** @var */ |
||
29 | public $source; |
||
30 | /** @var */ |
||
31 | public $revision; |
||
32 | |||
33 | /** |
||
34 | * Constructor |
||
35 | * @param hash |
||
36 | * @return object |
||
|
|||
37 | */ |
||
38 | public function __construct($arr = []) |
||
50 | |||
51 | /** |
||
52 | * Count elements |
||
53 | * @return integer |
||
54 | */ |
||
55 | public function count() |
||
59 | |||
60 | /** |
||
61 | * toArray handler |
||
62 | * @return hash |
||
63 | */ |
||
64 | public function toArray() |
||
75 | |||
76 | /** |
||
77 | * Checks if property exists |
||
78 | * @param string Property name |
||
79 | * @return boolean Exists? |
||
80 | */ |
||
81 | |||
82 | public function offsetExists($prop) |
||
87 | |||
88 | /** |
||
89 | * Get real property name |
||
90 | * @param string Property name |
||
91 | * @return string Real property name |
||
92 | */ |
||
93 | public function getRealPropertyName($prop) |
||
97 | |||
98 | /** |
||
99 | * Get property by name |
||
100 | * @param string Property name |
||
101 | * @return mixed |
||
102 | */ |
||
103 | public function offsetGet($prop) |
||
108 | |||
109 | /** |
||
110 | * Set property |
||
111 | * @param string Property name |
||
112 | * @param mixed Value |
||
113 | * @return void |
||
114 | */ |
||
115 | public function offsetSet($prop, $value) |
||
120 | |||
121 | /** |
||
122 | * Unset property |
||
123 | * @param string Property name |
||
124 | * @return void |
||
125 | */ |
||
126 | public function offsetUnset($prop) |
||
131 | |||
132 | /** |
||
133 | * Impose default config |
||
134 | * @param array {"setting": "value"} |
||
135 | * @return void |
||
136 | */ |
||
137 | public function imposeDefault($settings = []) |
||
162 | } |
||
163 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.