From bfddac3170c3d4cd4a0795940e2bb6a6a6a423c3 Mon Sep 17 00:00:00 2001 From: Lorenz Schori Date: Thu, 23 Jul 2015 12:18:12 +0200 Subject: [PATCH] [DependencyInjection] Add initialized() to the ContainerInterface --- .../Component/DependencyInjection/Container.php | 2 +- .../DependencyInjection/ContainerInterface.php | 9 +++++++++ .../IntrospectableContainerInterface.php | 11 +++-------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 2d9732b1c1ab..55906725e2c0 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -61,7 +61,7 @@ * * @api */ -class Container implements IntrospectableContainerInterface, ResettableContainerInterface +class Container implements ResettableContainerInterface { /** * @var ParameterBagInterface diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/src/Symfony/Component/DependencyInjection/ContainerInterface.php index 39683a6d6675..e610f43f1b87 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/ContainerInterface.php @@ -72,6 +72,15 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE */ public function has($id); + /** + * Check for whether or not a service has been initialized. + * + * @param string $id + * + * @return bool true if the service has been initialized, false otherwise + */ + public function initialized($id); + /** * Gets a parameter. * diff --git a/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php b/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php index e630a1edc656..36213b3db9e6 100644 --- a/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php +++ b/src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php @@ -16,15 +16,10 @@ * for containers, allowing logic to be implemented based on a Container's state. * * @author Evan Villemez + * + * @deprecated Since version 3.0, to be removed in 4.0. Use ContainerInterface + * instead. */ interface IntrospectableContainerInterface extends ContainerInterface { - /** - * Check for whether or not a service has been initialized. - * - * @param string $id - * - * @return bool true if the service has been initialized, false otherwise - */ - public function initialized($id); }