Hi,
If I am overloading the __call
method in a PHP class, how could I call the actual method if my code doesn't do something else? For example:
public function __call($name, $arguments)
{
if($name == 'tom')
{
$this->doName($name);
}
else
{
// Something here to carry on the __call maybe:
// $this->$name($arguments);
}
}
The issue is that the $arguments
are passed through as an array, how could I continue to pass them through info $this->$name($arg, $arg, $arg ...)
is there a right way to do this?
Thanks! Tom