public function mapOneFromResult($obj_result)
    {
        // Key & Ancestry
        list($obj_gds_entity, $bol_schema_match) = $this->createEntityWithKey($obj_result);
        /** @var Entity $obj_gds_entity */

        // Properties
        if(isset($obj_result->entity->properties)) {
            $arr_property_definitions = $this->obj_schema->getProperties();
            foreach ($obj_result->entity->properties as $str_field => $obj_property) {
                if ($bol_schema_match && isset($arr_property_definitions[$str_field])) {
                    $obj_gds_entity->__set($str_field, $this->extractPropertyValue($arr_property_definitions[$str_field]['type'], $obj_property));
                } else {
                    $obj_gds_entity->__set($str_field, $this->extractPropertyValue(Schema::PROPERTY_DETECT, $obj_property));
                }
            }
        }

        // Done
        return $obj_gds_entity;
    }
public function mapOneFromResult($obj_result)
    {
        // Key & Ancestry
        list($obj_gds_entity, $bol_schema_match) = $this->createEntityWithKey($obj_result);
        /** @var Entity $obj_gds_entity */

        // Properties
        if(isset($obj_result->entity->properties)) {
            $arr_property_definitions = $this->obj_schema->getProperties();
            foreach ($obj_result->entity->properties as $str_field => $obj_property) {
                if ($bol_schema_match && isset($arr_property_definitions[$str_field])) {
                    $obj_gds_entity->__set($str_field, $this->extractPropertyValue($arr_property_definitions[$str_field]['type'], $obj_property));
                } else {
                    $obj_gds_entity->__set($str_field, $this->extractPropertyValue(Schema::PROPERTY_DETECT, $obj_property));
                }
            }
        }

        // Done
        return $obj_gds_entity;
    }
public function mapOneFromResult ( $ obj_result ) { // Key & Ancestry list ( $ obj_gds_entity , $ bol_schema_match ) = $ this -> createEntityWithKey ( $ obj_result ) ; /** @var Entity $obj_gds_entity */ // Properties if ( isset ( $ obj_result -> entity -> properties ) ) { $ arr_property_definitions = $ this -> obj_schema -> getProperties ( ) ; foreach ( $ obj_result -> entity -> properties as $ str_field => $ obj_property ) { if ( $ bol_schema_match && isset ( $ arr_property_definitions [ $ str_field ] ) ) { $ obj_gds_entity -> __set ( $ str_field , $ this -> extractPropertyValue ( $ arr_property_definitions [ $ str_field ] [ 'type' ] , $ obj_property ) ) ; } else { $ obj_gds_entity -> __set ( $ str_field , $ this -> extractPropertyValue ( Schema :: PROPERTY_DETECT , $ obj_property ) ) ; } } } // Done return $ obj_gds_entity ; }
Map a single result out of the Raw response data array FROM Google TO a GDS Entity

@param object $obj_result
@return Entity
@throws \Exception
Map a single result out of the Raw response data array FROM Google TO a GDS Entity