vendor/gpslab/geoip2/src/GpsLabGeoIP2Bundle.php line 15

Open in your IDE?
  1. <?php
  2. /**
  3.  * GpsLab component.
  4.  *
  5.  * @author    Peter Gribanov <info@peter-gribanov.ru>
  6.  * @copyright Copyright (c) 2017, Peter Gribanov
  7.  * @license   http://opensource.org/licenses/MIT
  8.  */
  9. namespace GpsLab\Bundle\GeoIP2Bundle;
  10. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  11. use Symfony\Component\HttpKernel\Bundle\Bundle;
  12. class GpsLabGeoIP2Bundle extends Bundle
  13. {
  14.     /**
  15.      * @return ExtensionInterface|null
  16.      */
  17.     public function getContainerExtension()
  18.     {
  19.         if (null === $this->extension) {
  20.             $this->extension false;
  21.             $class $this->getContainerExtensionClass();
  22.             if (class_exists($class)) {
  23.                 $extension = new $class();
  24.                 if ($extension instanceof ExtensionInterface) {
  25.                     $this->extension $extension;
  26.                 }
  27.             }
  28.         }
  29.         return $this->extension ?: null;
  30.     }
  31. }