本文整理汇总了PHP中Iterator::rewind方法的典型用法代码示例。如果您正苦于以下问题:PHP Iterator::rewind方法的具体用法?PHP Iterator::rewind怎么用?PHP Iterator::rewind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Iterator
的用法示例。
在下文中一共展示了Iterator::rewind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rewind
/**
* Rewind the Iterator to the first element.
*
* @link http://php.net/manual/en/iterator.rewind.php
* @since 5.0.0
*/
public function rewind()
{
if (null === $this->iterator) {
throw new \LogicException('Missing internal iterator.');
}
$this->iterator->rewind();
}
示例2: rewind
public function rewind()
{
$this->projectionNeeded = true;
unset($this->current);
unset($this->currentKey);
$this->innerIterator->rewind();
}
示例3: rewind
public function rewind()
{
$this->it->rewind();
$this->buffer = array();
$this->i = 0;
$this->fetch();
}
示例4: rewind
/**
* {@inheritdoc}
*/
public final function rewind()
{
if (null === $this->iterator) {
throw new \LogicException('Internal iterator is missing.');
}
$this->iterator->rewind();
}
示例5: rewind
/**
* {@inheritdoc}
* @see IteratorIterator::rewind()
*/
public function rewind()
{
$this->iterator->rewind();
if (!$this->accept()) {
$this->next();
}
}
示例6: rewind
/**
* {@inheritdoc}
*/
public function rewind()
{
if (!$this->iterator) {
$this->initIterator();
}
$this->iterator->rewind();
}
示例7: rewind
/**
* {@inheritdoc}
*/
public function rewind()
{
if (!$this->iterableResult) {
$this->iterableResult = new \ArrayIterator($this->getDataFromService());
}
$this->iterableResult->rewind();
}
示例8: rewind
public function rewind()
{
$this->groups = Ginq::from($this->it)->toLookup($this->groupingKeySelector, $this->elementSelector, $this->eqComparer)->getIterator();
$this->groups->rewind();
if ($this->valid()) {
$this->fetch();
}
}
示例9: initialize
/**
* @param \Iterator $iterator
*/
private function initialize(\Iterator $iterator)
{
if ($this->innerIterator === null && $this->cache === null) {
$this->cache = array();
$this->innerIterator = $iterator;
$this->innerIterator->rewind();
}
}
示例10: initializeIterator
/**
* Initializes the iterator
*/
protected function initializeIterator()
{
$this->iterator = $this->createIterator();
if ($this->batchMode) {
$this->iterator = new \ArrayIterator(array(iterator_to_array($this->iterator)));
}
$this->iterator->rewind();
}
示例11: rewind
public function rewind()
{
$this->it->rewind();
if ($this->it->valid()) {
$this->seen = new Set($this->eqComparer);
$this->fetch();
}
}
示例12: rewind
public function rewind()
{
$this->_lines->rewind();
$this->_key = -1;
$this->_current = NULL;
$this->_buffer = $this->_lines->current();
$this->next();
}
示例13: rewind
public function rewind()
{
$this->i = 0;
if (!$this->rewinded) {
$this->it->rewind();
$this->memo();
$this->rewinded = true;
}
}
示例14: rewind
public function rewind()
{
if ($this->continue) {
$this->continue = false;
return;
}
$this->iterator->rewind();
$this->stack->push($this->iterator->current());
}
示例15: rewind
/**
* {@inheritdoc}
*/
public function rewind()
{
if (!$this->iterableResult) {
$this->iterableResult = new \SimpleXMLIterator(file_get_contents($this->filename));
if ($this->xpath) {
$this->iterableResult = new \ArrayIterator($this->iterableResult->xpath($this->xpath));
}
}
$this->iterableResult->rewind();
}