GDS\Gateway::determineMapper PHP Method

determineMapper() protected method

Determine Mapper (early stage [draft] support for cross-entity upserts)
protected determineMapper ( Entity $obj_gds_entity ) : Mapper
$obj_gds_entity Entity
return Mapper
    protected function determineMapper(Entity $obj_gds_entity)
    {
        $str_this_kind = $obj_gds_entity->getKind();
        if (!isset($this->arr_kind_mappers[$str_this_kind])) {
            $this->arr_kind_mappers[$str_this_kind] = $this->createMapper();
            if ($this->obj_schema->getKind() != $str_this_kind) {
                $this->arr_kind_mappers[$str_this_kind]->setSchema($obj_gds_entity->getSchema());
            }
        }
        return $this->arr_kind_mappers[$str_this_kind];
    }