本文整理匯總了PHP中IteratorIterator::next方法的典型用法代碼示例。如果您正苦於以下問題:PHP IteratorIterator::next方法的具體用法?PHP IteratorIterator::next怎麽用?PHP IteratorIterator::next使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IteratorIterator
的用法示例。
在下文中一共展示了IteratorIterator::next方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: next
public function next()
{
parent::next();
if ($this->valid()) {
$this->currentResult = $this->handleItem($this->current());
}
}
示例2: current
/**
* @inheritDoc
*/
public function current()
{
if (empty($this->_headers)) {
$this->_headers = parent::current();
parent::next();
}
return array_combine($this->_headers, parent::current());
}
示例3: next
public function next()
{
if ($this->isfirstrun) {
$this->firstrun();
$this->isfirstrun = FALSE;
}
parent::next();
}
示例4: next
public function next()
{
$this->chunk = array();
for ($i = 0; $i < $this->chunkSize && parent::valid(); $i++) {
$this->chunk[] = parent::current();
parent::next();
}
}
示例5: next
/**
* {@inheritdoc}
*/
public function next()
{
$this->neighbour->next();
if (!$this->neighbour->valid()) {
$this->neighbour->rewind();
parent::next();
}
}
示例6: next
public function next()
{
$this->chunk = array();
for ($i = 0; $i < $this->size && parent::valid(); ++$i) {
$this->chunk[] = parent::current();
parent::next();
}
$this->chunk ? $this->key++ : null;
}
示例7: findChangelog
/**
* @param \nochso\WriteMe\Document $document
*
* @return \SplFileInfo
*/
private function findChangelog(Document $document)
{
$changelogName = $this->options->getValue('changelog.file');
$searchDepth = $this->options->getValue('changelog.search-depth');
$folder = dirname($document->getFilepath());
$files = new \IteratorIterator(Finder::findFiles($changelogName)->from($folder)->limitDepth($searchDepth));
$files->next();
if (!$files->valid()) {
throw new \RuntimeException(sprintf("Unable to find changelog '%s' in folder '%s'", $changelogName, $folder));
}
return $files->current();
}
示例8: next
/**
* Returns next entity.
*
* @return Entity|null
*/
public function next()
{
if (null !== $this->peek) {
$entity = $this->peek;
$this->peek = null;
return $entity;
}
$item = $this->data->current();
if (null === $item) {
return null;
}
$this->data->next();
return new Entity($item, $this->accessor, $this->options['mapping'], $this->options['id_path']);
}
示例9: next
public function next()
{
parent::next();
// Scroll to the end...
if ($this->found) {
while ($this->valid()) {
parent::next();
}
return;
}
if (ComparisonHelper::isEquals($this->current(), $this->to)) {
$this->found = true;
}
}
示例10: 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;
}
示例11: 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;
}
示例12: next
public function next()
{
if ($this->valid()) {
$token = $this->current();
if ($token->isGivenKind([T_WHITESPACE, T_OPEN_TAG, T_COMMENT, T_DOC_COMMENT]) && ($n = strpos($token->getContent(), "\n")) !== false) {
$this->lineNumber += mb_substr_count($token->getContent(), "\n");
$this->columnNumber = mb_strlen(substr($token->getContent(), $n + 1));
if ($this->columnNumber === 0) {
$this->columnNumber = 1;
}
} else {
$this->columnNumber += mb_strlen($token->getContent());
}
}
parent::next();
}
示例13: next
public function next()
{
parent::next();
$this->movetonextmatch();
}
示例14: next
function next()
{
++$this->index;
return parent::next();
}
示例15: next
public function next()
{
$this->_progress->next();
return parent::next();
}