PHP Class Devise\Pages\Collections\CollectionFields
myCollection->field1->someProperty
myCollection->field2->someProperty
We hydrate all the fields on construction of this
object. If a field is not found on this collection
fields object then a generic FieldValue(}) is returned
so that we don't run into NullPointerExceptions
Datei anzeigen
Open project: devisephp/cms
Public Methods
Method |
Description |
|
__construct ( array $fields ) |
Create a new collection fields object
from an array of fields |
|
__get ( string $name ) : FieldValue |
This magic method is used whenever we
attempt to access a field key that doesn't
exist on this CollectionFields container
so that we don't return null (in case that
we are chaining things) |
|
Protected Methods
Method |
Description |
|
hydrate ( Field $fields ) : void |
Loop over the array of fields and
assign each field's key as the key
that we will use to access that field's
values on this collection fields object. |
|
Method Details
__construct()
public method
Create a new collection fields object
from an array of fields
This magic method is used whenever we
attempt to access a field key that doesn't
exist on this CollectionFields container
so that we don't return null (in case that
we are chaining things)
public __get ( string $name ) : FieldValue |
$name |
string |
|
return |
Devise\Pages\Fields\FieldValue |
|
hydrate()
protected method
Loop over the array of fields and
assign each field's key as the key
that we will use to access that field's
values on this collection fields object.