本文整理匯總了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());
}
}
示例2: rewind
public function rewind()
{
if ($this->isfirstrun) {
$this->firstrun();
$this->isfirstrun = FALSE;
}
parent::rewind();
}
示例3: rewind
public function rewind()
{
parent::rewind();
$this->found = false;
if (ComparisonHelper::isEquals($this->current(), $this->to)) {
$this->found = true;
}
}
示例4: rewind
/**
* Rewind iteration
*/
public function rewind()
{
parent::rewind();
$this->count = 0;
$this->window = [];
if (parent::valid()) {
$this->advanceWindow();
}
}
示例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;
}
示例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");
}
}
示例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;
}
}
}
示例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;
}
示例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;
}
示例10: rewind
public function rewind()
{
parent::rewind();
$this->key = 0;
}
示例11: rewind
public function rewind()
{
$this->index = 0;
parent::rewind();
}
示例12: rewind
public function rewind()
{
parent::rewind();
$this->it2->rewind();
}
示例13: rewind
public function rewind()
{
parent::rewind();
//need to loop until first match
$this->movetonextmatch();
}
示例14: rewind
public function rewind()
{
parent::rewind();
$this->lineNumber = 1;
$this->columnNumber = 1;
}
示例15: rewind
function rewind()
{
parent::rewind();
$this->fetch();
}