Collection
class Collection extends Model implements Iterator, Countable (View source)
Extension to the regular Google\Model that automatically exposes the items array for iteration, so you can just iterate over the object rather than a reference inside.
Constants
NULL_VALUE |
If you need to specify a NULL JSON value, use Google\Model::NULL_VALUE
instead - it will be replaced when converting to JSON with a real null. |
Properties
protected | $internal_gapi_mappings | from Model | |
protected | $modelData | from Model | |
protected | $processed | from Model | |
protected | $collection_key |
Methods
Polymorphic - accepts a variable number of arguments dependent on the type of the model subclass.
Getter that handles passthrough access to the data array, and lazy object creation.
Blank initialiser to be used in subclasses to do post-construction initialisation - this avoids the need for subclasses to have to implement the variadics handling in their constructors.
Create a simplified object suitable for straightforward conversion to JSON. This is relatively expensive due to the usage of reflection, but shouldn't be called a whole lot, and is the most straightforward way to filter.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
in
Model at line 46
final
__construct()
Polymorphic - accepts a variable number of arguments dependent on the type of the model subclass.
in
Model at line 61
mixed
__get(string $key)
Getter that handles passthrough access to the data array, and lazy object creation.
in
Model at line 102
protected void
mapTypes(array $array)
Initialize this object's properties from an array.
in
Model at line 140
protected
gapiInit()
Blank initialiser to be used in subclasses to do post-construction initialisation - this avoids the need for subclasses to have to implement the variadics handling in their constructors.
in
Model at line 151
toSimpleObject()
Create a simplified object suitable for straightforward conversion to JSON. This is relatively expensive due to the usage of reflection, but shouldn't be called a whole lot, and is the most straightforward way to filter.
in
Model at line 227
protected bool
isAssociativeArray(array $array)
Returns true only if the array is associative.
in
Model at line 247
assertIsArray(array $obj, string $method)
Verify if $obj is an array.
bool
offsetExists($offset)
No description
mixed
offsetGet($offset)
No description
void
offsetSet($offset, $value)
No description
void
offsetUnset($offset)
No description
in
Model at line 291
protected
keyType($key)
No description
in
Model at line 301
protected
dataType($key)
No description
in
Model at line 310
__isset($key)
No description
in
Model at line 315
__unset($key)
No description
void
rewind()
No description
mixed
current()
No description
mixed
key()
No description
mixed
next()
No description
bool
valid()
No description
int
count()
No description