当前位置: 首页>>代码示例>>PHP>>正文


PHP FilterIterator::rewind方法代码示例

本文整理汇总了PHP中FilterIterator::rewind方法的典型用法代码示例。如果您正苦于以下问题:PHP FilterIterator::rewind方法的具体用法?PHP FilterIterator::rewind怎么用?PHP FilterIterator::rewind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FilterIterator的用法示例。


在下文中一共展示了FilterIterator::rewind方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: rewind

 /**
  * This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after
  * rewind in some cases.
  *
  * @see FilterIterator::rewind()
  */
 public function rewind()
 {
     $iterator = $this;
     while ($iterator instanceof \OuterIterator) {
         if ($iterator->getInnerIterator() instanceof \FilesystemIterator) {
             $iterator->getInnerIterator()->next();
             $iterator->getInnerIterator()->rewind();
         }
         $iterator = $iterator->getInnerIterator();
     }
     parent::rewind();
 }
开发者ID:unkerror,项目名称:Budabot,代码行数:18,代码来源:FilterIterator.php

示例2: rewind

 /**
  * This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after
  * rewind in some cases.
  *
  * @see FilterIterator::rewind()
  */
 public function rewind()
 {
     if (PHP_VERSION_ID > 50607 || PHP_VERSION_ID > 50523 && PHP_VERSION_ID < 50600) {
         parent::rewind();
         return;
     }
     $iterator = $this;
     while ($iterator instanceof \OuterIterator) {
         $innerIterator = $iterator->getInnerIterator();
         if ($innerIterator instanceof \FilesystemIterator) {
             $innerIterator->next();
             $innerIterator->rewind();
         }
         $iterator = $iterator->getInnerIterator();
     }
     parent::rewind();
 }
开发者ID:axelmdev,项目名称:ecommerce,代码行数:23,代码来源:FilterIterator.php

示例3: rewind

 /**
  * This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after
  * rewind in some cases.
  *
  * @see FilterIterator::rewind()
  */
 public function rewind()
 {
     $iterator = $this;
     while ($iterator instanceof \OuterIterator) {
         $innerIterator = $iterator->getInnerIterator();
         if ($innerIterator instanceof RecursiveDirectoryIterator) {
             if ($innerIterator->isRewindable()) {
                 $innerIterator->next();
                 $innerIterator->rewind();
             }
         } elseif ($iterator->getInnerIterator() instanceof \FilesystemIterator) {
             $iterator->getInnerIterator()->next();
             $iterator->getInnerIterator()->rewind();
         }
         $iterator = $iterator->getInnerIterator();
     }
     parent::rewind();
 }
开发者ID:ngitimfoyo,项目名称:Nyari-AppPHP,代码行数:24,代码来源:FilterIterator.php

示例4: rewind

 /**
  * This is a workaround for the problem with FilterIterator leaving inner \FilesystemIterator in wrong state after
  * rewind in some cases.
  *
  * @see FilterIterator::rewind()
  */
 public function rewind()
 {
     $iterator = $this;
     while ($iterator instanceof OuterIterator) {
         $innerIterator = $iterator->getInnerIterator();
         if ($innerIterator instanceof ehough_finder_iterator_RecursiveDirectoryIterator) {
             if ($innerIterator->isRewindable()) {
                 $innerIterator->next();
                 $innerIterator->rewind();
             }
         } elseif (class_exists('FilesystemIterator') && $iterator->getInnerIterator() instanceof FilesystemIterator) {
             $iterator->getInnerIterator()->next();
             $iterator->getInnerIterator()->rewind();
         }
         $iterator = $iterator->getInnerIterator();
     }
     parent::rewind();
 }
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:24,代码来源:FilterIterator.php

示例5: rewind

 /**
  * This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after
  * rewind in some cases.
  *
  * @see FilterIterator::rewind()
  */
 public function rewind()
 {
     if (PHP_VERSION_ID > 50607 || PHP_VERSION_ID > 50523 && PHP_VERSION_ID < 50600) {
         parent::rewind();
         return;
     }
     $iterator = $this;
     while ($iterator instanceof \OuterIterator) {
         $innerIterator = $iterator->getInnerIterator();
         if ($innerIterator instanceof RecursiveDirectoryIterator) {
             // this condition is necessary for iterators to work properly with non-local filesystems like ftp
             if ($innerIterator->isRewindable()) {
                 $innerIterator->next();
                 $innerIterator->rewind();
             }
         } elseif ($innerIterator instanceof \FilesystemIterator) {
             $innerIterator->next();
             $innerIterator->rewind();
         }
         $iterator = $innerIterator;
     }
     parent::rewind();
 }
开发者ID:Ener-Getick,项目名称:symfony,代码行数:29,代码来源:FilterIterator.php

示例6: rewind

 public function rewind()
 {
     parent::rewind();
     $this->multiShardPaths = [];
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:5,代码来源:FileBackendStore.php

示例7: rewind

	public function rewind() {
		$this->rewound = true;
		$this->cache = array();
		parent::rewind();
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:5,代码来源:MappedIterator.php

示例8: rewind

 /**
  * revient au depart
  * @return void
  */
 public function rewind()
 {
     $this->pos = 0;
     $this->fetched = 0;
     parent::rewind();
 }
开发者ID:JLuc,项目名称:SPIP,代码行数:10,代码来源:iterateur.php

示例9: rewind

 /**
  * {@inheritdoc}
  */
 public function rewind()
 {
     $this->initializeAttributeTypes();
     parent::rewind();
 }
开发者ID:qrz-io,项目名称:ExcelConnectorBundle,代码行数:8,代码来源:AttributeXlsxFileIterator.php

示例10: rewind

 public function rewind()
 {
     parent::rewind();
     $this->ignore_level = -1;
 }
开发者ID:honeybee,项目名称:honeybee,代码行数:5,代码来源:CallbackFilteredTreeIterator.php

示例11: rewind

 public function rewind()
 {
     parent::rewind();
     $this->line = 0;
 }
开发者ID:matthiasnoback,项目名称:leanpub-sampler,代码行数:5,代码来源:SampleTextLines.php

示例12: rewind

 public function rewind()
 {
     $this->skipped = 0;
     parent::rewind();
 }
开发者ID:arduanov,项目名称:pipes,代码行数:5,代码来源:SkipIterator.php

示例13: rewind

 public function rewind()
 {
     echo "rewind(), ";
     return parent::rewind();
 }
开发者ID:dw4dev,项目名称:Phalanger,代码行数:5,代码来源:FilterIterator.php

示例14: rewind

 /** Rewind and reset so that it once again searches.
  * @return void
  */
 function rewind()
 {
     parent::rewind();
     $this->done = false;
 }
开发者ID:ledsinclouds,项目名称:php-tutorials-lib,代码行数:8,代码来源:searchiterator.php


注:本文中的FilterIterator::rewind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。