PHP Класс GDS\Mapper\RESTv1

Наследование: extends GDS\Mapper
Показать файл Открыть проект

Открытые методы

Метод Описание
buildKeyPath ( Entity $obj_gds_entity, boolean $bol_first_node = true ) : array Create a fully qualified Key path
mapOneFromResult ( object $obj_result ) : Entity Map a single result out of the Raw response data array FROM Google TO a GDS Entity
mapToGoogle ( Entity $obj_gds_entity ) : stdClass Create a REST representation of a GDS entity

Защищенные методы

Метод Описание
createKeyPathElement ( array $arr_kpe ) : stdClass Create a Key Path Element from array
createPropertyValue ( array $arr_field_def, $mix_value ) : mixed Create a property object
extractAutoDetectValue ( object $obj_property ) : mixed Auto detect & extract a value
extractDatetimeValue ( $obj_property ) : mixed Extract a datetime value
extractGeopointValue ( $obj_property ) : Geopoint Extract a Geopoint value
extractPropertyValue ( $int_type, object $obj_property ) : mixed Extract a single property value from a Property object
extractStringListValue ( $obj_property ) : array Extract a String List value

Приватные методы

Метод Описание
bestEffortFieldDefs ( Entity $obj_gds_entity ) : array Find and return the field definitions (if any) for the Entity
createEntityWithKey ( stdClass $obj_result ) : array Create & populate a GDS\Entity with key data

Описание методов

buildKeyPath() публичный Метод

Create a fully qualified Key path
public buildKeyPath ( Entity $obj_gds_entity, boolean $bol_first_node = true ) : array
$obj_gds_entity GDS\Entity
$bol_first_node boolean
Результат array

createKeyPathElement() защищенный Метод

Create a Key Path Element from array
protected createKeyPathElement ( array $arr_kpe ) : stdClass
$arr_kpe array
Результат stdClass

createPropertyValue() защищенный Метод

Create a property object
protected createPropertyValue ( array $arr_field_def, $mix_value ) : mixed
$arr_field_def array
$mix_value
Результат mixed

extractAutoDetectValue() защищенный Метод

Auto detect & extract a value
protected extractAutoDetectValue ( object $obj_property ) : mixed
$obj_property object
Результат mixed

extractDatetimeValue() защищенный Метод

We will lose accuracy - past seconds in version 3.0 - past microseconds (down from nanoseconds) in version 4.0
protected extractDatetimeValue ( $obj_property ) : mixed
$obj_property
Результат mixed

extractGeopointValue() защищенный Метод

Extract a Geopoint value
protected extractGeopointValue ( $obj_property ) : Geopoint
$obj_property
Результат GDS\Property\Geopoint

extractPropertyValue() защищенный Метод

Defer any varying data type extractions to child classes
protected extractPropertyValue ( $int_type, object $obj_property ) : mixed
$int_type
$obj_property object
Результат mixed

extractStringListValue() защищенный Метод

Extract a String List value
protected extractStringListValue ( $obj_property ) : array
$obj_property
Результат array

mapOneFromResult() публичный Метод

Map a single result out of the Raw response data array FROM Google TO a GDS Entity
public mapOneFromResult ( object $obj_result ) : Entity
$obj_result object
Результат GDS\Entity

mapToGoogle() публичный Метод

https://cloud.google.com/datastore/reference/rest/v1/Entity
public mapToGoogle ( Entity $obj_gds_entity ) : stdClass
$obj_gds_entity GDS\Entity
Результат stdClass