Exemplo n.º 1
0
 /**
  * @param array $cfg
  */
 public static function init($cfg = array())
 {
     foreach ($cfg as $k => $v) {
         self::$config[$k] = $v;
     }
     if (isset($GLOBALS['TAO_INITED'])) {
         return;
     }
     $GLOBALS['TAO_INITED'] = true;
     $cfgFile = \TAO::localDir('.config.php');
     if (is_file($cfgFile)) {
         $extraConfig = (include $cfgFile);
         self::$config = \TAO::mergeArgs(self::$config, $extraConfig);
     }
     self::initAdmin();
     if (self::$config['fs_pages']) {
         self::addBundle('FSPages');
     }
     if (self::$config['elements']) {
         self::addBundle('Elements');
     }
     \TAO\Auth::init();
     AddEventHandler("main", "OnBeforeProlog", function () {
     });
 }
Exemplo n.º 2
0
 public static function init()
 {
     $auth = new Auth();
     $auth->register();
 }