PHP 클래스 Nelmio\Alice\Definition\FlagBag

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

공개 메소드들

메소드 설명
__construct ( string $key )
count ( )
getIterator ( )
getKey ( ) : string
mergeWith ( self $flags, boolean $override = true ) : self Creates a new instance with the two bags merged together.
withFlag ( Nelmio\Alice\Definition\FlagInterface $flag ) : self Creates a new instance of the bag with the given flag. If a flag with the same identifier already exists, the existing value will be replaced.
withKey ( string $key ) : self

메소드 상세

__construct() 공개 메소드

public __construct ( string $key )
$key string String elements from which the flags come from stripped from its flags.

count() 공개 메소드

public count ( )

getIterator() 공개 메소드

public getIterator ( )

getKey() 공개 메소드

public getKey ( ) : string
리턴 string

mergeWith() 공개 메소드

The original key is kept.
public mergeWith ( self $flags, boolean $override = true ) : self
$flags self
$override boolean If some flags overlaps, the existing one are overridden if the value is true, and left untouched otherwise.
리턴 self

withFlag() 공개 메소드

Creates a new instance of the bag with the given flag. If a flag with the same identifier already exists, the existing value will be replaced.
public withFlag ( Nelmio\Alice\Definition\FlagInterface $flag ) : self
$flag Nelmio\Alice\Definition\FlagInterface
리턴 self

withKey() 공개 메소드

public withKey ( string $key ) : self
$key string
리턴 self