Esempio n. 1
0
 public function __construct(array $config = null)
 {
     parent::__construct($config);
     if ($config) {
         $this->config = $config;
     } else {
         $this->config = BaseConfig::$config['runtime'];
     }
     /*
      * Set the custom exception handler
      */
     set_exception_handler(array('BaseException', 'handler'));
     error_reporting(0);
     ini_set('display_errors', 'Off');
     if (ini_get('xdebug.auto_trace')) {
         ini_set('xdebug.auto_trace', 'Off');
         ini_set('xdebug.collect_params', 'Off');
         ini_set('xdebug.collect_return', 'Off');
         ini_set('xdebug.profiler_enable', 'Off');
         ini_set('xdebug.show_local_vars', 'Off');
         ini_set('xdebug.collect_vars', 'Off');
         ini_set('xdebug.collect_return', 'Off');
         ini_set('xdebug.collect_params', 'Off');
         ini_set('xdebug.collect_includes', 'Off');
         ini_set('xdebug.var_display_max_depth', 'Off');
         ini_set('xdebug.dump_globals', 'Off');
     }
 }
Esempio n. 2
0
 public function __construct(array $config = Null)
 {
     parent::__construct($config);
     if ($config) {
         $this->config = $config;
     } else {
         $this->config = BaseConfig::$config['runtime'];
     }
     $ebits = ini_get('error_reporting');
     error_reporting(E_ALL ^ E_NOTICE);
     if (function_exists('xdebug_break') && $this->config['xdebug']['enable'] != false) {
         ini_set('html_errors', 'On');
         ini_set('xdebug.auto_trace', 'On');
         ini_set('xdebug.show_exception_trace', 'Off');
         ini_set('xdebug.collect_vars', 'on');
         ini_set('xdebug.var_display_max_depth', '10');
         ini_set('xdebug.show_local_vars', 'Off');
         ini_set('xdebug.dump_globals', 'on');
         ini_set('xdebug.collect_params', '4');
         ini_set('xdebug.collect_assignments', 'On');
         ini_set('xdebug.collect_return', 'On');
         ini_set('xdebug.collect_return', 'On');
         ini_set('xdebug.collect_includes', 'On');
         ini_set('xdebug.profiler_append', 'On');
         ini_set('xdebug.trace_format', 'On');
         ini_set('xdebug.profiler_output_name', 'script');
         ini_set('xdebug.cli_color', 'On');
     } else {
         RuntimeConfig::set('runtime/xdebug/enable', false);
     }
 }
Esempio n. 3
0
File: base.php Progetto: uwitec/mgoa
 private function use_i18n()
 {
     ini_set('date.timezone', ini('base/TIME_ZONE'));
     if (!ini('base/USE_I18N')) {
         define('USE_I18N', false);
         return true;
     }
     define('USE_I18N', true);
     self::$lang = $lang = ini('base/LANGUAGE_CODE');
     if (!$lang) {
         $lang = 'en_US';
     }
     $package = 'messages';
     if (SERVER_OS == 'linux') {
         $lang .= '.utf8';
         setlocale(LC_ALL, $lang);
     } else {
         putenv("LANG=" . $lang);
         setlocale(LC_ALL, $lang);
     }
     bindtextdomain($package, Package::get_folder('etc/locale.d'));
     textdomain($package);
     bind_textdomain_codeset($package, 'UTF-8');
 }
Esempio n. 4
0
 /**
  * init
  *
  * Initialise the environment.
  */
 public static function init()
 {
     self::$_instance = new self();
 }