PHP Class GDS\Mapper

Author: Tom Walder ([email protected])
Exibir arquivo Open project: tomwalder/php-gds

Protected Properties

Property Type Description
$obj_schema Schema Current Schema

Public Methods

Method Description
mapFromResults ( array $arr_results ) : Entity[] | null Map 1-many results out of the Raw response data array
mapOneFromResult ( object $obj_result ) : Entity Map a single result out of the Raw response data array FROM Google TO a GDS Entity
setSchema ( Schema $obj_schema ) Set the schema

Protected Methods

Method Description
determineDynamicType ( $mix_value ) : array Dynamically determine type for a value
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 ) : mixed Extract a String List value

Method Details

determineDynamicType() protected method

Dynamically determine type for a value
protected determineDynamicType ( $mix_value ) : array
$mix_value
return array

extractAutoDetectValue() abstract protected method

Auto detect & extract a value
abstract protected extractAutoDetectValue ( object $obj_property ) : mixed
$obj_property object
return mixed

extractDatetimeValue() abstract protected method

Extract a datetime value
abstract protected extractDatetimeValue ( $obj_property ) : mixed
$obj_property
return mixed

extractGeopointValue() abstract protected method

Extract a Geopoint value
abstract protected extractGeopointValue ( $obj_property ) : Geopoint
$obj_property
return GDS\Property\Geopoint

extractPropertyValue() abstract protected method

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

extractStringListValue() abstract protected method

Extract a String List value
abstract protected extractStringListValue ( $obj_property ) : mixed
$obj_property
return mixed

mapFromResults() public method

Map 1-many results out of the Raw response data array
public mapFromResults ( array $arr_results ) : Entity[] | null
$arr_results array
return Entity[] | null

mapOneFromResult() abstract public method

Map a single result out of the Raw response data array FROM Google TO a GDS Entity
abstract public mapOneFromResult ( object $obj_result ) : Entity
$obj_result object
return Entity

setSchema() public method

Set the schema
public setSchema ( Schema $obj_schema )
$obj_schema Schema

Property Details

$obj_schema protected_oe property

Current Schema
protected Schema,gds $obj_schema
return Schema