本文整理汇总了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;
}
示例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;
}
示例3: setup
public function setup()
{
parent::setup();
$this->enablePlugins('sfI18NPlugin');
}
示例4: setup
public function setup()
{
parent::setup();
$this->enablePlugins('apostrophePlugin');
$this->enablePlugins('apostropheBlogPlugin');
}
示例5: setup
public function setup()
{
parent::setup();
$this->enablePlugins('sfAdminDashPlugin');
}