Ejemplo n.º 1
0
function __shutdown__()
{
    global $application, $zone;
    if (class_exists('CProfiler')) {
        CProfiler::stop('API & Render');
        if (CProfiler::isEnabled()) {
            CTrace::dbg(CProfiler::getProfiler());
        }
        CProfiler::writeCSV();
    }
    if (class_exists('CCacheFactory')) {
        CCacheFactory::shutdown();
    }
    if (function_exists('error_get_last')) {
        $error = error_get_last();
        if (is_array($error) && in_array($error['type'], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR))) {
            _fatal($error);
            //			CTrace::err($error);
            //			if(class_exists('EventsManager'))
            //				modApiFunc('EventsManager','throwEvent','ApplicationShutdown');
        }
    }
}