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


PHP IteratorIterator::rewind方法代碼示例

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


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

示例1: rewind

 public function rewind()
 {
     parent::rewind();
     if ($this->valid()) {
         $this->currentResult = $this->handleItem($this->current());
     }
 }
開發者ID:fabpot,項目名稱:php-cs-fixer,代碼行數:7,代碼來源:FileLintingIterator.php

示例2: rewind

 public function rewind()
 {
     if ($this->isfirstrun) {
         $this->firstrun();
         $this->isfirstrun = FALSE;
     }
     parent::rewind();
 }
開發者ID:halfnelson,項目名稱:LINQ4PHP,代碼行數:8,代碼來源:DelayedExecutionIterator.php

示例3: rewind

 public function rewind()
 {
     parent::rewind();
     $this->found = false;
     if (ComparisonHelper::isEquals($this->current(), $this->to)) {
         $this->found = true;
     }
 }
開發者ID:alexeyshockov,項目名稱:colada,代碼行數:8,代碼來源:TakeIterator.php

示例4: rewind

 /**
  * Rewind iteration
  */
 public function rewind()
 {
     parent::rewind();
     $this->count = 0;
     $this->window = [];
     if (parent::valid()) {
         $this->advanceWindow();
     }
 }
開發者ID:xphere,項目名稱:lazzzy,代碼行數:12,代碼來源:WindowIterator.php

示例5: createIteratorFromIterable

 /**
  * @param array|\Traversable $iterable
  *
  * @return \Iterator
  */
 private function createIteratorFromIterable($iterable)
 {
     if (is_array($iterable)) {
         return new \ArrayIterator($iterable);
     }
     $iterator = new \IteratorIterator($iterable);
     $iterator->rewind();
     return $iterator;
 }
開發者ID:phpspec,項目名稱:phpspec,代碼行數:14,代碼來源:IterablesMatcher.php

示例6: rewind

 /**
  * Restarts the iterator
  *
  * @return NULL
  */
 public function rewind()
 {
     if (!$this->rewound) {
         $this->rewound = TRUE;
         return parent::rewind();
     } else {
         throw new PHPUnit_Framework_ExpectationFailedException("Iterator has already been rewound");
     }
 }
開發者ID:Nycto,項目名稱:Round-Eights,代碼行數:14,代碼來源:Cache.php

示例7: rewind

 public function rewind()
 {
     parent::rewind();
     $found = false;
     while ($this->valid()) {
         if (ComparisonHelper::isEquals($this->current(), $this->from)) {
             $found = true;
         }
         $this->next();
         if ($found) {
             break;
         }
     }
 }
開發者ID:alexeyshockov,項目名稱:colada,代碼行數:14,代碼來源:DropIterator.php

示例8: getNextBunch

 /**
  * Get next bunch of validated rows.
  *
  * @return array|null
  */
 public function getNextBunch()
 {
     if (null === $this->_iterator) {
         $this->_iterator = $this->getIterator();
         $this->_iterator->rewind();
     }
     if ($this->_iterator->valid()) {
         $dataRow = $this->_iterator->current();
         $dataRow = Mage::helper('core')->jsonDecode($dataRow[0]);
         $this->_iterator->next();
     } else {
         $this->_iterator = null;
         $dataRow = null;
     }
     return $dataRow;
 }
開發者ID:barneydesmond,項目名稱:propitious-octo-tribble,代碼行數:21,代碼來源:Data.php

示例9: getNextBunch

 /**
  * Get next bunch of validatetd rows.
  *
  * @return array|null
  */
 public function getNextBunch()
 {
     if (null === $this->_iterator) {
         $this->_iterator = $this->getIterator();
         $this->_iterator->rewind();
     }
     if ($this->_iterator->valid()) {
         $dataRow = $this->_iterator->current();
         $dataRow = unserialize($dataRow[0]);
         $this->_iterator->next();
     } else {
         $this->_iterator = null;
         $dataRow = null;
     }
     return $dataRow;
 }
開發者ID:votanlean,項目名稱:Magento-Pruebas,代碼行數:21,代碼來源:Data.php

示例10: rewind

 public function rewind()
 {
     parent::rewind();
     $this->key = 0;
 }
開發者ID:arduanov,項目名稱:pipes,代碼行數:5,代碼來源:ValuesIterator.php

示例11: rewind

 public function rewind()
 {
     $this->index = 0;
     parent::rewind();
 }
開發者ID:halfnelson,項目名稱:LINQ4PHP,代碼行數:5,代碼來源:IndexedLinqIterator.php

示例12: rewind

 public function rewind()
 {
     parent::rewind();
     $this->it2->rewind();
 }
開發者ID:halfnelson,項目名稱:LINQ4PHP,代碼行數:5,代碼來源:ZipIterator.php

示例13: rewind

 public function rewind()
 {
     parent::rewind();
     //need to loop until first match
     $this->movetonextmatch();
 }
開發者ID:halfnelson,項目名稱:LINQ4PHP,代碼行數:6,代碼來源:DistinctIterator.php

示例14: rewind

 public function rewind()
 {
     parent::rewind();
     $this->lineNumber = 1;
     $this->columnNumber = 1;
 }
開發者ID:boekkooi,項目名稱:PHP-CS-Checker,代碼行數:6,代碼來源:LineNumberIterator.php

示例15: rewind

 function rewind()
 {
     parent::rewind();
     $this->fetch();
 }
開發者ID:am-immanuel,項目名稱:quercus,代碼行數:5,代碼來源:FilterIterator.php


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