PHP Class Scientist\Machine

Afficher le fichier Open project: daylerees/scientist Class Usage Examples

Protected Properties

Свойство Type Description
$callback callable The callback to execute.
$muted boolean Should exceptions be muted.
$params array Parameters to provide to the callback.
$result Result The result instance.

Méthodes publiques

Méthode Description
__construct ( callable $callback, array $params = [], boolean $muted = false ) Inject machine dependencies.
execute ( ) : Result Execute the callback and retrieve a result.

Méthodes protégées

Méthode Description
executeCallback ( ) : void Execute the callback with parameters.
executeMutedCallback ( ) : void Execute the callback, but swallow exceptions.
setEndValues ( ) : void Set values after the callback has executed.
setStartValues ( ) : void Set values before callback is executed.

Method Details

__construct() public méthode

Inject machine dependencies.
public __construct ( callable $callback, array $params = [], boolean $muted = false )
$callback callable
$params array
$muted boolean

execute() public méthode

Execute the callback and retrieve a result.
public execute ( ) : Result
Résultat Result

executeCallback() protected méthode

Execute the callback with parameters.
protected executeCallback ( ) : void
Résultat void

executeMutedCallback() protected méthode

Execute the callback, but swallow exceptions.
protected executeMutedCallback ( ) : void
Résultat void

setEndValues() protected méthode

Set values after the callback has executed.
protected setEndValues ( ) : void
Résultat void

setStartValues() protected méthode

Set values before callback is executed.
protected setStartValues ( ) : void
Résultat void

Property Details

$callback protected_oe property

The callback to execute.
protected callable $callback
Résultat callable

$muted protected_oe property

Should exceptions be muted.
protected bool $muted
Résultat boolean

$params protected_oe property

Parameters to provide to the callback.
protected array $params
Résultat array

$result protected_oe property

The result instance.
protected Result,Scientist $result
Résultat Result