PHP Class Puli\Repository\Resource\Collection\LazyResourceCollection

This collection is read-only. Each resource is loaded when it is accessed for the first time.
Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements IteratorAggregat\IteratorAggregate, implements Puli\Repository\Api\ResourceCollection
Afficher le fichier Open project: puli/repository

Méthodes publiques

Méthode Description
__construct ( Puli\Repository\Api\ResourceRepository $repo, array $paths ) Creates a new collection.
add ( Puli\Repository\Api\Resource\PuliResource $resource ) Not supported.
clear ( ) Not supported.
count ( )
get ( $key )
getIterator ( $mode = ResourceCollectionIterator::KEY_AS_CURSOR )
getNames ( )
getPaths ( )
has ( $key )
isEmpty ( )
keys ( )
merge ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources ) Not supported.
offsetExists ( $key )
offsetGet ( $key )
offsetSet ( string $key, Puli\Repository\Api\Resource\PuliResource $resource ) Not supported.
offsetUnset ( string $key ) Not supported.
remove ( string $key ) Not supported.
replace ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources ) Not supported.
set ( integer $key, Puli\Repository\Api\Resource\PuliResource $resource ) Not supported.
toArray ( )

Private Methods

Méthode Description
load ( ) Loads the complete collection.

Method Details

__construct() public méthode

Creates a new collection.
public __construct ( Puli\Repository\Api\ResourceRepository $repo, array $paths )
$repo Puli\Repository\Api\ResourceRepository The repository that will be used to load the resources.
$paths array The paths of the resources which will be loaded into the collection.

add() public méthode

Not supported.
public add ( Puli\Repository\Api\Resource\PuliResource $resource )
$resource Puli\Repository\Api\Resource\PuliResource The resource to add.

clear() public méthode

Not supported.
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

Not supported.
public merge ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources )
$resources Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable The resources to merge into the collection.

offsetExists() public méthode

public offsetExists ( $key )

offsetGet() public méthode

public offsetGet ( $key )

offsetSet() public méthode

Not supported.
public offsetSet ( string $key, Puli\Repository\Api\Resource\PuliResource $resource )
$key string The collection key to set.
$resource Puli\Repository\Api\Resource\PuliResource The resource to set.

offsetUnset() public méthode

Not supported.
public offsetUnset ( string $key )
$key string The collection key to remove.

remove() public méthode

Not supported.
public remove ( string $key )
$key string The collection key to remove.

replace() public méthode

Not supported.
public replace ( Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable $resources )
$resources Puli\Repository\Api\Resource\PuliResource[] | Traversabl\Traversable The resources to replace the collection contents with.

set() public méthode

Not supported.
public set ( integer $key, Puli\Repository\Api\Resource\PuliResource $resource )
$key integer The collection key.
$resource Puli\Repository\Api\Resource\PuliResource The resource to add.

toArray() public méthode

public toArray ( )