-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmodule.config.php
More file actions
71 lines (59 loc) · 1.9 KB
/
module.config.php
File metadata and controls
71 lines (59 loc) · 1.9 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
namespace ErrorHeroModule;
use ErrorHeroModule\Command\BaseLoggingCommandInitializer;
use ErrorHeroModule\Command\Preview\ErrorPreviewConsoleCommand;
use ErrorHeroModule\Controller\ErrorPreviewController;
use ErrorHeroModule\Listener\Mvc;
use ErrorHeroModule\Listener\MvcFactory;
use ErrorHeroModule\Handler\Logging;
use ErrorHeroModule\Handler\LoggingFactory;
use Laminas\ServiceManager\Factory\InvokableFactory;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
return [
'controllers' => [
'factories' => [
ErrorPreviewController::class => InvokableFactory::class,
],
],
'router' => [
'routes' => [
'error-preview' => [
'type' => 'Segment',
'options' => [
'route' => '/error-preview[/][:action]',
'defaults' => [
'controller' => ErrorPreviewController::class,
'action' => 'exception',
],
],
],
],
],
'service_manager' => [
'abstract_factories' => [
],
'factories' => [
Mvc::class => MvcFactory::class,
Logging::class => LoggingFactory::class,
ErrorPreviewConsoleCommand::class => InvokableFactory::class,
'ErrorHeroModuleLogger' => fn (): LoggerInterface => new \Monolog\Logger('error-hero-module'),
],
'initializers' => [
BaseLoggingCommandInitializer::class,
],
],
'listeners' => [
Mvc::class,
],
'laminas-cli' => [
'commands' => [
'errorheromodule:preview' => ErrorPreviewConsoleCommand::class,
],
],
'view_manager' => [
'template_map' => [
'error-hero-module/error-default' => __DIR__.'/../view/error-hero-module/error-default.phtml',
],
],
];