PHP Class Puli\Repository\Resource\Collection\ArrayResourceCollection

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements IteratorAggregat\IteratorAggregate, implements Puli\Repository\Api\ResourceCollection
ファイルを表示 Open project: puli/repository Class Usage Examples

Public Methods

Method Description
__construct ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources = [] ) Creates a new collection.
add ( Puli\Repository\Api\Resource\PuliResource $resource )
clear ( )
count ( )
get ( $key )
getIterator ( $mode = ResourceCollectionIterator::KEY_AS_CURSOR )
getNames ( )
getPaths ( )
has ( $key )
isEmpty ( )
keys ( )
merge ( $resources )
offsetExists ( $key )
offsetGet ( $key )
offsetSet ( $key, $value )
offsetUnset ( $key )
remove ( $key )
replace ( $resources )
set ( $key, Puli\Repository\Api\Resource\PuliResource $resource )
toArray ( )

Method Details

__construct() public method

You can pass the resources that you want to initially store in the collection as argument.
public __construct ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources = [] )
$resources Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable The resources to store in the collection.

add() public method

public add ( Puli\Repository\Api\Resource\PuliResource $resource )
$resource Puli\Repository\Api\Resource\PuliResource

clear() public method

public clear ( )

count() public method

public count ( )

get() public method

public get ( $key )

getIterator() public method

public getIterator ( $mode = ResourceCollectionIterator::KEY_AS_CURSOR )

getNames() public method

public getNames ( )

getPaths() public method

public getPaths ( )

has() public method

public has ( $key )

isEmpty() public method

public isEmpty ( )

keys() public method

public keys ( )

merge() public method

public merge ( $resources )

offsetExists() public method

public offsetExists ( $key )

offsetGet() public method

public offsetGet ( $key )

offsetSet() public method

public offsetSet ( $key, $value )

offsetUnset() public method

public offsetUnset ( $key )

remove() public method

public remove ( $key )

replace() public method

public replace ( $resources )

set() public method

public set ( $key, Puli\Repository\Api\Resource\PuliResource $resource )
$resource Puli\Repository\Api\Resource\PuliResource

toArray() public method

public toArray ( )