Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • CachingIterator
  • Mapper
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases

Class CachingIterator

Smarter caching iterator.

IteratorIterator implements Iterator, Traversable, OuterIterator
Extended by CachingIterator implements ArrayAccess, Countable
Extended by Nette\Iterators\CachingIterator implements Countable uses Nette\SmartObject
Namespace: Nette\Iterators
Located at Iterators/CachingIterator.php
Methods summary
public
# __construct( $iterator )

Overrides

CachingIterator::__construct()
public boolean
# isFirst( integer $width = null )

Is the current element the first one?

Is the current element the first one?

Parameters

$width
width

Returns

boolean
bool
public boolean
# isLast( integer $width = null )

Is the current element the last one?

Is the current element the last one?

Parameters

$width
width

Returns

boolean
bool
public boolean
# isEmpty( )

Is the iterator empty?

Is the iterator empty?

Returns

boolean
bool
public boolean
# isOdd( )

Is the counter odd?

Is the counter odd?

Returns

boolean
bool
public boolean
# isEven( )

Is the counter even?

Is the counter even?

Returns

boolean
bool
public integer
# getCounter( )

Returns the counter.

Returns the counter.

Returns

integer
int
public integer
# count( )

Returns the count of elements.

Returns the count of elements.

Returns

integer
int

Overrides

CachingIterator::count()

Implementation of

Countable::count()
public
# next( )

Forwards to the next element.

Forwards to the next element.

Overrides

CachingIterator::next()
public
# rewind( )

Rewinds the Iterator.

Rewinds the Iterator.

Overrides

CachingIterator::rewind()
public mixed
# getNextKey( )

Returns the next key.

Returns the next key.

Returns

mixed
mixed
public mixed
# getNextValue( )

Returns the next element.

Returns the next element.

Returns

mixed
mixed
Methods inherited from CachingIterator
__toString(), current(), getCache(), getFlags(), getInnerIterator(), hasNext(), key(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), setFlags(), valid()
Methods used from Nette\SmartObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from CachingIterator
CALL_TOSTRING, CATCH_GET_CHILD, FULL_CACHE, TOSTRING_USE_CURRENT, TOSTRING_USE_INNER, TOSTRING_USE_KEY
Magic properties summary
public read-only boolean $first
public read-only boolean $last
public read-only boolean $empty
public read-only boolean $odd
public read-only boolean $even
public read-only integer $counter
public read-only mixed $nextKey
public read-only mixed $nextValue
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0