Method | Description | |
---|---|---|
__construct ( string $projectId, boolean $encode, boolean $returnInt64AsObject ) | Create an Entity Mapper | |
convertValue ( string $type, mixed $value ) : mixed | Convert a Datastore value object to a simple value | |
objectProperty ( mixed $value ) : array | Convert different object types to API values | |
objectToRequest ( |
Translate an Entity to a datastore representation. | |
responseToEntityProperties ( array $entityData ) : array | Convert an entity response to properties, excludes and meanings. | |
valueObject ( mixed $value, boolean $exclude = false, integer $meaning = null ) : array | Format values for the API |
Method | Description | |
---|---|---|
convertArrayToArrayValue ( array $value ) : array | Convert a non-associative array to a datastore arrayValue type | |
convertArrayToEntityValue ( array $value ) : array | Convert an associative array to a datastore entityValue type | |
getPropertyValue ( array $property ) : mixed | Determine the property type and return a converted value | |
getValueType ( array $value ) : string | Get the value type from a value object. | |
isEncoded ( $value ) |
public __construct ( string $projectId, boolean $encode, boolean $returnInt64AsObject ) | ||
$projectId | string | The datastore project ID |
$encode | boolean | Whether to encode blobs as base64. |
$returnInt64AsObject | boolean | If true, 64 bit integers will be returned as a {@see \Google\Cloud\Int64} object for 32 bit platform compatibility. |
public objectProperty ( mixed $value ) : array | ||
$value | mixed | The value object |
return | array |
public objectToRequest ( |
||
$entity | The input entity. | |
return | array | A Datastore [Entity](https://cloud.google.com/datastore/reference/rest/v1/Entity) |
public responseToEntityProperties ( array $entityData ) : array | ||
$entityData | array | The incoming entity |
return | array |