|
1
|
|
|
<?php |
|
2
|
|
|
/* |
|
3
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
4
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
5
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
6
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
7
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
8
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
9
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
10
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
11
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
12
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
13
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
14
|
|
|
* |
|
15
|
|
|
* This software consists of voluntary contributions made by many individuals |
|
16
|
|
|
* and is licensed under the MIT license. |
|
17
|
|
|
*/ |
|
18
|
|
|
|
|
19
|
|
|
namespace ZfcUser; |
|
20
|
|
|
|
|
21
|
|
|
use Zend\ModuleManager\Feature\AutoloaderProviderInterface; |
|
22
|
|
|
|
|
23
|
|
|
class Module implements |
|
24
|
|
|
AutoloaderProviderInterface |
|
25
|
|
|
{ |
|
26
|
|
|
public function getAutoloaderConfig() |
|
27
|
|
|
{ |
|
28
|
|
|
return array( |
|
29
|
|
|
'Zend\Loader\StandardAutoloader' => array( |
|
30
|
|
|
'namespaces' => array( |
|
31
|
|
|
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
32
|
|
|
), |
|
33
|
|
|
), |
|
34
|
|
|
); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
public function getConfig() |
|
38
|
|
|
{ |
|
39
|
|
|
return include __DIR__ . '/config/module.config.php'; |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
public function getControllerPluginConfig() |
|
43
|
|
|
{ |
|
44
|
|
|
return array( |
|
45
|
|
|
'factories' => array( |
|
46
|
|
|
'zfcUserAuthentication' => 'ZfcUser\Factory\Controller\Plugin\ZfcUserAuthenticationFactory', |
|
47
|
|
|
), |
|
48
|
|
|
); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function getViewHelperConfig() |
|
52
|
|
|
{ |
|
53
|
|
|
return array( |
|
54
|
|
|
'factories' => array( |
|
55
|
|
|
'zfcUserDisplayName' => 'ZfcUser\Factory\View\Helper\DisplayNameFactory', |
|
56
|
|
|
'zfcUserIdentity' => 'ZfcUser\Factory\View\Helper\IdentityFactory', |
|
57
|
|
|
'zfcUserLoginWidget' => 'ZfcUser\Factory\View\Helper\LoginWidgetFactory', |
|
58
|
|
|
), |
|
59
|
|
|
); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
public function getServiceConfig() |
|
63
|
|
|
{ |
|
64
|
|
|
return array( |
|
65
|
|
|
'invokables' => array( |
|
66
|
|
|
'ZfcUser\Authentication\Adapter\Db' => 'ZfcUser\Authentication\Adapter\Db', |
|
67
|
|
|
'ZfcUser\Authentication\Storage\Db' => 'ZfcUser\Authentication\Storage\Db', |
|
68
|
|
|
'ZfcUser\Form\Login' => 'ZfcUser\Form\Login', |
|
69
|
|
|
'zfcuser_user_service' => 'ZfcUser\Service\User', |
|
70
|
|
|
), |
|
71
|
|
|
'factories' => array( |
|
72
|
|
|
'zfcuser_module_options' => 'ZfcUser\Factory\ModuleOptionsFactory', |
|
73
|
|
|
'zfcuser_auth_service' => 'ZfcUser\Factory\AuthenticationServiceFactory', |
|
74
|
|
|
'ZfcUser\Authentication\Adapter\AdapterChain' => 'ZfcUser\Authentication\Adapter\AdapterChainServiceFactory', |
|
75
|
|
|
'zfcuser_login_form' => 'ZfcUser\Factory\Form\LoginFormFactory', |
|
76
|
|
|
'zfcuser_register_form' => 'ZfcUser\Factory\Form\RegisterFormFactory', |
|
77
|
|
|
'zfcuser_user_mapper' => 'ZfcUser\Factory\UserMapperFactory', |
|
78
|
|
|
'zfcuser_user_hydrator' => 'ZfcUser\Factory\Mapper\UserHydratorFactory', |
|
79
|
|
|
), |
|
80
|
|
|
'aliases' => array( |
|
81
|
|
|
'zfcuser_register_form_hydrator' => 'zfcuser_user_hydrator' |
|
82
|
|
|
), |
|
83
|
|
|
); |
|
84
|
|
|
} |
|
85
|
|
|
} |
|
86
|
|
|
|