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; + } }