Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class SmartCachingIterator

Smarter caching iterator.

IteratorIterator implements Iterator, Traversable, OuterIterator
Extended by CachingIterator implements ArrayAccess, Countable
Extended by SmartCachingIterator implements Countable
Package: Nette\Iterators
Author: David Grudl
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
integer
grid width

Returns

boolean
public boolean
# isLast( integer $width = NULL )

Is the current element the last one?

Is the current element the last one?

Parameters

$width
integer
grid width

Returns

boolean
public boolean
# isEmpty( )

Is the iterator empty?

Is the iterator empty?

Returns

boolean
public boolean
# isOdd( )

Is the counter odd?

Is the counter odd?

Returns

boolean
public boolean
# isEven( )

Is the counter even?

Is the counter even?

Returns

boolean
public integer
# getCounter( )

Returns the counter.

Returns the counter.

Returns

integer
public integer
# count( )

Returns the count of elements.

Returns the count of elements.

Returns

integer

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
public mixed
# getNextValue( )

Returns the next element.

Returns the next element.

Returns

mixed
public mixed
# __call( string $name, array $args )

Call to undefined method.

Call to undefined method.

Parameters

$name
string
method name
$args
array
arguments

Returns

mixed

Throws

MemberAccessException
public mixed &
# __get( string $name )

Returns property value. Do not call directly.

Returns property value. Do not call directly.

Parameters

$name
string
property name

Returns

mixed
property value

Throws

MemberAccessException
if the property is not defined.
public
# __set( string $name, mixed $value )

Sets value of a property. Do not call directly.

Sets value of a property. Do not call directly.

Parameters

$name
string
property name
$value
mixed
property value

Throws

MemberAccessException
if the property is not defined or is read-only
public boolean
# __isset( string $name )

Is property defined?

Is property defined?

Parameters

$name
string
property name

Returns

boolean
public
# __unset( string $name )

Access to undeclared property.

Access to undeclared property.

Parameters

$name
string
property name

Throws

MemberAccessException
Methods inherited from CachingIterator
__toString(), current(), getCache(), getFlags(), getInnerIterator(), hasNext(), key(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), setFlags(), valid()
Constants inherited from CachingIterator
CALL_TOSTRING, CATCH_GET_CHILD, FULL_CACHE, TOSTRING_USE_CURRENT, TOSTRING_USE_INNER, TOSTRING_USE_KEY
Magic properties summary
public $flags
#
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
#
public read-only $innerIterator
#
public read-only $cache
#
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0