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


PHP IteratorIterator::next方法代碼示例

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


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

示例1: next

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

示例2: current

 /**
  * @inheritDoc
  */
 public function current()
 {
     if (empty($this->_headers)) {
         $this->_headers = parent::current();
         parent::next();
     }
     return array_combine($this->_headers, parent::current());
 }
開發者ID:ExpandOnline,項目名稱:CakePHPUtil,代碼行數:11,代碼來源:CsvFileIterator.php

示例3: next

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

示例4: next

 public function next()
 {
     $this->chunk = array();
     for ($i = 0; $i < $this->chunkSize && parent::valid(); $i++) {
         $this->chunk[] = parent::current();
         parent::next();
     }
 }
開發者ID:jorjoh,項目名稱:Varden,代碼行數:8,代碼來源:ChunkedIterator.php

示例5: next

 /**
  * {@inheritdoc}
  */
 public function next()
 {
     $this->neighbour->next();
     if (!$this->neighbour->valid()) {
         $this->neighbour->rewind();
         parent::next();
     }
 }
開發者ID:th3n3rd,項目名稱:cartesian-product,代碼行數:11,代碼來源:Set.php

示例6: next

 public function next()
 {
     $this->chunk = array();
     for ($i = 0; $i < $this->size && parent::valid(); ++$i) {
         $this->chunk[] = parent::current();
         parent::next();
     }
     $this->chunk ? $this->key++ : null;
 }
開發者ID:arduanov,項目名稱:pipes,代碼行數:9,代碼來源:ChunkIterator.php

示例7: findChangelog

 /**
  * @param \nochso\WriteMe\Document $document
  *
  * @return \SplFileInfo
  */
 private function findChangelog(Document $document)
 {
     $changelogName = $this->options->getValue('changelog.file');
     $searchDepth = $this->options->getValue('changelog.search-depth');
     $folder = dirname($document->getFilepath());
     $files = new \IteratorIterator(Finder::findFiles($changelogName)->from($folder)->limitDepth($searchDepth));
     $files->next();
     if (!$files->valid()) {
         throw new \RuntimeException(sprintf("Unable to find changelog '%s' in folder '%s'", $changelogName, $folder));
     }
     return $files->current();
 }
開發者ID:nochso,項目名稱:writeme,代碼行數:17,代碼來源:Changelog.php

示例8: next

 /**
  * Returns next entity.
  *
  * @return Entity|null
  */
 public function next()
 {
     if (null !== $this->peek) {
         $entity = $this->peek;
         $this->peek = null;
         return $entity;
     }
     $item = $this->data->current();
     if (null === $item) {
         return null;
     }
     $this->data->next();
     return new Entity($item, $this->accessor, $this->options['mapping'], $this->options['id_path']);
 }
開發者ID:jfsimon,項目名稱:datagrid,代碼行數:19,代碼來源:Collection.php

示例9: next

 public function next()
 {
     parent::next();
     // Scroll to the end...
     if ($this->found) {
         while ($this->valid()) {
             parent::next();
         }
         return;
     }
     if (ComparisonHelper::isEquals($this->current(), $this->to)) {
         $this->found = true;
     }
 }
開發者ID:alexeyshockov,項目名稱:colada,代碼行數:14,代碼來源:TakeIterator.php

示例10: 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

示例11: 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

示例12: next

 public function next()
 {
     if ($this->valid()) {
         $token = $this->current();
         if ($token->isGivenKind([T_WHITESPACE, T_OPEN_TAG, T_COMMENT, T_DOC_COMMENT]) && ($n = strpos($token->getContent(), "\n")) !== false) {
             $this->lineNumber += mb_substr_count($token->getContent(), "\n");
             $this->columnNumber = mb_strlen(substr($token->getContent(), $n + 1));
             if ($this->columnNumber === 0) {
                 $this->columnNumber = 1;
             }
         } else {
             $this->columnNumber += mb_strlen($token->getContent());
         }
     }
     parent::next();
 }
開發者ID:boekkooi,項目名稱:PHP-CS-Checker,代碼行數:16,代碼來源:LineNumberIterator.php

示例13: next

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

示例14: next

 function next()
 {
     ++$this->index;
     return parent::next();
 }
開發者ID:shabbyrobe,項目名稱:cachet,代碼行數:5,代碼來源:ReindexingIterator.php

示例15: next

 public function next()
 {
     $this->_progress->next();
     return parent::next();
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:5,代碼來源:ProgressBar.php


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