Method |
Description |
|
add ( Puli\Repository\Api\Resource\PuliResource $resource ) |
Adds a resource to the collection. |
|
clear ( ) |
Removes all resources from the collection. |
|
get ( integer $key ) : Puli\Repository\Api\Resource\PuliResource |
Returns the resource for a collection key. |
|
getNames ( ) : string[] |
Returns the names of all resources in the collection. |
|
getPaths ( ) : string[] |
Returns the paths of all resources in the collection. |
|
has ( integer $key ) : boolean |
Returns whether a collection key exists. |
|
isEmpty ( ) : boolean |
Returns whether the collection is empty. |
|
keys ( ) : int[] |
Returns the keys of the collection. |
|
merge ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources ) |
Merges the given resources into the collection. |
|
remove ( integer $key ) |
Removes a collection key from the collection. |
|
replace ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources ) |
Replaces the collection contents with the given resources. |
|
set ( integer $key, Puli\Repository\Api\Resource\PuliResource $resource ) |
Sets a resource at a collection key. |
|
toArray ( ) : Puli\Repository\Api\Resource\PuliResource[] |
Returns the collection contents as array. |
|