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