|
| $logger = null |
|
| $hooks = [] |
|
| $params = [] |
|
| $stop = false |
|
SlaxWeb\Hooks\Container::__construct |
( |
\Psr\Log\LoggerInterface |
$logger | ) |
|
Class constructor
Instantiates the Container, and sets the Logger to the protected property and writes the successful init message to the logger.
- Parameters
-
\Psr\Log\LoggerInterface | $logger | Logger that implements the PSR interface |
SlaxWeb\Hooks\Container::addHook |
( |
Hook |
$hook | ) |
|
Add hook definition to container
- Parameters
-
\SlaxWeb\Hooks\Hook | $hook | Hook definition |
- Returns
- void
SlaxWeb\Hooks\Container::exec |
( |
string |
$name | ) |
|
Execute hook definition
Execute all definitions for the retrieved hook names in the order that they have been inserted, and store their return values in an array, if it is not null. If only one definition was called, then return that executions return value directly, if there were more calls, return all the return values in an array.
- Parameters
-
- Returns
- mixed
SlaxWeb\Hooks\Container::setParams |
( |
array |
$params | ) |
|
Set parameters
Set parameters to be used in hook executions.
- Parameters
-
array | $params | Array of parameters |
- Returns
SlaxWeb\Hooks\Container::stopExec |
( |
| ) |
|
Prevent further execution
Stops execution of all further defined hook definitions.
- Returns
- void
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/hooks/src/Container.php