本文整理汇总了PHP中application::process方法的典型用法代码示例。如果您正苦于以下问题:PHP application::process方法的具体用法?PHP application::process怎么用?PHP application::process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application
的用法示例。
在下文中一共展示了application::process方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: destroy
/**
* Destroy everything
*/
public static function destroy()
{
$__run_only_bootstrap = application::get(['flag', 'global', '__run_only_bootstrap']);
// we need to set working directory again
chdir(application::get(['application', 'path_full']));
// error processing
if (empty(error_base::$flag_error_already)) {
$last_error = error_get_last();
$flag_render = false;
if (in_array($last_error['type'], [E_COMPILE_ERROR, E_PARSE, E_ERROR])) {
error_base::error_handler($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);
error_base::$flag_error_already = true;
$flag_render = true;
}
if ($flag_render || error_base::$flag_exception) {
error_base::$flag_error_already = true;
if ($__run_only_bootstrap) {
helper_ob::clean_all();
print_r(error_base::$errors);
} else {
// set mvc + process
application::set_mvc('/error/_error/500');
application::process();
}
}
}
// write sessions
session_write_close();
// final benchmark
if (debug::$debug) {
debug::benchmark('application end');
}
// debugging toolbar last
if (debug::$toolbar && !$__run_only_bootstrap) {
echo str_replace('<!-- [numbers: debug toolbar] -->', debug::render(), helper_ob::clean());
}
// flush data to client
flush();
// closing caches before db
$cache = factory::get(['cache']);
if (!empty($cache)) {
foreach ($cache as $k => $v) {
$object = $v['object'];
if (!empty(cache::$reset_caches[$k])) {
$object->gc(1, cache::$reset_caches[$k]);
}
$object->close();
}
}
// destroy i18n
if (i18n::$initialized) {
i18n::destroy();
}
// close db connections
$dbs = factory::get(['db']);
if (!empty($dbs)) {
foreach ($dbs as $k => $v) {
$object = $v['object'];
$object->close();
}
}
// emails with erros
if (debug::$debug && !empty(debug::$email)) {
debug::send_errors_to_admin();
}
}
示例2: application
<?php
require_once 'object_set.php';
class application extends object_set
{
function table_name()
{
return "t_application";
}
}
$application = new application();
$application->process();