PHP 클래스 Nelmio\Alice\ObjectBag

상속: implements IteratorAggregate, implements Countable
파일 보기 프로젝트 열기: nelmio/alice 1 사용 예제들

공개 메소드들

메소드 설명
__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