1 | <?php |
||
12 | class Field_Collection extends Collection { |
||
13 | |||
14 | /** |
||
15 | * Returns all the objects in this collection as an an array. Here for docBlock purposes only. |
||
16 | * |
||
17 | * @since 2.0.13.1 |
||
18 | * |
||
19 | * @return \GV\Field[] |
||
20 | */ |
||
21 | 111 | public function all() { |
|
24 | |||
25 | /** |
||
26 | * Add a \GV\Field to this collection. |
||
27 | * |
||
28 | * @param \GV\Field $field The field to add to the internal array. |
||
29 | * |
||
30 | * @api |
||
31 | * @since 2.0 |
||
32 | * @return void |
||
33 | */ |
||
34 | 183 | public function add( $field ) { |
|
41 | |||
42 | /** |
||
43 | * Get a \GV\Field from this list by UID. |
||
44 | * |
||
45 | * @param int $field_uid The UID of the field in the field to get. |
||
46 | * |
||
47 | * @api |
||
48 | * @since 2.0 |
||
49 | * |
||
50 | * @return \GV\Field|null The \GV\Field with the $field_uid as the UID, or null if not found. |
||
51 | */ |
||
52 | 2 | public function get( $field_uid ) { |
|
60 | |||
61 | /** |
||
62 | * Get a copy of this \GV\Field_Collection filtered by type. |
||
63 | * |
||
64 | * @param string $type The type of the field to get. |
||
65 | * Can be a wildcard * |
||
66 | * |
||
67 | * @api |
||
68 | * @since develop |
||
69 | * |
||
70 | * @return \GV\Field_Collection A filtered collection of \GV\Fields, filtered by type. |
||
71 | */ |
||
72 | 75 | public function by_type( $type ) { |
|
86 | |||
87 | /** |
||
88 | * Get a copy of this \GV\Field_Collection filtered by position. |
||
89 | * |
||
90 | * @param string $position The position to get the fields for. |
||
91 | * Can be a wildcard * |
||
92 | * |
||
93 | * @api |
||
94 | * @since |
||
95 | * |
||
96 | * @return \GV\Field_Collection A filtered collection of \GV\Fields, filtered by position. |
||
97 | */ |
||
98 | 49 | public function by_position( $position ) { |
|
112 | |||
113 | /** |
||
114 | * Get a copy of this \GV\Field_Collection filtered by visibility to current user context. |
||
115 | * |
||
116 | * @api |
||
117 | * @since |
||
118 | * |
||
119 | * @param $view \GV\View The view! |
||
120 | * |
||
121 | * @return \GV\Field_Collection A filtered collection of \GV\Fields, filtered by visibility. |
||
122 | */ |
||
123 | 75 | public function by_visible( $view = null ) { |
|
134 | |||
135 | /** |
||
136 | * Parse a configuration array into a Field_Collection. |
||
137 | * |
||
138 | * @param array $configuration The configuration, structured like so: |
||
139 | * |
||
140 | * array( |
||
141 | * |
||
142 | * [other zones] |
||
143 | * |
||
144 | * 'directory_list-title' => array( |
||
145 | * |
||
146 | * [other fields] |
||
147 | * |
||
148 | * '5372653f25d44' => array( |
||
149 | * @see \GV\Field::as_configuration() for structure |
||
150 | * ) |
||
151 | * |
||
152 | * [other fields] |
||
153 | * ) |
||
154 | * |
||
155 | * [other zones] |
||
156 | * ) |
||
157 | * |
||
158 | * @return \GV\Field_Collection A collection of fields. |
||
159 | */ |
||
160 | 184 | public static function from_configuration( $configuration ) { |
|
178 | |||
179 | /** |
||
180 | * Return a configuration array for this field collection. |
||
181 | * |
||
182 | * @return array See \GV\Field_Collection::from_configuration() for structure. |
||
183 | */ |
||
184 | 55 | public function as_configuration() { |
|
199 | } |
||
200 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.