PHP 인터페이스 Zumba\Swivel\MapInterface

상속: extends Psr\Log\LoggerAwareInterface
파일 보기 프로젝트 열기: zumba/swivel 0 사용 예제들

공개 메소드들

메소드 설명
add ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface Merge this map with another map and return a new MapInterface.
diff ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface Compare $map to this instance and return a new MapInterface.
enabled ( string $slug, binary $index ) : boolean Check if a feature slug is enabled for a particular bucket index.
getMapData ( ) : array Get the internal map array used by this map object.
intersect ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface Compare $map to this instance and return a new MapInterface.
merge ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface Merge this map with another map and return a new MapInterface.
parse ( array $map ) : array Parse a human readable map into a map of bitmasks.

메소드 상세

add() 공개 메소드

Values in $map will be added to values in this instance. Any number of additional maps may be passed to this method, i.e. $map->merge($map2, $map3, $map4, ...);
public add ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface
$map Zumba\Swivel\MapInterface
리턴 Zumba\Swivel\MapInterface

diff() 공개 메소드

Returned object will contain only the elements that differ between the two maps. If a feature with the same key has different buckets, the buckets from the passed-in $map will be in the new object. If this map has a logger, it will be passed to the new map.
public diff ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface
$map Zumba\Swivel\MapInterface
리턴 Zumba\Swivel\MapInterface

enabled() 공개 메소드

Check if a feature slug is enabled for a particular bucket index.
public enabled ( string $slug, binary $index ) : boolean
$slug string
$index binary
리턴 boolean

getMapData() 공개 메소드

Get the internal map array used by this map object.
public getMapData ( ) : array
리턴 array

intersect() 공개 메소드

Returned object will contain only the elements that match between the two maps. If this map has a logger, it will be passed to the new map.
public intersect ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface
$map Zumba\Swivel\MapInterface
리턴 Zumba\Swivel\MapInterface

merge() 공개 메소드

Values in $map will overwrite values in this instance. Any number of additional maps may be passed to this method, i.e. $map->merge($map2, $map3, $map4, ...);
public merge ( Zumba\Swivel\MapInterface $map ) : Zumba\Swivel\MapInterface
$map Zumba\Swivel\MapInterface
리턴 Zumba\Swivel\MapInterface

parse() 공개 메소드

Parse a human readable map into a map of bitmasks.
public parse ( array $map ) : array
$map array
리턴 array