本文整理匯總了PHP中DBFactory::closeAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBFactory::closeAll方法的具體用法?PHP DBFactory::closeAll怎麽用?PHP DBFactory::closeAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBFactory
的用法示例。
在下文中一共展示了DBFactory::closeAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: execute
public function execute(CircuitController $c)
{
$r = $c->getRequest();
$observer = $c->getObserver();
// Get the message data. Try the request container first,
// only using the observer for backwards compatibility
if ($r->isEmpty('error.message')) {
$message = $observer->get('error.message');
$title = $observer->get('error.title');
$line = $observer->get('error.line');
$file = $observer->get('error.file');
$debug = $observer->get('error.debug');
} else {
$message = $r->get('error.message');
$title = $r->get('error.title');
$line = $r->get('error.line');
$file = $r->get('error.file');
$debug = $r->get('error.debug');
}
if (strlen($title) < 1) {
$title = 'ERROR';
}
if (strlen($message) < 1) {
$message = 'An error occured';
}
$debug_str = '';
if (!SC::isEmpty('board_config.enable_debug')) {
$location_format = "\nFILE: %s\nLINE: %s\n";
$debug_str = strlen($line) > 0 && strlen($file) > 0 ? sprintf($location_format, $file, $line) : '';
if (!empty($debug) && !is_scalar($debug)) {
ob_start();
var_dump($debug);
$debug = ob_get_contents();
ob_end_clean();
}
$debug_str .= "\n\nDEBUG\n{$debug}\n";
}
$format = "<pre>%s\n%s\n\n%s\n</pre>\n\n";
$output = sprintf($format, $title, $message, $debug_str);
DBFactory::closeAll();
die($output);
exit;
}