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
Datei anzeigen Open project: puli/repository

Public Methods

Method 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

Method Description
load ( ) Loads the complete collection.

Method Details

__construct() public method

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 method

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

clear() public method

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

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 method

public offsetExists ( $key )

offsetGet() public method

public offsetGet ( $key )

offsetSet() public method

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 method

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

remove() public method

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

replace() public method

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 method

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 method

public toArray ( )