コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function rewind()
 {
     if (!$this->iterableResult) {
         $query = $this->objectManager->createQuery(sprintf('SELECT o FROM %s o', $this->objectName));
         $this->iterableResult = $query->iterate([], Query::HYDRATE_ARRAY);
     }
     $this->iterableResult->rewind();
 }
コード例 #2
0
ファイル: DoctrineReader.php プロジェクト: lmkhang/mcntw
 /**
  * {@inheritdoc}
  */
 public function rewind()
 {
     if (!$this->iterableResult) {
         $query = $this->objectManager->createQuery(sprintf('select o from %s o', $this->objectName));
         $this->iterableResult = $query->iterate(array(), Query::HYDRATE_ARRAY);
     }
     $this->iterableResult->rewind();
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function read()
 {
     if (!$this->cursor) {
         $this->cursor = $this->getQuery()->iterate();
     }
     if ($data = $this->cursor->next()) {
         $this->stepExecution->incrementSummaryInfo('read');
         return $data;
     }
 }
コード例 #4
0
ファイル: AStep.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Get items iterator
  *
  * @param boolean $reset Reset iterator OPTIONAL
  *
  * @return \Doctrine\ORM\Internal\Hydration\IterableResult
  */
 protected function getItems($reset = false)
 {
     if (!isset($this->items) || $reset) {
         $this->items = $this->getRepository()->getExportIterator($this->position);
         $this->items->rewind();
     }
     return $this->items;
 }
コード例 #5
-1
 /**
  * {@inheritdoc}
  */
 public function rewind()
 {
     if ($this->iterator) {
         throw new InvalidMethodCallException('Cannot rewind a Doctrine\\ORM\\Query');
     }
     $this->iterator = $this->query->iterate();
     $this->iterator->rewind();
 }