Introduce service names constants.

This commit is contained in:
David Molineus
2016-10-05 15:30:55 +02:00
parent 436cf88901
commit 971f905ad2
11 changed files with 138 additions and 38 deletions

View File

@@ -10,7 +10,14 @@
namespace Netzmacht\Contao\Leaflet\DependencyInjection;
use Netzmacht\Contao\Leaflet\Boot;
use Netzmacht\Contao\Leaflet\Frontend\ValueFilter;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\MapProvider;
use Netzmacht\Contao\Toolkit\Data\Alias\AliasGenerator;
use Netzmacht\LeafletPHP\Assets;
use Netzmacht\LeafletPHP\Leaflet;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class LeafletServices describes services provided by the leaflet package.
@@ -19,6 +26,62 @@ use Netzmacht\Contao\Leaflet\Frontend\ValueFilter;
*/
class LeafletServices
{
/**
* Service name for the alias generator which creates valid js aliases.
*
* @return AliasGenerator
*/
const ALIAS_GENERATOR = 'leaflet.alias-generator';
/**
* Service name of the boot handler.
*
* @return Boot
*/
const BOOT = 'leaflet.boot';
/**
* Service name of the definition builder.
*
* @return Leaflet
*/
const DEFINITION_BUILDER = 'leaflet.definition.builder';
/**
* Service name of the encoder factory used inside of the definition builder.
*
* @return \callable
*/
const DEFINITION_ENCODER_FACTORY = 'leaflet.definition.builder.encoder-factory';
/**
* Service name of the internal used event dispatcher of the definition builder.
*
* @return EventDispatcherInterface
*/
const DEFINITION_BUILDER_EVENT_DISPATCHER = 'leaflet.definition.builder.event-dispatcher';
/**
* Service name of the definition mapper.
*
* @return DefinitionMapper
*/
const DEFINITION_MAPPER = 'leaflet.definition.mapper';
/**
* Service name of the leaflet map provider.
*
* @return MapProvider
*/
const MAP_PROVIDER = 'leaflet.map.provider';
/**
* Service name of the map assets handler.
*
* @return Assets
*/
const MAP_ASSETS = 'leaflet.map.assets';
/**
* Service name of the frontend value filter.
*