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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* @see https://github.com/laminas/laminas-mvc-console for the canonical source repository
* @copyright https://github.com/laminas/laminas-mvc-console/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-mvc-console/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Mvc\Console;
use Laminas\Mvc\SendResponseListener;
use Laminas\Router\RouteStackInterface;
use Laminas\ServiceManager\Factory\InvokableFactory;
class ConfigProvider
{
/**
* Provide configuration for this component.
*
* @return array
*/
public function __invoke()
{
return [
'controller_plugins' => $this->getPluginConfig(),
'dependencies' => $this->getDependencyConfig(),
];
}
/**
* Provide dependency configuration for this component.
*
* @return array
*/
public function getDependencyConfig()
{
return [
'aliases' => [
'console' => 'ConsoleAdapter',
'Console' => 'ConsoleAdapter',
'ConsoleDefaultRenderingStrategy' => View\DefaultRenderingStrategy::class,
'ConsoleRenderer' => View\Renderer::class,
// Legacy Zend Framework aliases
\Zend\Mvc\Console\View\DefaultRenderingStrategy::class => View\DefaultRenderingStrategy::class,
\Zend\Mvc\Console\View\Renderer::class => View\Renderer::class,
],
'delegators' => [
'ControllerManager' => [ Service\ControllerManagerDelegatorFactory::class ],
'Request' => [ Service\ConsoleRequestDelegatorFactory::class ],
'Response' => [ Service\ConsoleResponseDelegatorFactory::class ],
RouteStackInterface::class => [ Router\ConsoleRouterDelegatorFactory::class ],
SendResponseListener::class => [ Service\ConsoleResponseSenderDelegatorFactory::class ],
'ViewHelperManager' => [ Service\ConsoleViewHelperManagerDelegatorFactory::class ],
'ViewManager' => [ Service\ViewManagerDelegatorFactory::class ],
],
'factories' => [
'ConsoleAdapter' => Service\ConsoleAdapterFactory::class,
'ConsoleExceptionStrategy' => Service\ConsoleExceptionStrategyFactory::class,
'ConsoleRouteNotFoundStrategy' => Service\ConsoleRouteNotFoundStrategyFactory::class,
'ConsoleRouter' => Router\ConsoleRouterFactory::class,
'ConsoleViewManager' => Service\ConsoleViewManagerFactory::class,
View\DefaultRenderingStrategy::class => Service\DefaultRenderingStrategyFactory::class,
View\Renderer::class => InvokableFactory::class,
],
];
}
/**
* Provide controller plugin configuration for this component.
*
* @return array
*/
public function getPluginConfig()
{
// @codingStandardsIgnoreStart
return [
'aliases' => [
'CreateConsoleNotFoundModel' => Controller\Plugin\CreateConsoleNotFoundModel::class,
'createConsoleNotFoundModel' => Controller\Plugin\CreateConsoleNotFoundModel::class,
'createconsolenotfoundmodel' => Controller\Plugin\CreateConsoleNotFoundModel::class,
'Laminas\Mvc\Controller\Plugin\CreateConsoleNotFoundModel::class' => Controller\Plugin\CreateConsoleNotFoundModel::class,
// Legacy Zend Framework aliases
'Zend\Mvc\Controller\Plugin\CreateConsoleNotFoundModel::class' => 'Laminas\Mvc\Controller\Plugin\CreateConsoleNotFoundModel::class',
\Zend\Mvc\Console\Controller\Plugin\CreateConsoleNotFoundModel::class => Controller\Plugin\CreateConsoleNotFoundModel::class,
],
'factories' => [
Controller\Plugin\CreateConsoleNotFoundModel::class => InvokableFactory::class,
],
];
// @codingStandardsIgnoreEnd
}
}