Completed
Push — 3.x ( b13c7c )
by Daniel
07:33
created

Module   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 76
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfig() 0 4 1
A getControllerPluginConfig() 0 8 1
A getControllerConfig() 0 8 1
A getViewHelperConfig() 0 11 1
B getServiceConfig() 0 34 1
1
<?php
2
3
namespace ZfcUser;
4
5
use Zend\ModuleManager\Feature\ConfigProviderInterface;
6
use Zend\ModuleManager\Feature\ControllerPluginProviderInterface;
7
use Zend\ModuleManager\Feature\ControllerProviderInterface;
8
use Zend\ModuleManager\Feature\ServiceProviderInterface;
9
10
class Module implements
11
    ControllerProviderInterface,
12
    ControllerPluginProviderInterface,
13
    ConfigProviderInterface,
14
    ServiceProviderInterface
15
{
16
    public function getConfig($env = null)
17
    {
18
        return include __DIR__ . '/config/module.config.php';
19
    }
20
21
    public function getControllerPluginConfig()
22
    {
23
        return array(
24
            'factories' => array(
25
                'zfcUserAuthentication' => \ZfcUser\Factory\Controller\Plugin\ZfcUserAuthentication::class,
26
            ),
27
        );
28
    }
29
30
    public function getControllerConfig()
31
    {
32
        return array(
33
            'factories' => array(
34
                'zfcuser' => \ZfcUser\Factory\Controller\UserControllerFactory::class,
35
            ),
36
        );
37
    }
38
39
    public function getViewHelperConfig()
40
    {
41
        return array(
42
            'factories' => array(
43
                'zfcUserDisplayName' => \ZfcUser\Factory\View\Helper\ZfcUserDisplayName::class,
44
                'zfcUserIdentity' => \ZfcUser\Factory\View\Helper\ZfcUserIdentity::class,
45
                'zfcUserLoginWidget' => \ZfcUser\Factory\View\Helper\ZfcUserLoginWidget::class,
46
            ),
47
        );
48
49
    }
50
51
    public function getServiceConfig()
52
    {
53
        return array(
54
            'aliases' => array(
55
                'zfcuser_zend_db_adapter' => \Zend\Db\Adapter\Adapter::class,
56
            ),
57
            'invokables' => array(
58
                'zfcuser_register_form_hydrator' => \Zend\Hydrator\ClassMethods::class,
59
            ),
60
            'factories' => array(
61
                'zfcuser_redirect_callback' => \ZfcUser\Factory\Controller\RedirectCallbackFactory::class,
62
                'zfcuser_module_options' => \ZfcUser\Factory\Options\ModuleOptions::class,
63
                'ZfcUser\Authentication\Adapter\AdapterChain' => \ZfcUser\Authentication\Adapter\AdapterChainServiceFactory::class,
64
65
                // We alias this one because it's ZfcUser's instance of
66
                // Zend\Authentication\AuthenticationService. We don't want to
67
                // hog the FQCN service alias for a Zend\* class.
68
                'zfcuser_auth_service' => \ZfcUser\Factory\AuthenticationService::class,
69
70
                'zfcuser_user_hydrator' => \ZfcUser\Factory\UserHydrator::class,
71
                'zfcuser_user_mapper' => \ZfcUser\Factory\Mapper\User::class,
72
73
                'zfcuser_login_form' => \ZfcUser\Factory\Form\Login::class,
74
                'zfcuser_register_form' => \ZfcUser\Factory\Form\Register::class,
75
                'zfcuser_change_password_form' => \ZfcUser\Factory\Form\ChangePassword::class,
76
                'zfcuser_change_email_form' => \ZfcUser\Factory\Form\ChangeEmail::class,
77
78
                'ZfcUser\Authentication\Adapter\Db' => \ZfcUser\Factory\Authentication\Adapter\DbFactory::class,
79
                'ZfcUser\Authentication\Storage\Db' => \ZfcUser\Factory\Authentication\Storage\DbFactory::class,
80
81
                'zfcuser_user_service' => \ZfcUser\Factory\Service\UserFactory::class,
82
            ),
83
        );
84
    }
85
}
86