Mecha CMS

Helper functions.

hook

Short function for Hook::set() and Hook::get().

2.2.0Hook

hook(...$lot);

Example:

// Set `foo` hook
hook('foo', function() { … });

// Get all hooks
$hooks = hook();
// Get `foo` hooks
$hook = hook('foo');