本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例6: rewind
public function rewind()
{
parent::rewind();
$this->multiShardPaths = [];
}
示例7: rewind
public function rewind() {
$this->rewound = true;
$this->cache = array();
parent::rewind();
}
示例8: rewind
/**
* revient au depart
* @return void
*/
public function rewind()
{
$this->pos = 0;
$this->fetched = 0;
parent::rewind();
}
示例9: rewind
/**
* {@inheritdoc}
*/
public function rewind()
{
$this->initializeAttributeTypes();
parent::rewind();
}
示例10: rewind
public function rewind()
{
parent::rewind();
$this->ignore_level = -1;
}
示例11: rewind
public function rewind()
{
parent::rewind();
$this->line = 0;
}
示例12: rewind
public function rewind()
{
$this->skipped = 0;
parent::rewind();
}
示例13: rewind
public function rewind()
{
echo "rewind(), ";
return parent::rewind();
}
示例14: rewind
/** Rewind and reset so that it once again searches.
* @return void
*/
function rewind()
{
parent::rewind();
$this->done = false;
}