public static function create(Gpf_Application $application)
 {
     setlocale(LC_ALL, 'en.UTF-8');
     self::$instance = $application;
     self::$instance->registerRolePrivileges();
     self::$instance->initLogger();
     self::$instance->addSmartyPluginsDir();
     $timezone = Gpf_Settings_Gpf::DEFAULT_TIMEZONE;
     try {
         $timezone = Gpf_Settings::get(Gpf_Settings_Gpf::TIMEZONE_NAME);
     } catch (Gpf_Exception $e) {
         Gpf_Log::error('Unable to load timezone: %s - using default one.', $e->getMessage());
     }
     if (false === @date_default_timezone_set($timezone)) {
         Gpf_Log::error('Unable to set timezone %s:', $timezone);
     }
 }
Exemple #2
0
 protected function addSmartyPluginsDir()
 {
     parent::addSmartyPluginsDir();
     Gpf_Paths::getInstance()->addSmartyPluginPath(Gpf_Paths::getInstance()->getTopPath() . 'include/Pap/SmartyPlugins');
 }