-
Notifications
You must be signed in to change notification settings - Fork 342
/
Module.php
85 lines (72 loc) · 3.21 KB
/
Module.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
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
<?php
namespace ZfcUser;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\ControllerPluginProviderInterface;
use Zend\ModuleManager\Feature\ControllerProviderInterface;
use Zend\ModuleManager\Feature\ServiceProviderInterface;
class Module implements
ControllerProviderInterface,
ControllerPluginProviderInterface,
ConfigProviderInterface,
ServiceProviderInterface
{
public function getConfig($env = null)
{
return include __DIR__ . '/config/module.config.php';
}
public function getControllerPluginConfig()
{
return array(
'factories' => array(
'zfcUserAuthentication' => \ZfcUser\Factory\Controller\Plugin\ZfcUserAuthentication::class,
),
);
}
public function getControllerConfig()
{
return array(
'factories' => array(
'zfcuser' => \ZfcUser\Factory\Controller\UserControllerFactory::class,
),
);
}
public function getViewHelperConfig()
{
return array(
'factories' => array(
'zfcUserDisplayName' => \ZfcUser\Factory\View\Helper\ZfcUserDisplayName::class,
'zfcUserIdentity' => \ZfcUser\Factory\View\Helper\ZfcUserIdentity::class,
'zfcUserLoginWidget' => \ZfcUser\Factory\View\Helper\ZfcUserLoginWidget::class,
),
);
}
public function getServiceConfig()
{
return array(
'aliases' => array(
'zfcuser_zend_db_adapter' => \Zend\Db\Adapter\Adapter::class,
),
'invokables' => array(
'zfcuser_register_form_hydrator' => \Zend\Hydrator\ClassMethods::class,
),
'factories' => array(
'zfcuser_redirect_callback' => \ZfcUser\Factory\Controller\RedirectCallbackFactory::class,
'zfcuser_module_options' => \ZfcUser\Factory\Options\ModuleOptions::class,
'ZfcUser\Authentication\Adapter\AdapterChain' => \ZfcUser\Authentication\Adapter\AdapterChainServiceFactory::class,
// We alias this one because it's ZfcUser's instance of
// Zend\Authentication\AuthenticationService. We don't want to
// hog the FQCN service alias for a Zend\* class.
'zfcuser_auth_service' => \ZfcUser\Factory\AuthenticationService::class,
'zfcuser_user_hydrator' => \ZfcUser\Factory\UserHydrator::class,
'zfcuser_user_mapper' => \ZfcUser\Factory\Mapper\User::class,
'zfcuser_login_form' => \ZfcUser\Factory\Form\Login::class,
'zfcuser_register_form' => \ZfcUser\Factory\Form\Register::class,
'zfcuser_change_password_form' => \ZfcUser\Factory\Form\ChangePassword::class,
'zfcuser_change_email_form' => \ZfcUser\Factory\Form\ChangeEmail::class,
'ZfcUser\Authentication\Adapter\Db' => \ZfcUser\Factory\Authentication\Adapter\DbFactory::class,
'ZfcUser\Authentication\Storage\Db' => \ZfcUser\Factory\Authentication\Storage\DbFactory::class,
'zfcuser_user_service' => \ZfcUser\Factory\Service\UserFactory::class,
),
);
}
}