PHP Интерфейс Zumba\Swivel\MapInterface

Наследование: extends Psr\Log\LoggerAwareInterface
Показать файл Открыть проект Примеры использования интерфейса

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

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