PHP Class Zumba\Swivel\Behavior

Inheritance: implements Zumba\Swivel\BehaviorInterface, use trait Psr\Log\LoggerAwareTrait
Mostra file Open project: zumba/swivel Class Usage Examples

Protected Properties

Property Type Description
$slug string E.g. "Feature.New.VersionA"
$strategy callable The strategy to be executed.

Public Methods

Method Description
__construct ( string $slug, callable $strategy ) Zumba\Swivel\Behavior.
execute ( array $args = [] ) : mixed Execute the behavior's callable and return the result.
getSlug ( ) : string Get the behavior's slug.

Method Details

__construct() public method

Zumba\Swivel\Behavior.
public __construct ( string $slug, callable $strategy )
$slug string
$strategy callable

execute() public method

Execute the behavior's callable and return the result.
See also: Zumba\Swivel\BehaviorInterface
public execute ( array $args = [] ) : mixed
$args array
return mixed

getSlug() public method

Get the behavior's slug.
See also: Zumba\Swivel\BehaviorInterface
public getSlug ( ) : string
return string

Property Details

$slug protected_oe property

E.g. "Feature.New.VersionA"
protected string $slug
return string

$strategy protected_oe property

The strategy to be executed.
protected callable $strategy
return callable