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


PHP sfApplicationConfiguration::setup方法代码示例

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


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

示例1: setup

 public function setup()
 {
     require_once dirname(__FILE__) . '/../config/opSecurityConfigHandler.class.php';
     $DS = DIRECTORY_SEPARATOR;
     $OpenPNE2Path = sfConfig::get('sf_lib_dir') . $DS . 'vendor' . $DS;
     // ##PROJECT_LIB_DIR##/vendor/
     set_include_path($OpenPNE2Path . PATH_SEPARATOR . get_include_path());
     $result = parent::setup();
     if (0 !== strpos(sfConfig::get('sf_task_name'), 'sfDoctrineBuild')) {
         $configCache = $this->getConfigCache();
         $file = $configCache->checkConfig('data/config/plugin.yml', true);
         if ($file) {
             include $file;
         }
         require_once dirname(__FILE__) . '/../plugin/opPluginManager.class.php';
         $pluginActivations = opPluginManager::getPluginActivationList();
         $pluginActivations = array_merge(array_fill_keys($this->getPlugins(), true), $pluginActivations);
         foreach ($pluginActivations as $key => $value) {
             if (!in_array($key, $this->getPlugins())) {
                 unset($pluginActivations[$key]);
             }
         }
         $pluginActivations = $this->filterSkinPlugins($pluginActivations);
         $this->enablePlugins(array_keys($pluginActivations, true));
         $this->disablePlugins(array_keys($pluginActivations, false));
         unset($this->cache['getPluginPaths']);
         // it should be rewrited
         $this->plugins = array_unique($this->plugins);
     }
     return $result;
 }
开发者ID:niryuu,项目名称:OpenPNE3,代码行数:31,代码来源:opApplicationConfiguration.class.php

示例2: setup

 public function setup()
 {
     require_once dirname(__FILE__) . '/../config/opSecurityConfigHandler.class.php';
     $DS = DIRECTORY_SEPARATOR;
     $OpenPNE2Path = sfConfig::get('sf_lib_dir') . $DS . 'vendor' . $DS;
     // ##PROJECT_LIB_DIR##/vendor/
     set_include_path($OpenPNE2Path . PATH_SEPARATOR . get_include_path());
     $result = parent::setup();
     $configCache = $this->getConfigCache();
     $file = $configCache->checkConfig('data/config/plugin.yml', true);
     if ($file) {
         include $file;
     }
     require_once dirname(__FILE__) . '/../plugin/opPluginManager.class.php';
     $pluginActivations = opPluginManager::getPluginActivationList();
     $pluginActivations = array_merge(array_fill_keys($this->getPlugins(), true), $pluginActivations);
     foreach ($pluginActivations as $key => $value) {
         if (!in_array($key, $this->getPlugins())) {
             unset($pluginActivations[$key]);
         }
     }
     $pluginActivations = $this->filterSkinPlugins($pluginActivations);
     $this->enablePlugins(array_keys($pluginActivations, true));
     $this->disablePlugins(array_keys($pluginActivations, false));
     unset($this->cache['getPluginPaths']);
     // it should be rewrited
     $this->plugins = array_unique($this->plugins);
     // gadget
     include $this->getConfigCache()->checkConfig('config/gadget_layout_config.yml');
     include $this->getConfigCache()->checkConfig('config/gadget_config.yml');
     require_once sfConfig::get('sf_lib_dir') . '/config/opGadgetConfigHandler.class.php';
     $gadgetConfigs = sfConfig::get('op_gadget_config', array());
     foreach ($gadgetConfigs as $key => $config) {
         $filename = 'config/' . sfInflector::underscore($key);
         $params = array();
         if ($key != 'gadget') {
             $filename .= '_gadget';
             $params['prefix'] = sfInflector::underscore($key) . '_';
         }
         $filename .= '.yml';
         $this->getConfigCache()->registerConfigHandler($filename, 'opGadgetConfigHandler', $params);
         include $this->getConfigCache()->checkConfig($filename);
     }
     return $result;
 }
开发者ID:TadahiroKudo,项目名称:OpenPNE3,代码行数:45,代码来源:opApplicationConfiguration.class.php

示例3: setup

 public function setup()
 {
     parent::setup();
     $this->enablePlugins('sfI18NPlugin');
 }
开发者ID:Phennim,项目名称:symfony1,代码行数:5,代码来源:i18nConfiguration.class.php

示例4: setup

 public function setup()
 {
     parent::setup();
     $this->enablePlugins('apostrophePlugin');
     $this->enablePlugins('apostropheBlogPlugin');
 }
开发者ID:quafzi,项目名称:timpany-prototype,代码行数:6,代码来源:frontendConfiguration.class.php

示例5: setup

 public function setup()
 {
   parent::setup();
   $this->enablePlugins('sfAdminDashPlugin');
 }
开发者ID:romankallweit,项目名称:swingmachine,代码行数:5,代码来源:backendConfiguration.class.php


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