how to pass a parameter to method with php's is_callable
- by fayer
i have to create a variable that is callable with php's is_callable
i have done this:
$callable = array(new MyClass, 'methodName');
but i want to pass a parameter to the method.
how can i do that?
cause using symfony's event dispatcher component will be like:
$sfEventDispatcher->connect('log.write', array(new IC_Log('logfile.txt'), 'write'));
the first parameter is just a event name, the second is the callable variable.
but i can only call the write method, i want to pass a parameter to it.
could someone help me out.
thanks