我想让 symfony 使用我自己的 sfConfigCache.class.php,但是我不知道如何修改自动加载器数组中的默认路径。或者还有其他方法可以告诉 symfony 使用我的课程吗?
问问题
156 次
2 回答
1
您可能会发现这很有帮助。
说明如何自定义 configCache。
于 2011-02-02T15:48:54.173 回答
0
我扩展了 sfApplicationConfiguration:
myproject/apps/frontend/lib/sfApplicationConfigurationExtended .class.php
class sfApplicationConfigurationExtended extends sfApplicationConfiguration
{
public function getConfigCache()
{
if (null === $this->configCache)
{
$this->configCache = new sfConfigBlobCache($this);
}
return $this->configCache;
}
}
myproject/apps/frontend/config/frontendConfiguration.class.php
class frontendConfiguration extends sfApplicationConfiguration #sfApplicationConfigurationExtended // For config blob caching
{
public function configure()
{
}
}
于 2012-01-26T09:30:00.480 回答