eg:
<?php $dispatcher->setErrorHandler(array(get_class($this),'error_handler')); ?>
PHP - Manual: Yaf_Dispatcher::setErrorHandler
2025-02-27
(Yaf >=1.0.0)
Yaf_Dispatcher::setErrorHandler — 设置错误处理
为 Yaf 设置错误处理程序,当 application.dispatcher.throwException 关闭时,Yaf 将在发生意外错误时触发可捕获错误。
因此,将在错误出现时调用该错误处理程序。
callback
可调用的回调
error_types
eg:
<?php $dispatcher->setErrorHandler(array(get_class($this),'error_handler')); ?>
官方地址:https://www.php.net/manual/en/yaf-dispatcher.seterrorhandler.php