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_FilterIterator

Iterator which uses a callback or closure for filtering data.

IteratorIterator implements Iterator, Traversable, OuterIterator
Extended by FilterIterator
Extended by Jyxo_Spl_FilterIterator implements Jyxo_Spl_ArrayCopy
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/FilterIterator.php
Methods summary
public
# __construct( Iterator $iterator, Closure|callback $callback )

Constructor.

Constructor.

Parameters

$iterator
Iterator
Source data
$callback
Closure|callback
Filter callback

Throws

InvalidArgumentException
Supplied callback is not callable
public boolean
# accept( )

Decides if an item is valid by calling a callback.

Decides if an item is valid by calling a callback.

Returns

boolean
public array
# toArray( )

Returns all filtered data as an array.

Returns all filtered data as an array.

Returns

array

Implementation of

Jyxo_Spl_ArrayCopy::toArray
Methods inherited from FilterIterator
current(), getInnerIterator(), key(), next(), rewind(), valid()
Jyxo PHP Library API documentation generated by ApiGen 2.3.0