Property | Type | Description | |
---|---|---|---|
$args | array | Arguments to be passed to the behavior. | |
$behavior | The behavior to be executed. | ||
$bucket | Zumba\Swivel\BucketInterface | The user's Bucket. | |
$defaultWaived | boolean | Whether this feature requires a default behavior. | |
$metrics | Zumba\Swivel\MetricsInterface | A Metrics object. | |
$slug | string | Parent Feature slug. |
Method | Description | |
---|---|---|
__construct ( string $slug, Zumba\Swivel\BucketInterface $bucket ) | Zumba\Swivel\Builder. | |
addBehavior ( string $slug, mixed $strategy, array $args = [] ) : Zumba\Swivel\BuilderInterface | Add a behavior to be executed later. | |
addValue ( string $slug, mixed $value ) : Zumba\Swivel\BuilderInterface | Add a value to be returned when the builder is executed. | |
defaultBehavior ( callable $strategy, array $args = [] ) : Zumba\Swivel\BuilderInterface | Add a default behavior. | |
defaultValue ( mixed $value ) : Zumba\Swivel\BuilderInterface | Add a default value. | |
execute ( ) : mixed | Execute the feature. | |
getBehavior ( string $slug, callable $strategy = self::DEFAULT_STRATEGY ) : Zumba\Swivel\BehaviorInterface | Create and return a new Behavior. | |
noDefault ( ) : Zumba\Swivel\BuilderInterface | Waive the default behavior for this feature. | |
setMetrics ( Zumba\Swivel\MetricsInterface $metrics ) | Set a metrics object. |
Method | Description | |
---|---|---|
setBehavior ( |
Set the behavior and it's args. | |
startMetrics ( string $behaviorSlug ) | Start collecting metrics about this feature. | |
stopMetrics ( string $behaviorSlug ) | Stop collecting metrics about this feature. |
public __construct ( string $slug, Zumba\Swivel\BucketInterface $bucket ) | ||
$slug | string | |
$bucket | Zumba\Swivel\BucketInterface |
public defaultBehavior ( callable $strategy, array $args = [] ) : Zumba\Swivel\BuilderInterface | ||
$strategy | callable | |
$args | array | |
return | Zumba\Swivel\BuilderInterface |
public defaultValue ( mixed $value ) : Zumba\Swivel\BuilderInterface | ||
$value | mixed | |
return | Zumba\Swivel\BuilderInterface |
public getBehavior ( string $slug, callable $strategy = self::DEFAULT_STRATEGY ) : Zumba\Swivel\BehaviorInterface | ||
$slug | string | |
$strategy | callable | |
return | Zumba\Swivel\BehaviorInterface |
public noDefault ( ) : Zumba\Swivel\BuilderInterface | ||
return | Zumba\Swivel\BuilderInterface |
protected setBehavior ( |
||
$behavior | ||
$args | array |
public setMetrics ( Zumba\Swivel\MetricsInterface $metrics ) | ||
$metrics | Zumba\Swivel\MetricsInterface |
protected startMetrics ( string $behaviorSlug ) | ||
$behaviorSlug | string |
protected stopMetrics ( string $behaviorSlug ) | ||
$behaviorSlug | string |
protected Behavior,Zumba\Swivel $behavior | ||
return |
protected BucketInterface,Zumba\Swivel $bucket | ||
return | Zumba\Swivel\BucketInterface |
protected bool $defaultWaived | ||
return | boolean |
protected MetricsInterface,Zumba\Swivel $metrics | ||
return | Zumba\Swivel\MetricsInterface |