From 04968a56383a8d0ca03c87f895f052205724db69 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Tue, 24 Jan 2017 19:10:58 +0300 Subject: [PATCH] change load container extension --- src/GpsLabGeoIP2Bundle.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/GpsLabGeoIP2Bundle.php b/src/GpsLabGeoIP2Bundle.php index 15bdd28..e8ad334 100644 --- a/src/GpsLabGeoIP2Bundle.php +++ b/src/GpsLabGeoIP2Bundle.php @@ -9,8 +9,26 @@ namespace GpsLab\Bundle\GeoIP2Bundle; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; class GpsLabGeoIP2Bundle extends Bundle { + /** + * @return ExtensionInterface|bool + */ + public function getContainerExtension() + { + if (null === $this->extension) { + $extension = $this->createContainerExtension(); + + if ($extension instanceof ExtensionInterface) { + $this->extension = $extension; + } else { + $this->extension = false; + } + } + + return $this->extension; + } }