-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigProvider.php
37 lines (33 loc) · 1.07 KB
/
ConfigProvider.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Schranz\Templating\Integration\Mezzio\Mustache;
use Mustache_Engine;
use Schranz\Templating\Adapter\Mustache\MustacheRenderer;
use Schranz\Templating\TemplateRenderer\TemplateRendererInterface;
class ConfigProvider
{
public function __invoke(): array
{
return [
'dependencies' => $this->getDependencies(),
'mustache' => [
'path' => null,
'cache_dir' => null,
],
];
}
public function getDependencies(): array
{
return [
'aliases' => [
TemplateRendererInterface::class => MustacheRenderer::class,
MustacheRenderer::class => 'schranz_templating.renderer.mustache',
Mustache_Engine::class => 'mustache',
],
'factories' => [
'mustache.filesystem_loader' => MustacheLoaderFactory::class,
'mustache' => MustacheFactory::class,
'schranz_templating.renderer.mustache' => MustacheRendererFactory::class,
],
];
}
}