Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • KmlBundle
      • Element
    • ManagerBundle
      • Controller
      • Form
        • DataTransformer
        • Type
    • MonitoringBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
      • Entity
      • EventListener
      • Form
    • PrintBundle
      • Component
      • Controller
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • Type
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Event
      • Form
        • EventListener
        • Type
    • WmtsBundle
      • Component
        • Exception
      • Controller
      • Entity
      • Form
        • Type
  • None
  • PHP

Classes

  • Configuration
  • MapbenderCoreExtension
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 1: <?php
 2: 
 3: namespace Mapbender\CoreBundle\DependencyInjection;
 4: 
 5: use Symfony\Component\Config\FileLocator;
 6: use Symfony\Component\DependencyInjection\ContainerBuilder;
 7: use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
 8: use Symfony\Component\HttpKernel\DependencyInjection\Extension;
 9: 
10: class MapbenderCoreExtension extends Extension {
11:     public function load(array $configs, ContainerBuilder $container) {
12:         $configuration = new Configuration();
13:         $config = $this->processConfiguration($configuration, $configs);
14: 
15:         $screenshot_path = $container->getParameter('kernel.root_dir')
16:             . '/../web/' . $config['screenshot_path'];
17:         $container->setParameter('mapbender.proxy', $config['proxy']);
18:         $container->setParameter('mapbender.screenshot_path', $screenshot_path);
19: 
20:         $container->setParameter("mapbender.selfregister", $config["selfregister"]);
21:         $container->setParameter("mapbender.max_registration_time", intval($config["max_registration_time"]));
22:         $container->setParameter("mapbender.max_reset_time", intval($config["max_reset_time"]));
23: 
24:         $now = new \DateTime('now');
25:         $container->setParameter("mapbender.cache_creation", $now->format('c'));
26: 
27:         $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
28:         $loader->load('services.xml');
29:     }
30: 
31:     public function getAlias() {
32:         return 'mapbender_core';
33:     }
34: }
35: 
36: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0