PHP Class Zumba\Swivel\Behavior

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

Protected Properties

Свойство Type Description
$slug string E.g. "Feature.New.VersionA"
$strategy callable The strategy to be executed.

Méthodes publiques

Méthode 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 méthode

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

execute() public méthode

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

getSlug() public méthode

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

Property Details

$slug protected_oe property

E.g. "Feature.New.VersionA"
protected string $slug
Résultat string

$strategy protected_oe property

The strategy to be executed.
protected callable $strategy
Résultat callable