Download the PHP package kigkonsult/hookmgr without Composer
On this page you can find all versions of the php package kigkonsult/hookmgr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package hookmgr
Class HookMgr manages PHP hooks
A hook is a (HookMgr) key for invoking callable(s)
A callable can be
- simple function
- anonymous function
- instantiated object+method : [ $object, 'methodName' ]
- class name and static method : [ 'namespaceClassName', 'methodName' ]
- instantiated object, class with (magic) __call method : [ $object, 'someMethod' ]
- class name, class with (magic) __callStatic method : [ 'namespaceClassName', 'someMethod' ]
-
instantiated object, class with (magic) __invoke method : $object
Define a hook with callable
Invoke callable using hook
Methods
- Add single hook with single callable, _syntaxonly callable check
- string
- callable
- Throws InvalidArgumentException
-
static
- Add single hook invoking an array of callables
- Note, if invoked with arguments, arguments are used for all callables
- string
- callable[]
- Throws InvalidArgumentException
-
static
- Set all hooks, each for invoking single or array of callables
- array *( hook => callable(s) )
- Throws InvalidArgumentException
- static
- Invoke 'hook' action(s), return (last) result
- string
- array opt, [ arg1, arg2... ]
- Opt arguments are used in all hook invokes
- To use an argument by-reference, use
- Return mixed
- Throws RuntimeException
- static
- Return count of callables for hook, not found return 0
- string
- Return bool
-
static
- Return bool true if hook is set
- string
- Return bool
-
static
- Return array callables for hook, not found return []
- string
- Return callable[]
-
static
- Return array (string[]) hooks
-
static
- Clear (remove) all hooks with callables
-
static
- Remove single hook with callable(s)
- string
- static
- Return string nice rendered hooks with callable(s)
- static
Sponsorship
Donation using paypal.me/kigkonsult are appreciated. For invoice, please e-mail.
INSTALL
Composer, in your composer.json
:
Version 1.4 supports PHP 8, 1.2 7.4, 1.1 7.0.
Composer, acquire access
Otherwise , download and acquire..
Support
For support go to github.com HookMgr
License
This project is licensed under the LGPLv3 License