public static function log($datas) { Clap_Error::log("\n" . print_r($datas, true), false); }
private static function redirectError() { $Config = Clap::getService('Config'); $Site = Clap::getService('Site'); try { $pagefile = $Config->get('ERRORS', 'page_error_php', true); } catch (Exception $e) { $Site->close($e->getMessage()); } self::$fatalError = true; try { if (Clap::getService('Cache')->fileExists($pagefile)) { ob_clean(); set_error_handler('Clap_Error::errorHandler'); $Site->insert($pagefile); $Site->close(); } else { throw new Exception('Controller "' . $pagefile . '" is missing (check param [ERRORS]:page_error_php in "' . $Config->getConfigFile() . '"), cannot load default error page'); } } catch (Exception $e) { self::exceptionHandler($e); } }