如果我在PHP類中重載__call
方法,如果我的代碼沒有執行其他操作,該如何調用實際方法?例如:PHP如何調用parent :: __ call()並傳入參數
public function __call($name, $arguments)
{
if($name == 'tom')
{
$this->doName($name);
}
else
{
// Something here to carry on the __call maybe:
// $this->$name($arguments);
}
}
的問題是,$arguments
通過作爲數組過去了,我怎麼可能繼續通過信息$this->$name($arg, $arg, $arg ...)
通過他們是否有這樣做的權利呢?
嘿!完全沒有想到這一點! :D – tarnfeld 2010-08-11 20:27:52