Allow hooks to have multiple arguments.

applyHook accepts a variable number of arguments that are passed on to the hook in the order given while maintaining backwards compatibility. Not using variadic functionality due to only appearing in PHP 5.6.