當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Iterator::rewind方法代碼示例

本文整理匯總了PHP中Iterator::rewind方法的典型用法代碼示例。如果您正苦於以下問題:PHP Iterator::rewind方法的具體用法?PHP Iterator::rewind怎麽用?PHP Iterator::rewind使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Iterator的用法示例。


在下文中一共展示了Iterator::rewind方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: rewind

 /**
  * Rewind the Iterator to the first element.
  *
  * @link  http://php.net/manual/en/iterator.rewind.php
  * @since 5.0.0
  */
 public function rewind()
 {
     if (null === $this->iterator) {
         throw new \LogicException('Missing internal iterator.');
     }
     $this->iterator->rewind();
 }
開發者ID:rayrutjes,項目名稱:php-geteventstore-client,代碼行數:13,代碼來源:InternalIteratorTrait.php

示例2: rewind

 public function rewind()
 {
     $this->projectionNeeded = true;
     unset($this->current);
     unset($this->currentKey);
     $this->innerIterator->rewind();
 }
開發者ID:pombredanne,項目名稱:yasca,代碼行數:7,代碼來源:ProjectionKeyIterator.php

示例3: rewind

 public function rewind()
 {
     $this->it->rewind();
     $this->buffer = array();
     $this->i = 0;
     $this->fetch();
 }
開發者ID:gunjiro,項目名稱:ginq,代碼行數:7,代碼來源:BufferWithPaddingIterator.php

示例4: rewind

 /**
  * {@inheritdoc}
  */
 public final function rewind()
 {
     if (null === $this->iterator) {
         throw new \LogicException('Internal iterator is missing.');
     }
     $this->iterator->rewind();
 }
開發者ID:rayrutjes,項目名稱:ddd-bootstrap,代碼行數:10,代碼來源:InternalIterator.php

示例5: rewind

 /**
  * {@inheritdoc}
  * @see IteratorIterator::rewind()
  */
 public function rewind()
 {
     $this->iterator->rewind();
     if (!$this->accept()) {
         $this->next();
     }
 }
開發者ID:mheydt,項目名稱:scalr,代碼行數:11,代碼來源:RegexpItemIterator.php

示例6: rewind

 /**
  * {@inheritdoc}
  */
 public function rewind()
 {
     if (!$this->iterator) {
         $this->initIterator();
     }
     $this->iterator->rewind();
 }
開發者ID:aculvi,項目名稱:OroCRMMailChimpBundle,代碼行數:10,代碼來源:TemplateIterator.php

示例7: rewind

 /**
  * {@inheritdoc}
  */
 public function rewind()
 {
     if (!$this->iterableResult) {
         $this->iterableResult = new \ArrayIterator($this->getDataFromService());
     }
     $this->iterableResult->rewind();
 }
開發者ID:mathielen,項目名稱:import-engine,代碼行數:10,代碼來源:ServiceReader.php

示例8: rewind

 public function rewind()
 {
     $this->groups = Ginq::from($this->it)->toLookup($this->groupingKeySelector, $this->elementSelector, $this->eqComparer)->getIterator();
     $this->groups->rewind();
     if ($this->valid()) {
         $this->fetch();
     }
 }
開發者ID:gunjiro,項目名稱:ginq,代碼行數:8,代碼來源:GroupByIterator.php

示例9: initialize

 /**
  * @param \Iterator $iterator
  */
 private function initialize(\Iterator $iterator)
 {
     if ($this->innerIterator === null && $this->cache === null) {
         $this->cache = array();
         $this->innerIterator = $iterator;
         $this->innerIterator->rewind();
     }
 }
開發者ID:cubiche,項目名稱:cubiche,代碼行數:11,代碼來源:Cacheable.php

示例10: initializeIterator

 /**
  * Initializes the iterator
  */
 protected function initializeIterator()
 {
     $this->iterator = $this->createIterator();
     if ($this->batchMode) {
         $this->iterator = new \ArrayIterator(array(iterator_to_array($this->iterator)));
     }
     $this->iterator->rewind();
 }
開發者ID:antoineguigan,項目名稱:ExcelConnectorBundle,代碼行數:11,代碼來源:AbstractIteratorReader.php

示例11: rewind

 public function rewind()
 {
     $this->it->rewind();
     if ($this->it->valid()) {
         $this->seen = new Set($this->eqComparer);
         $this->fetch();
     }
 }
開發者ID:gunjiro,項目名稱:ginq,代碼行數:8,代碼來源:DistinctIterator.php

示例12: rewind

 public function rewind()
 {
     $this->_lines->rewind();
     $this->_key = -1;
     $this->_current = NULL;
     $this->_buffer = $this->_lines->current();
     $this->next();
 }
開發者ID:fluentdom,項目名稱:loader-contentlines,代碼行數:8,代碼來源:Iterator.php

示例13: rewind

 public function rewind()
 {
     $this->i = 0;
     if (!$this->rewinded) {
         $this->it->rewind();
         $this->memo();
         $this->rewinded = true;
     }
 }
開發者ID:gunjiro,項目名稱:ginq,代碼行數:9,代碼來源:MemoizeIterator.php

示例14: rewind

 public function rewind()
 {
     if ($this->continue) {
         $this->continue = false;
         return;
     }
     $this->iterator->rewind();
     $this->stack->push($this->iterator->current());
 }
開發者ID:edde-framework,項目名稱:edde,代碼行數:9,代碼來源:Iterator.php

示例15: rewind

 /**
  * {@inheritdoc}
  */
 public function rewind()
 {
     if (!$this->iterableResult) {
         $this->iterableResult = new \SimpleXMLIterator(file_get_contents($this->filename));
         if ($this->xpath) {
             $this->iterableResult = new \ArrayIterator($this->iterableResult->xpath($this->xpath));
         }
     }
     $this->iterableResult->rewind();
 }
開發者ID:mathielen,項目名稱:import-engine,代碼行數:13,代碼來源:XmlReader.php


注:本文中的Iterator::rewind方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。