protected function createEntity(DibiRow $dibiRow, $entityClass = null, $table = null)
    {
        if ($table === null) {
            $table = $this->getTable();
        }
        $result = Result::createInstance($dibiRow, $table, $this->connection, $this->mapper);
        $primaryKey = $this->mapper->getPrimaryKey($table);

        $row = $result->getRow($dibiRow->$primaryKey);
        if ($entityClass === null) {
            $entityClass = $this->mapper->getEntityClass($table, $row);
        }
        $entity = $this->entityFactory->createEntity($entityClass, $row);
        $entity->makeAlive($this->entityFactory);
        return $entity;
    }
protected function createEntity(DibiRow $dibiRow, $entityClass = null, $table = null)
    {
        if ($table === null) {
            $table = $this->getTable();
        }
        $result = Result::createInstance($dibiRow, $table, $this->connection, $this->mapper);
        $primaryKey = $this->mapper->getPrimaryKey($table);

        $row = $result->getRow($dibiRow->$primaryKey);
        if ($entityClass === null) {
            $entityClass = $this->mapper->getEntityClass($table, $row);
        }
        $entity = $this->entityFactory->createEntity($entityClass, $row);
        $entity->makeAlive($this->entityFactory);
        return $entity;
    }
protected function createEntity ( DibiRow $ dibiRow , $ entityClass = null , $ table = null ) { if ( $ table === null ) { $ table = $ this -> getTable ( ) ; } $ result = Result :: createInstance ( $ dibiRow , $ table , $ this -> connection , $ this -> mapper ) ; $ primaryKey = $ this -> mapper -> getPrimaryKey ( $ table ) ; $ row = $ result -> getRow ( $ dibiRow -> $ primaryKey ) ; if ( $ entityClass === null ) { $ entityClass = $ this -> mapper -> getEntityClass ( $ table , $ row ) ; } $ entity = $ this -> entityFactory -> createEntity ( $ entityClass , $ row ) ; $ entity -> makeAlive ( $ this -> entityFactory ) ; return $ entity ; }
Creates new Entity instance from given \Dibi\Row instance

@param \Dibi\Row $dibiRow
@param string|null $entityClass
@param string|null $table
@return mixed
Creates new Entity instance from given \ Dibi \ Row instance