【发布时间】:2015-03-05 10:28:58
【问题描述】:
您好,我尝试使用 magick 类函数 __call 来存储调试信息,但没有任何存储在....
__调用
function __call($method, $arguments)
{
$load_functions = array('get', 'insert', 'update', 'delete', 'rawQuery');
if(in_array($method, $load_functions))
{
array_push($this->_debug, microtime(true));
}
}
执行
$app->database->setbase('MyBase');
$query = $app->database->get('MEMB_INFO');
$app->database->debug();
没有存储到 $this->_debug 数组中... $app->database->debug();返回空数组。
【问题讨论】:
-
你知道__call函数只有在被调用函数不存在的情况下才会被调用?
-
你扩展的类是什么?
-
你必须发布一个完整的例子来重现问题。