Overview

Packages

  • Jyxo_Beholder
  • Jyxo_Charset
  • Jyxo_Color
  • Jyxo_Css
  • Jyxo_ErrorHandling
  • Jyxo_FirePhp
  • Jyxo_Gettext
    • Parser
  • Jyxo_Html
  • Jyxo_Input
    • Chain
    • Filter
    • Validator
  • Jyxo_Mail
    • Email
    • Parser
    • Sender
  • Jyxo_Rpc
    • Json
    • Xml
  • Jyxo_Shell
  • Jyxo_SpamFilter
  • Jyxo_Spl
  • Jyxo_String
  • Jyxo_Svn
  • Jyxo_Time
  • Jyxo_Timer
  • Jyxo_Webdav
  • Jyxo_XmlReader
  • PHP

Classes

  • Jyxo_Spl_ArrayUtil
  • Jyxo_Spl_CountableLimitIterator
  • Jyxo_Spl_FilterIterator
  • Jyxo_Spl_MapIterator
  • Jyxo_Spl_Object
  • Jyxo_Spl_ObjectCache

Interfaces

  • Jyxo_Spl_ArrayCopy
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Jyxo_Spl_MapIterator

Iterator which applies a callback over results (lazy-loaded calls). Supports iteration over both Traversable and array.

Jyxo_Spl_MapIterator implements Countable, Jyxo_Spl_ArrayCopy, OuterIterator, SeekableIterator
Category: Jyxo
Package: Jyxo_Spl
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jakub Tománek
Located at Spl/MapIterator.php
Methods summary
public
# __construct( array|Iterator|IteratorAggregate $data, callback|Closure $map )

Constructor.

Constructor.

Parameters

$data
array|Iterator|IteratorAggregate
Source data
$map
callback|Closure
Applied callback or closure

Throws

InvalidArgumentException
Invalid source data or callback is not callable
public integer
# count( )

Returns count of source data.

Returns count of source data.

Returns

integer

Implementation of

Countable::count
public
# rewind( )

Rewinds the iterator to the beginning.

Rewinds the iterator to the beginning.

Implementation of

Iterator::rewind
public
# next( )

Advances the internal pointer.

Advances the internal pointer.

Implementation of

Iterator::next
public boolean
# valid( )

Returns if current pointer position is valid.

Returns if current pointer position is valid.

Returns

boolean

Implementation of

Iterator::valid
public mixed
# current( )

Returns current data.

Returns current data.

Returns

mixed

Implementation of

Iterator::current
public integer
# key( )

Returns current key.

Returns current key.

Returns

integer

Implementation of

Iterator::key
public array
# toArray( )

Returns all data as an array.

Returns all data as an array.

Returns

array

Implementation of

Jyxo_Spl_ArrayCopy::toArray
public Iterator
# getInnerIterator( )

Returns inner iterator (works even when constructed with array data)

Returns inner iterator (works even when constructed with array data)

Returns

Iterator

Implementation of

OuterIterator::getInnerIterator
public
# seek( integer $position )

Seeks to defined position. Does NOT throw OutOfBoundsException.

Seeks to defined position. Does NOT throw OutOfBoundsException.

Parameters

$position
integer
New position

Implementation of

SeekableIterator::seek
Jyxo PHP Library API documentation generated by ApiGen 2.3.0