本文整理汇总了PHP中Symfony\Component\DependencyInjection\Container::initialized方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::initialized方法的具体用法?PHP Container::initialized怎么用?PHP Container::initialized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\DependencyInjection\Container
的用法示例。
在下文中一共展示了Container::initialized方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testWarmup
public function testWarmup()
{
$container = new Container();
$container->set('ezpublish.config.resolver.core', new stdClass());
$container->set('ezpublish.config.resolver.chain', new stdClass());
self::assertTrue($container->initialized('ezpublish.config.resolver.core'));
self::assertTrue($container->initialized('ezpublish.config.resolver.chain'));
$warmer = new ConfigResolverCleanup();
$warmer->setContainer($container);
$warmer->warmUp('my_cache_dir');
self::assertFalse($container->initialized('ezpublish.config.resolver.core'));
self::assertFalse($container->initialized('ezpublish.config.resolver.chain'));
}
示例2: initialized
/**
* {@inheritdoc}
*/
public function initialized($id)
{
if (array_key_exists($id, $this->mocked)) {
return true;
}
return parent::initialized($id);
}