Remove useless dependency
This commit is contained in:
parent
f1a793f2ee
commit
b556bcb16c
@ -301,6 +301,6 @@ class EntityRepository implements ObjectRepository, Selectable
|
||||
{
|
||||
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
|
||||
|
||||
return new LazyCriteriaCollection($this->_em, $persister, $criteria);
|
||||
return new LazyCriteriaCollection($persister, $criteria);
|
||||
}
|
||||
}
|
||||
|
@ -33,11 +33,6 @@ use Doctrine\ORM\Persisters\BasicEntityPersister;
|
||||
*/
|
||||
class LazyCriteriaCollection implements Collection
|
||||
{
|
||||
/**
|
||||
* @var EntityManager
|
||||
*/
|
||||
protected $entityManager;
|
||||
|
||||
/**
|
||||
* @var BasicEntityPersister
|
||||
*/
|
||||
@ -66,13 +61,11 @@ class LazyCriteriaCollection implements Collection
|
||||
protected $count;
|
||||
|
||||
/**
|
||||
* @param EntityManager $entityManager
|
||||
* @param BasicEntityPersister $entityPersister
|
||||
* @param Criteria $criteria
|
||||
*/
|
||||
public function __construct(EntityManager $entityManager, BasicEntityPersister $entityPersister, Criteria $criteria)
|
||||
public function __construct(BasicEntityPersister $entityPersister, Criteria $criteria)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
$this->entityPersister = $entityPersister;
|
||||
$this->criteria = $criteria;
|
||||
}
|
||||
@ -88,9 +81,6 @@ class LazyCriteriaCollection implements Collection
|
||||
return $this->count;
|
||||
}
|
||||
|
||||
//$exp = $this->criteria->expr()->eq('username', 'bar');
|
||||
//$this->criteria = new Criteria($exp);
|
||||
|
||||
$this->count = $this->entityPersister->count($this->criteria);
|
||||
|
||||
return $this->count;
|
||||
|
Loading…
Reference in New Issue
Block a user