hookphp
hookphp copied to clipboard
Method hooking in PHP.
Your example show how to modifiy the arguments before executing the original method ("hookBefore"). But would it possible to replace /stop the execution of the original method? Example from a...
I don't use it much, but is it possible to handle statically used classes like `class::method($param)`?
I don't know if it would be easy to do, but would be great if we don't need to write all the default arguments to a hook? Would it possible...
Maybe it would be easier to have "order" as third and optional parameter for addCallback()? Default could be "0" and be executed after the original method? More than one hook...
Hello, Have you thought to allow to hook magic calls too? For example ``` \SciActive\Hook::addCallback('Test->__toString', -2, function(&$arguments, $name, &$object, &$function, &$data){ }); ``` Would be triggered by `print($obj);`. Same for...
In the docs it says the hook runs before the method, it would be useful to have something for after. This would simplify some tests, adding security checks, logging and...