コード例 #1
0
 /**
  * Constructor.
  *
  * @param Repository $repository
  */
 public function __construct(Repository $repository)
 {
     $this->repository = $repository;
     $this->manager = $repository->getManager();
     $this->metadata = $repository->getMetadata();
     $this->query = $this->manager->getConnection()->createQueryBuilder()->from($this->metadata->getTable());
 }
コード例 #2
0
 /**
  * Constructor.
  *
  * @param EntityManager $manager
  * @param Metadata      $metadata
  */
 public function __construct(EntityManager $manager, Metadata $metadata)
 {
     $this->manager = $manager;
     $this->metadata = $metadata;
     $this->query = $manager->getConnection()->createQueryBuilder()->from($metadata->getTable());
 }