Fix encoder initialisation after.

This commit is contained in:
David Molineus
2015-01-13 13:44:07 +01:00
parent 9716bd9b74
commit 2d1dadbefc

View File

@@ -14,6 +14,7 @@ use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\MapService; use Netzmacht\Contao\Leaflet\MapService;
use Netzmacht\Javascript\Builder; use Netzmacht\Javascript\Builder;
use Netzmacht\Javascript\Encoder; use Netzmacht\Javascript\Encoder;
use Netzmacht\Javascript\Output;
use Netzmacht\LeafletPHP\Leaflet; use Netzmacht\LeafletPHP\Leaflet;
use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcher;
@@ -73,7 +74,7 @@ $container['leaflet.definition.builder'] = $container->share(function($container
$boot = $container['leaflet.boot']; $boot = $container['leaflet.boot'];
$dispatcher = $container['leaflet.definition.builder.event-dispatcher']; $dispatcher = $container['leaflet.definition.builder.event-dispatcher'];
$encoder = new Encoder($dispatcher, JSON_UNESCAPED_SLASHES); $encoder = new Encoder($dispatcher, new Output(), JSON_UNESCAPED_SLASHES);
$builder = new Builder($encoder, $dispatcher); $builder = new Builder($encoder, $dispatcher);
$leaflet = new Leaflet($builder); $leaflet = new Leaflet($builder);