当前位置: 首页>>代码示例>>PHP>>正文


PHP Flux::parseConfigFile方法代码示例

本文整理汇总了PHP中Flux::parseConfigFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Flux::parseConfigFile方法的具体用法?PHP Flux::parseConfigFile怎么用?PHP Flux::parseConfigFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Flux的用法示例。


在下文中一共展示了Flux::parseConfigFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($name, $addonDir = null)
 {
     $this->name = $name;
     $this->addonDir = is_null($addonDir) ? FLUX_ADDON_DIR . "/{$name}" : $addonDir;
     $this->configDir = "{$this->addonDir}/config";
     $this->moduleDir = "{$this->addonDir}/modules";
     $this->themeDir = "{$this->addonDir}/themes/" . Flux::config('ThemeName');
     $files = array('addonConfig' => "{$this->configDir}/addon.php", 'accessConfig' => "{$this->configDir}/access.php");
     foreach ($files as $configName => $filename) {
         if (file_exists($filename)) {
             $this->{$configName} = Flux::parseConfigFile($filename);
         }
         if (!$this->{$configName} instanceof Flux_Config) {
             $tempArr = array();
             $this->{$configName} = new Flux_Config($tempArr);
         }
     }
     // Use new language system for messages (also supports addons).
     $this->messagesConfig = Flux::parseLanguageConfigFile($name);
 }
开发者ID:rahuldev345,项目名称:fluxcp,代码行数:20,代码来源:Addon.php

示例2: session_set_cookie_params

    if ($hasUpdates = $installer->updateNeeded()) {
        Flux::config('ThemeName', 'installer');
    }
    $sessionKey = Flux::config('SessionKey');
    $sessionExpireDuration = Flux::config('SessionCookieExpire') * 60 * 60;
    session_set_cookie_params($sessionExpireDuration, Flux::config('BaseURI'));
    ini_set('session.gc_maxlifetime', $sessionExpireDuration);
    ini_set('session.name', $sessionKey);
    @session_start();
    if (empty($_SESSION[$sessionKey]) || !is_array($_SESSION[$sessionKey])) {
        $_SESSION[$sessionKey] = array();
    }
    // Initialize session data.
    Flux::$sessionData = new Flux_SessionData($_SESSION[$sessionKey], $hasUpdates);
    // Initialize authorization component.
    $accessConfig = Flux::parseConfigFile(FLUX_CONFIG_DIR . '/access.php');
    // Merge with add-on configs.
    foreach (Flux::$addons as $addon) {
        $accessConfig->merge($addon->accessConfig);
    }
    $accessConfig->set('unauthorized.index', AccountLevel::ANYONE);
    $authComponent = Flux_Authorization::getInstance($accessConfig, Flux::$sessionData);
    if (!Flux::config('DebugMode')) {
        ini_set('display_errors', 0);
    }
    // Dispatch requests->modules->actions->views.
    $dispatcher = Flux_Dispatcher::getInstance();
    $dispatcher->setDefaultModule(Flux::config('DefaultModule'));
    $dispatcher->dispatch(array('basePath' => Flux::config('BaseURI'), 'useCleanUrls' => Flux::config('UseCleanUrls'), 'modulePath' => FLUX_MODULE_DIR, 'themePath' => FLUX_THEME_DIR, 'themeName' => Flux::$sessionData->theme, 'missingActionModuleAction' => Flux::config('DebugMode') ? array('errors', 'missing_action') : array('main', 'page_not_found'), 'missingViewModuleAction' => Flux::config('DebugMode') ? array('errors', 'missing_view') : array('main', 'page_not_found')));
} catch (Exception $e) {
    $exceptionDir = FLUX_DATA_DIR . '/logs/errors/exceptions';
开发者ID:AcidSlide,项目名称:FluxCP,代码行数:31,代码来源:index.php


注:本文中的Flux::parseConfigFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。