PHP Class GDS\Mapper\RESTv1

Inheritance: extends GDS\Mapper
Afficher le fichier Open project: tomwalder/php-gds

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

buildKeyPath() public méthode

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
Résultat array

createKeyPathElement() protected méthode

Create a Key Path Element from array
protected createKeyPathElement ( array $arr_kpe ) : stdClass
$arr_kpe array
Résultat stdClass

createPropertyValue() protected méthode

Create a property object
protected createPropertyValue ( array $arr_field_def, $mix_value ) : mixed
$arr_field_def array
$mix_value
Résultat mixed

extractAutoDetectValue() protected méthode

Auto detect & extract a value
protected extractAutoDetectValue ( object $obj_property ) : mixed
$obj_property object
Résultat mixed

extractDatetimeValue() protected méthode

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
Résultat mixed

extractGeopointValue() protected méthode

Extract a Geopoint value
protected extractGeopointValue ( $obj_property ) : Geopoint
$obj_property
Résultat GDS\Property\Geopoint

extractPropertyValue() protected méthode

Defer any varying data type extractions to child classes
protected extractPropertyValue ( $int_type, object $obj_property ) : mixed
$int_type
$obj_property object
Résultat mixed

extractStringListValue() protected méthode

Extract a String List value
protected extractStringListValue ( $obj_property ) : array
$obj_property
Résultat array

mapOneFromResult() public méthode

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
Résultat GDS\Entity

mapToGoogle() public méthode

https://cloud.google.com/datastore/reference/rest/v1/Entity
public mapToGoogle ( Entity $obj_gds_entity ) : stdClass
$obj_gds_entity GDS\Entity
Résultat stdClass