您好,欢迎访问一九零五行业门户网

相关PHP回调函数的乌云

有关php回调函数的乌云。
本人较菜,请问各位侠士,如何在php中达到eventstack的notifywatcher方法可以将取得的数据返还给welcome.php指定的回调函数,我哪里写的不对啊 ???
出现的错误为:fatal error: function name must be a string in /home/latel/workspace/new_zhebo/module/eventstack.php on line ××
/app/welcome.php
addevent(
data_request,
serialize(array(
array(
request => settingdaemon
)
)),
$fgetsettings,
null
);
?>
/eventstack.php
_aeventstack[] = array(
            stamp => $sstamp,
            value => $svalue,
            handler => $fhandler,
            scope => $mscope,
            timestamp => time()
        );
        $ikey =  sizeof($this->_aeventstack) - 1;
        $this->notifywatcher($ikey);
        return $ikey;
    }
    public function addwatcher($owatcher, $swatchstamp) {
    }
    ##c##
    public function cleareventstack() {
        //清空事件堆栈
    }
    ##e##
    public function exporteventstack() {
        //输出调试信息
    }
    ##g##
    public function getstack($istackid) {
        //根据是否提供堆栈序号,返回堆栈列表或指定堆栈的内容
    }
    ##n##
    private function notifywatcher($ikey) {
        //推送事件至相应的观察者
        if (array_key_exists($this->_aeventstack[$ikey][stamp], $this->_awatcherregistry)) {
            $mcallback = $this->_awatcherregistry[$this->_aeventstack[$ikey][stamp]](
                $this->_aeventstack[$ikey][stamp],
                $this->_aeventstack[$ikey][value],
                $this->_aeventstack[$ikey][handler],
                $this->_aeventstack[$ikey][scope]

其它类似信息

推荐信息