Model
class Model implements ArrayAccess (View source)
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 | ||
protected | $modelData | ||
protected | $processed |
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.
Initialize this object's properties from an array.
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.
Returns true only if the array is associative.
Verify if $obj is an array.
No description
No description
No description
No description
No description
No description
No description
No description
Details
at line 47
final
__construct()
Polymorphic - accepts a variable number of arguments dependent on the type of the model subclass.
at line 62
mixed
__get(string $key)
Getter that handles passthrough access to the data array, and lazy object creation.
at line 103
protected void
mapTypes(array $array)
Initialize this object's properties from an array.
at line 141
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.
at line 152
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.
at line 228
protected bool
isAssociativeArray(array $array)
Returns true only if the array is associative.
at line 248
assertIsArray(array $obj, string $method)
Verify if $obj is an array.