The Project I\'m working on contains something like a wrapper for call_user_func(_array) which does some checks before execution. One of those checks is method_exists (In Ca
__call
handles calls to methods that don't exist. method_exists
is an introspection method that checks the existence of a method.
How can __call
be determined to handle a method? I think you have to throw an exception manually in __call
if doesn't handle your request and catch the exception in the code that would otherwise use method_exists
. BadMethodCallException exists for this purpose.