当前位置: 首页>>代码示例>>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;未经允许,请勿转载。