本文整理匯總了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);
}