當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。