1
doctrine:
orm:
metadata_cache_driver:
type: xcache
namespace: %foobar%
嗨,我想通过参数像%foobar%设置教义缓存命名空间。参数%FOOBAR%将通过compilerPassSymfony 2:Doctrine缓存命名空间
class FoobarCompiler implements CompilerPassInterface {
public function process(ContainerBuilder $container) {
$container->setParameter('foobar', uniqid());
}
}
这compilerPass IST寄存器中捆绑类通过设置:
public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container) {
$container->addCompilerPass(new \FQNS\Compiler\FoobarCompiler());
}
,但我得到这个错误:
[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException] You have requested a non-existent parameter "foobar".
任何想法如何我可以通过这个参数“foobar”设置教义缓存命名空间吗?
greez & THX, 天空...