public function from(IObjectMapper $mapper)
    {
        $this->mapper     = $mapper;
        $this->definition = $mapper->getDefinition();
        $this->relations  = $this->definition->getPropertyRelationMap();

        if ($mapper instanceof IEntityMapper) {
            foreach ($mapper->getPrimaryTable()->getColumns() as $column) {
                $this->readDefinition->addColumn($column);
            }
        }

        $this->validProperties = $this->definition->getPropertyColumnMap() + $this->relations;
    }
public function from(IObjectMapper $mapper)
    {
        $this->mapper     = $mapper;
        $this->definition = $mapper->getDefinition();
        $this->relations  = $this->definition->getPropertyRelationMap();

        if ($mapper instanceof IEntityMapper) {
            foreach ($mapper->getPrimaryTable()->getColumns() as $column) {
                $this->readDefinition->addColumn($column);
            }
        }

        $this->validProperties = $this->definition->getPropertyColumnMap() + $this->relations;
    }
public function from ( IObjectMapper $ mapper ) { $ this -> mapper = $ mapper ; $ this -> definition = $ mapper -> getDefinition ( ) ; $ this -> relations = $ this -> definition -> getPropertyRelationMap ( ) ; if ( $ mapper instanceof IEntityMapper ) { foreach ( $ mapper -> getPrimaryTable ( ) -> getColumns ( ) as $ column ) { $ this -> readDefinition -> addColumn ( $ column ) ; } } $ this -> validProperties = $ this -> definition -> getPropertyColumnMap ( ) + $ this -> relations ; }
Defines the root entity mapper

@param IObjectMapper $mapper

@return void
Defines the root entity mapper