protected function getCollection(Select $sql, $cid)
    {
        $this->triggerBeforeSelect(
            $sql,
            $this->getRepository()->getEntityDescriptor()
        );
        $data = $this->adapter->query($sql, $sql->getParameters());
        $collection = $this->repository->getEntityMapper()
            ->createFrom($data);
        $this->triggerAfterSelect(
            $data,
            $collection
        );
        $this->registerEventsTo($collection, $cid);
        $this->getCollectionsMap()->set($cid, $collection);
        $this->updateIdentityMap($collection);
        
        return $collection;
    }
protected function getCollection(Select $sql, $cid)
    {
        $this->triggerBeforeSelect(
            $sql,
            $this->getRepository()->getEntityDescriptor()
        );
        $data = $this->adapter->query($sql, $sql->getParameters());
        $collection = $this->repository->getEntityMapper()
            ->createFrom($data);
        $this->triggerAfterSelect(
            $data,
            $collection
        );
        $this->registerEventsTo($collection, $cid);
        $this->getCollectionsMap()->set($cid, $collection);
        $this->updateIdentityMap($collection);
        
        return $collection;
    }
protected function getCollection ( Select $ sql , $ cid ) { $ this -> triggerBeforeSelect ( $ sql , $ this -> getRepository ( ) -> getEntityDescriptor ( ) ) ; $ data = $ this -> adapter -> query ( $ sql , $ sql -> getParameters ( ) ) ; $ collection = $ this -> repository -> getEntityMapper ( ) -> createFrom ( $ data ) ; $ this -> triggerAfterSelect ( $ data , $ collection ) ; $ this -> registerEventsTo ( $ collection , $ cid ) ; $ this -> getCollectionsMap ( ) -> set ( $ cid , $ collection ) ; $ this -> updateIdentityMap ( $ collection ) ; return $ collection ; }
Executes the provided query

@param Select $sql
@param string $cid

@return EntityCollectionInterface
Executes the provided query