ConfigProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 46
rs 10
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 43 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Page;
6
7
use Zend\ServiceManager\Factory\InvokableFactory;
8
9
class ConfigProvider
10
{
11
    public function __invoke()
12
    {
13
        return [
14
            'templates' => [
15
                'map'   => [
16
                    'page/pagination' => __DIR__.'/../templates/partial/pagination.php',
17
                ],
18
                'paths' => [
19
                    'page' => [__DIR__.'/../templates/page'],
20
                ],
21
            ],
22
23
            'dependencies' => [
24
                'factories' => [
25
                    Controller\PageController::class => Controller\PageControllerFactory::class,
26
                    Service\PageService::class       => Service\PageServiceFactory::class,
27
                    Mapper\PageMapper::class         => Mapper\PageMapperFactory::class,
28
                    Filter\PageFilter::class         => InvokableFactory::class,
29
                ],
30
            ],
31
32
            'routes' => [
33
                [
34
                    'name'            => 'admin.pages',
35
                    'path'            => '/admin/pages',
36
                    'middleware'      => Controller\PageController::class,
37
                    'allowed_methods' => ['GET'],
38
                ],
39
                [
40
                    'name'            => 'admin.pages.action',
41
                    'path'            => '/admin/pages/{action}/{id}',
42
                    'middleware'      => Controller\PageController::class,
43
                    'allowed_methods' => ['GET', 'POST'],
44
                ],
45
            ],
46
47
            'view_helpers' => [
48
                'factories' => [
49
                    'page'  => View\Helper\PageHelperFactory::class,
50
                ],
51
            ],
52
        ];
53
    }
54
}
55