PHP Class KGzocha\Searcher\AbstractCollection

Author: Krzysztof Gzocha ([email protected])
Inheritance: implements Countable, implements IteratorAggregate
Show file Open project: krzysztof-gzocha/searcher Class Usage Examples

Public Methods

Method Description
__construct ( Traversable | array $items = [] )
count ( )
getIterator ( )

Protected Methods

Method Description
addItem ( mixed $item )
addNamedItem ( string $name, mixed $item )
getItems ( ) : array
getNamedItem ( string $name ) : mixed | null
isItemValid ( object $item ) : boolean

Private Methods

Method Description
checkItems ( array | Traversable $items )
isTraversable ( mixed $items )

Method Details

__construct() public method

public __construct ( Traversable | array $items = [] )
$items Traversable | array

addItem() protected method

protected addItem ( mixed $item )
$item mixed

addNamedItem() protected method

protected addNamedItem ( string $name, mixed $item )
$name string
$item mixed

count() public method

public count ( )

getItems() protected method

protected getItems ( ) : array
return array

getIterator() public method

public getIterator ( )

getNamedItem() protected method

protected getNamedItem ( string $name ) : mixed | null
$name string
return mixed | null

isItemValid() abstract protected method

abstract protected isItemValid ( object $item ) : boolean
$item object
return boolean