コード例 #1
0
ファイル: Model.php プロジェクト: arzynik/cana
 public function __call($name, $arguments)
 {
     $func = c::app()->extended(get_called_class(), $name);
     if (is_callable($func)) {
         // @note: for some reason bindto wasnt working in some cases. i had to use this method instead
         // array_unshift($arguments,$this);
         return call_user_func_array($func->bindTo($this), $arguments);
     } else {
         throw new Exception(get_called_class() . ' has no method ' . $name);
     }
 }