本文整理汇总了PHP中Kohana_Exception::disable方法的典型用法代码示例。如果您正苦于以下问题:PHP Kohana_Exception::disable方法的具体用法?PHP Kohana_Exception::disable怎么用?PHP Kohana_Exception::disable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kohana_Exception
的用法示例。
在下文中一共展示了Kohana_Exception::disable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cleanup
/**
* Cleans up the PHP environment. Disables error/exception handling and the
* auto-loading method and closes the output buffer.
*
* This method does not need to be called during normal system execution,
* however in some advanced situations it can be helpful. @see #1781
*
* @return void
*/
public static function cleanup()
{
static $run;
// Only run this function once
if ($run === TRUE) {
return;
}
$run = TRUE;
Kohana_Exception::disable();
Kohana_PHP_Exception::disable();
spl_autoload_unregister(array('Kohana', 'auto_load'));
Kohana::close_buffers();
}
示例2: defined
<?php
defined('SYSPATH') or die('No direct access allowed.');
if (class_exists('PHPUnit_Util_Filter')) {
// Hand control of errors and exceptions to PHPUnit
if (defined('Kohana::VERSION')) {
Kohana_Exception::disable();
Kohana_PHP_Exception::disable();
} else {
restore_exception_handler();
restore_error_handler();
}
Event::clear('system.ready');
Event::clear('system.routing');
Event::clear('system.execute');
}