コード例 #1
0
ファイル: tao.php プロジェクト: techart/bitrix.tao
 /**
  * @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 () {
     });
 }
コード例 #2
0
ファイル: auth.php プロジェクト: techart/bitrix.tao
 public static function init()
 {
     $auth = new Auth();
     $auth->register();
 }