Feature
in package
implements
JsonSerializable
Interfaces, Classes and Traits
- JsonSerializable
Table of Contents
- $enabled : bool
- $events : array<string|int, mixed>
- $featureId : FeatureId
- $strategies : array<string|int, mixed>
- __construct() : mixed
- Feature constructor.
- disable() : void
- enable() : void
- id() : string
- isEnabled() : bool
- jsonSerialize() : array<string, mixed>
- release() : array<string|int, object>
- remove() : void
- removeStrategy() : void
- setStrategy() : void
- strategies() : array<string|int, Strategy>
- withId() : self
Properties
$enabled
private
bool
$enabled
$events
private
array<string|int, mixed>
$events
= []
$featureId
private
FeatureId
$featureId
$strategies
private
array<string|int, mixed>
$strategies
= []
Methods
__construct()
Feature constructor.
public
__construct(FeatureId $featureId, bool $enabled[, array<string|int, Strategy> $strategies = [] ]) : mixed
Parameters
Return values
mixed —disable()
public
disable() : void
Return values
void —enable()
public
enable() : void
Return values
void —id()
public
id() : string
Return values
string —isEnabled()
public
isEnabled() : bool
Return values
bool —jsonSerialize()
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed> —release()
public
release() : array<string|int, object>
Return values
array<string|int, object> —remove()
public
remove() : void
Return values
void —removeStrategy()
public
removeStrategy(StrategyId $strategyId) : void
Parameters
- $strategyId : StrategyId
Return values
void —setStrategy()
public
setStrategy(Strategy $strategy) : void
Parameters
- $strategy : Strategy
Return values
void —strategies()
public
strategies() : array<string|int, Strategy>
Return values
array<string|int, Strategy> —withId()
public
static withId(FeatureId $featureId) : self
Parameters
- $featureId : FeatureId