mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 12:33:45 +01:00
62 lines
1.2 KiB
PHP
62 lines
1.2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @package dev
|
|
* @author David Molineus <david.molineus@netzmacht.de>
|
|
* @copyright 2015 netzmacht creative David Molineus
|
|
* @license LGPL 3.0
|
|
* @filesource
|
|
*
|
|
*/
|
|
|
|
namespace Netzmacht\Contao\Leaflet;
|
|
|
|
use Netzmacht\Contao\Leaflet\Frontend\ValueFilter;
|
|
|
|
/**
|
|
* Class ServiceContainer provides the services which are available for Contao leaflet.
|
|
*
|
|
* @package Netzmacht\Contao\Leaflet
|
|
*/
|
|
class ServiceContainer
|
|
{
|
|
/**
|
|
* The global service container.
|
|
*
|
|
* @var \Pimple
|
|
*/
|
|
private $container;
|
|
|
|
/**
|
|
* Construct.
|
|
*
|
|
* @param \Pimple $container The global service container.
|
|
*/
|
|
public function __construct(\Pimple $container)
|
|
{
|
|
$this->container = $container;
|
|
}
|
|
|
|
/**
|
|
* Get the value filter service.
|
|
*
|
|
* @return ValueFilter
|
|
*/
|
|
public function getFrontendValueFilter()
|
|
{
|
|
return $this->getService('leaflet.frontend.value-filter');
|
|
}
|
|
|
|
/**
|
|
* Get a service from the container.
|
|
*
|
|
* @param string $name The service name.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getService($name)
|
|
{
|
|
return $this->container[$name];
|
|
}
|
|
}
|