Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NArrayTools
  • NCallback
  • NComponent
  • NComponentContainer
  • NConfigurator
  • NDateTime53
  • NDebug
  • NEnvironment
  • NFramework
  • NFreezableObject
  • NGenericRecursiveIterator
  • NImage
  • NImageMagick
  • NInstanceFilterIterator
  • NObject
  • NObjectMixin
  • NPaginator
  • NRecursiveComponentIterator
  • NServiceLocator
  • NSmartCachingIterator
  • NString
  • NTools

Interfaces

  • IComponent
  • IComponentContainer
  • IDebuggable
  • IServiceLocator
  • ITranslator

Exceptions

  • NAmbiguousServiceException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NSmartCachingIterator

Smarter caching interator.

IteratorIterator implements Iterator, Traversable, OuterIterator
Extended by CachingIterator implements ArrayAccess, Countable
Extended by NSmartCachingIterator implements Countable
Package: Nette
Author: David Grudl
Located at Utils/Iterators/SmartCachingIterator.php
Methods summary
public
# __construct( $iterator )
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

Implementation of

Countable::count
public
# next( )

Forwards to the next element.

Forwards to the next element.

Implementation of

Iterator::next
public
# rewind( )

Rewinds the Iterator.

Rewinds the Iterator.

Implementation of

Iterator::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
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0