PHP Class Nelmio\Alice\ObjectBag

Inheritance: implements IteratorAggregate, implements Countable
Afficher le fichier Open project: nelmio/alice Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( array $objects = [] )
count ( )
get ( Nelmio\Alice\FixtureIdInterface $fixture ) : Nelmio\Alice\ObjectInterface
getIterator ( )
has ( Nelmio\Alice\FixtureIdInterface $fixture ) : boolean
mergeWith ( self $objects ) : self Creates a new instance with the new objects. If objects with the same reference already exists, they will be overridden by the new ones.
toArray ( ) : array
with ( Nelmio\Alice\ObjectInterface $object ) : self Creates a new instance which will contain the given object. If an object with the same reference already exists, it will be overridden by the new object.
without ( Nelmio\Alice\FixtureInterface | Nelmio\Alice\ObjectInterface $objectOrFixture ) : self Creates a new instance which will no longer contain the given object.

Method Details

__construct() public méthode

public __construct ( array $objects = [] )
$objects array

count() public méthode

public count ( )

get() public méthode

public get ( Nelmio\Alice\FixtureIdInterface $fixture ) : Nelmio\Alice\ObjectInterface
$fixture Nelmio\Alice\FixtureIdInterface
Résultat Nelmio\Alice\ObjectInterface

getIterator() public méthode

public getIterator ( )

has() public méthode

public has ( Nelmio\Alice\FixtureIdInterface $fixture ) : boolean
$fixture Nelmio\Alice\FixtureIdInterface
Résultat boolean

mergeWith() public méthode

Creates a new instance with the new objects. If objects with the same reference already exists, they will be overridden by the new ones.
public mergeWith ( self $objects ) : self
$objects self
Résultat self

toArray() public méthode

public toArray ( ) : array
Résultat array

with() public méthode

Creates a new instance which will contain the given object. If an object with the same reference already exists, it will be overridden by the new object.
public with ( Nelmio\Alice\ObjectInterface $object ) : self
$object Nelmio\Alice\ObjectInterface
Résultat self

without() public méthode

Creates a new instance which will no longer contain the given object.
public without ( Nelmio\Alice\FixtureInterface | Nelmio\Alice\ObjectInterface $objectOrFixture ) : self
$objectOrFixture Nelmio\Alice\FixtureInterface | Nelmio\Alice\ObjectInterface
Résultat self