PHP Класс Nelmio\Alice\ObjectBag

Наследование: implements IteratorAggregate, implements Countable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

count() публичный Метод

public count ( )

get() публичный Метод

public get ( Nelmio\Alice\FixtureIdInterface $fixture ) : Nelmio\Alice\ObjectInterface
$fixture Nelmio\Alice\FixtureIdInterface
Результат Nelmio\Alice\ObjectInterface

getIterator() публичный Метод

public getIterator ( )

has() публичный Метод

public has ( Nelmio\Alice\FixtureIdInterface $fixture ) : boolean
$fixture Nelmio\Alice\FixtureIdInterface
Результат boolean

mergeWith() публичный Метод

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
Результат self

toArray() публичный Метод

public toArray ( ) : array
Результат array

with() публичный Метод

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
Результат self

without() публичный Метод

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
Результат self