PHP Class Puli\Repository\Resource\Collection\ArrayResourceCollection

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements IteratorAggregat\IteratorAggregate, implements Puli\Repository\Api\ResourceCollection
Afficher le fichier Open project: puli/repository Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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 méthode

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

clear() public méthode

public clear ( )

count() public méthode

public count ( )

get() public méthode

public get ( $key )

getIterator() public méthode

public getIterator ( $mode = ResourceCollectionIterator::KEY_AS_CURSOR )

getNames() public méthode

public getNames ( )

getPaths() public méthode

public getPaths ( )

has() public méthode

public has ( $key )

isEmpty() public méthode

public isEmpty ( )

keys() public méthode

public keys ( )

merge() public méthode

public merge ( $resources )

offsetExists() public méthode

public offsetExists ( $key )

offsetGet() public méthode

public offsetGet ( $key )

offsetSet() public méthode

public offsetSet ( $key, $value )

offsetUnset() public méthode

public offsetUnset ( $key )

remove() public méthode

public remove ( $key )

replace() public méthode

public replace ( $resources )

set() public méthode

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

toArray() public méthode

public toArray ( )