PHP Class PHPDaemon\Structures\StackCallbacks

Author: Zorin Vasily ([email protected])
Inheritance: extends SplStack, use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Datei anzeigen Open project: kakserpom/phpdaemon Class Usage Examples

Public Methods

Method Description
executeAll ( variadic $args ) : integer Executes all callbacks with given arguments
executeAndKeepOne ( $args ) : boolean Executes one callback from the top with given arguments without taking it out
executeOne ( $args ) : boolean Executes one callback from the top with given arguments
push ( callable $cb ) : void Push callback to the bottom of stack
reset ( ) : void Shifts all callbacks sequentially
toArray ( ) : array Return array
unshift ( callable $cb ) : void Push callback to the top of stack

Method Details

executeAll() public method

Executes all callbacks with given arguments
public executeAll ( variadic $args ) : integer
$args variadic
return integer

executeAndKeepOne() public method

Executes one callback from the top with given arguments without taking it out
public executeAndKeepOne ( $args ) : boolean
$args Arguments
return boolean

executeOne() public method

Executes one callback from the top with given arguments
public executeOne ( $args ) : boolean
$args Arguments
return boolean

push() public method

Push callback to the bottom of stack
public push ( callable $cb ) : void
$cb callable Callback
return void

reset() public method

Shifts all callbacks sequentially
public reset ( ) : void
return void

toArray() public method

Return array
public toArray ( ) : array
return array

unshift() public method

Push callback to the top of stack
public unshift ( callable $cb ) : void
$cb callable Callback
return void