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 Case the supplied first argument is an instance of a class and the second is a method name)
The other is_callable.
The function will throw an exception if one of those checks fails.
My Code contains an array with function names (setFoo, setBar, etc.) and the php magic function for overloading (__call) which handles setting, replacing and deletion of certain variables (better certain array elements).
The Problem:
method_exists will return false if the function is not defined.
Do I have any chance to get a true if the __call function does proper handling of the request?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…