PHP Class Zumba\Swivel\Manager

Inheritance: implements Zumba\Swivel\ManagerInterface, use trait Psr\Log\LoggerAwareTrait
Datei anzeigen Open project: zumba/swivel Class Usage Examples

Protected Properties

Property Type Description
$bucket Zumba\Swivel\BucketInterface A configured Bucket instance.
$metrics Zumba\Swivel\MetricsInterface A metrics object.

Public Methods

Method Description
__construct ( Zumba\Swivel\ConfigInterface $config ) Zumba\Swivel\Manager.
forFeature ( string $slug ) : Builder Create a new Builder instance.
invoke ( string $slug, callable $a, callable $b = null ) : mixed Syntactic sugar for creating simple feature toggles (ternary style).
returnValue ( string $slug, mixed $a, mixed $b = null ) : mixed Syntactic sugar for creating simple feature toggles (ternary style).
setBucket ( Zumba\Swivel\BucketInterface $bucket = null ) : Zumba\Swivel\ManagerInterface Set the Swivel Bucket.

Protected Methods

Method Description
setMetrics ( Zumba\Swivel\MetricsInterface $metrics ) Set a metrics object.

Method Details

__construct() public method

Zumba\Swivel\Manager.
public __construct ( Zumba\Swivel\ConfigInterface $config )
$config Zumba\Swivel\ConfigInterface

forFeature() public method

Create a new Builder instance.
See also: Zumba\Swivel\ManagerInterface
public forFeature ( string $slug ) : Builder
$slug string
return Builder

invoke() public method

Uses Builder::addBehavior
See also: Zumba\Swivel\ManagerInterface
public invoke ( string $slug, callable $a, callable $b = null ) : mixed
$slug string
$a callable
$b callable
return mixed

returnValue() public method

Uses Builder::addValue
See also: Zumba\Swivel\ManagerInterface
public returnValue ( string $slug, mixed $a, mixed $b = null ) : mixed
$slug string
$a mixed
$b mixed
return mixed

setBucket() public method

Set the Swivel Bucket.
See also: Zumba\Swivel\ManagerInterface
public setBucket ( Zumba\Swivel\BucketInterface $bucket = null ) : Zumba\Swivel\ManagerInterface
$bucket Zumba\Swivel\BucketInterface
return Zumba\Swivel\ManagerInterface

setMetrics() protected method

Set a metrics object.
protected setMetrics ( Zumba\Swivel\MetricsInterface $metrics )
$metrics Zumba\Swivel\MetricsInterface

Property Details

$bucket protected_oe property

A configured Bucket instance.
protected BucketInterface,Zumba\Swivel $bucket
return Zumba\Swivel\BucketInterface

$metrics protected_oe property

A metrics object.
protected MetricsInterface,Zumba\Swivel $metrics
return Zumba\Swivel\MetricsInterface