forked from ZF-Commons/ZfcUser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Module.php
97 lines (83 loc) · 3.44 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
86
87
88
89
90
91
92
93
94
95
96
97
<?php
namespace ZfcUser;
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\ServiceProviderInterface;
class Module implements
AutoloaderProviderInterface,
ConfigProviderInterface,
ServiceProviderInterface
{
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/autoload_classmap.php',
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
),
),
);
}
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',
),
);
}
public function getControllerConfig()
{
return array(
'factories' => array(
'zfcuser' => 'ZfcUser\Factory\Controller\UserControllerFactory',
),
);
}
public function getViewHelperConfig()
{
return array(
'factories' => array(
'zfcUserDisplayName' => 'ZfcUser\Factory\View\Helper\ZfcUserDisplayName',
'zfcUserIdentity' => 'ZfcUser\Factory\View\Helper\ZfcUserIdentity',
'zfcUserLoginWidget' => 'ZfcUser\Factory\View\Helper\ZfcUserLoginWidget',
),
);
}
public function getServiceConfig()
{
return array(
'aliases' => array(
'zfcuser_zend_db_adapter' => 'Zend\Db\Adapter\Adapter',
),
'invokables' => array(
'zfcuser_register_form_hydrator' => 'Zend\Stdlib\Hydrator\ClassMethods',
),
'factories' => array(
'zfcuser_redirect_callback' => 'ZfcUser\Factory\Controller\RedirectCallbackFactory',
'zfcuser_module_options' => 'ZfcUser\Factory\Options\ModuleOptions',
'ZfcUser\Authentication\Adapter\AdapterChain' => 'ZfcUser\Authentication\Adapter\AdapterChainServiceFactory',
// 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',
'zfcuser_user_hydrator' => 'ZfcUser\Factory\UserHydrator',
'zfcuser_user_mapper' => 'ZfcUser\Factory\Mapper\User',
'zfcuser_login_form' => 'ZfcUser\Factory\Form\Login',
'zfcuser_register_form' => 'ZfcUser\Factory\Form\Register',
'zfcuser_change_password_form' => 'ZfcUser\Factory\Form\ChangePassword',
'zfcuser_change_email_form' => 'ZfcUser\Factory\Form\ChangeEmail',
'ZfcUser\Authentication\Adapter\Db' => 'ZfcUser\Factory\Authentication\Adapter\DbFactory',
'ZfcUser\Authentication\Storage\Db' => 'ZfcUser\Factory\Authentication\Storage\DbFactory',
'zfcuser_user_service' => 'ZfcUser\Factory\Service\UserFactory',
),
);
}
}