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, 天空...