PHP Class GDS\Mapper\ProtoBuf

Author: Tom Walder ([email protected])
Inheritance: extends GDS\Mapper
Afficher le fichier Open project: tomwalder/php-gds

Méthodes publiques

Méthode Description
configureGoogleKey ( google\appengine\datastore\v4\Key $obj_key, Entity $obj_gds_entity ) : google\appengine\datastore\v4\Key Populate a ProtoBuf Key from a GDS Entity
mapOneFromResult ( google\appengine\datastore\v4\EntityResult $obj_result ) : Entity Map a single result out of the Raw response data into a supplied Entity object
mapToGoogle ( Entity $obj_gds_entity, google\appengine\datastore\v4\Entity $obj_entity ) Map from GDS to Google Protocol Buffer

Méthodes protégées

Méthode Description
extractAutoDetectValue ( google\appengine\datastore\v4\Value $obj_property ) : mixed Auto detect & extract a value
extractDatetimeValue ( object $obj_property ) : mixed Extract a datetime value
extractGeopointValue ( google\appengine\datastore\v4\Value $obj_property ) : Geopoint Extract a Geopoint value (lat/lon pair)
extractPropertyValue ( $int_type, object $obj_property ) : array Extract a single property value from a Property object
extractStringListValue ( object $obj_property ) : mixed Extract a String List value

Private Methods

Méthode Description
configureGoogleKeyPathElement ( google\appengine\datastore\v4\Key\PathElement $obj_path_element, array $arr_kpe ) Configure a Google Key Path Element object
configureGooglePropertyValue ( google\appengine\datastore\v4\Value $obj_val, array $arr_field_def, $mix_value ) Populate a ProtoBuf Property Value from a GDS Entity field definition & value
createEntityWithKey ( google\appengine\datastore\v4\EntityResult $obj_result ) : array Create & populate a GDS\Entity with key data

Method Details

configureGoogleKey() public méthode

Populate a ProtoBuf Key from a GDS Entity
public configureGoogleKey ( google\appengine\datastore\v4\Key $obj_key, Entity $obj_gds_entity ) : google\appengine\datastore\v4\Key
$obj_key google\appengine\datastore\v4\Key
$obj_gds_entity GDS\Entity
Résultat google\appengine\datastore\v4\Key

extractAutoDetectValue() protected méthode

Auto detect & extract a value
protected extractAutoDetectValue ( google\appengine\datastore\v4\Value $obj_property ) : mixed
$obj_property google\appengine\datastore\v4\Value
Résultat mixed

extractDatetimeValue() protected méthode

Extract a datetime value
protected extractDatetimeValue ( object $obj_property ) : mixed
$obj_property object
Résultat mixed

extractGeopointValue() protected méthode

Extract a Geopoint value (lat/lon pair)
protected extractGeopointValue ( google\appengine\datastore\v4\Value $obj_property ) : Geopoint
$obj_property google\appengine\datastore\v4\Value
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 ) : array
$int_type
$obj_property object
Résultat array

extractStringListValue() protected méthode

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

mapOneFromResult() public méthode

Map a single result out of the Raw response data into a supplied Entity object
public mapOneFromResult ( google\appengine\datastore\v4\EntityResult $obj_result ) : Entity
$obj_result google\appengine\datastore\v4\EntityResult
Résultat GDS\Entity

mapToGoogle() public méthode

Map from GDS to Google Protocol Buffer
public mapToGoogle ( Entity $obj_gds_entity, google\appengine\datastore\v4\Entity $obj_entity )
$obj_gds_entity GDS\Entity
$obj_entity google\appengine\datastore\v4\Entity