@@ -42,9 +42,9 @@ |
||
| 42 | 42 | $this->setApplicationKey($applicationKey); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * @param ContainerInterface $serviceManager |
|
| 47 | - */ |
|
| 45 | + /** |
|
| 46 | + * @param ContainerInterface $serviceManager |
|
| 47 | + */ |
|
| 48 | 48 | public function setServiceLocator(ContainerInterface $serviceManager) |
| 49 | 49 | { |
| 50 | 50 | $this->serviceManager = $serviceManager; |
@@ -51,8 +51,8 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function __invoke(AuthEvent $event) |
| 53 | 53 | { |
| 54 | - /* @TODO: [ZF3] $e->getUser() is not worked anymore we should using $e->getTarget()->getUser() */ |
|
| 55 | - $target = $event->getTarget(); |
|
| 54 | + /* @TODO: [ZF3] $e->getUser() is not worked anymore we should using $e->getTarget()->getUser() */ |
|
| 55 | + $target = $event->getTarget(); |
|
| 56 | 56 | $siteName = $this->coreOptions->getSiteName(); |
| 57 | 57 | /* @var \Auth\Entity\User $user */ |
| 58 | 58 | $user = $target->getUser(); |
@@ -22,15 +22,15 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | class ModuleOptionsFactory implements FactoryInterface |
| 24 | 24 | { |
| 25 | - /** |
|
| 26 | - * Create an ModuleOptions options |
|
| 27 | - * |
|
| 28 | - * @param ContainerInterface $container |
|
| 29 | - * @param string $requestedName |
|
| 30 | - * @param array|null $options |
|
| 31 | - * |
|
| 32 | - * @return ModuleOptions |
|
| 33 | - */ |
|
| 25 | + /** |
|
| 26 | + * Create an ModuleOptions options |
|
| 27 | + * |
|
| 28 | + * @param ContainerInterface $container |
|
| 29 | + * @param string $requestedName |
|
| 30 | + * @param array|null $options |
|
| 31 | + * |
|
| 32 | + * @return ModuleOptions |
|
| 33 | + */ |
|
| 34 | 34 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
| 35 | 35 | { |
| 36 | 36 | $config = $container->get('Config'); |
@@ -23,21 +23,21 @@ |
||
| 23 | 23 | class ExternalApplicationAdapterFactory implements FactoryInterface |
| 24 | 24 | { |
| 25 | 25 | |
| 26 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 27 | - { |
|
| 28 | - $repository = $container->get('repositories')->get('Auth/User'); |
|
| 29 | - $adapter = new ExternalApplication($repository); |
|
| 30 | - $adapter->setServiceLocator($container); |
|
| 31 | - $config = $container->get('Config'); |
|
| 32 | - if (isset($config['Auth']['external_applications']) && is_array($config['Auth']['external_applications'])) { |
|
| 33 | - $adapter->setApplicationKeys($config['Auth']['external_applications']); |
|
| 34 | - } |
|
| 26 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 27 | + { |
|
| 28 | + $repository = $container->get('repositories')->get('Auth/User'); |
|
| 29 | + $adapter = new ExternalApplication($repository); |
|
| 30 | + $adapter->setServiceLocator($container); |
|
| 31 | + $config = $container->get('Config'); |
|
| 32 | + if (isset($config['Auth']['external_applications']) && is_array($config['Auth']['external_applications'])) { |
|
| 33 | + $adapter->setApplicationKeys($config['Auth']['external_applications']); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - return $adapter; |
|
| 37 | - } |
|
| 36 | + return $adapter; |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | 39 | |
| 40 | - /** |
|
| 40 | + /** |
|
| 41 | 41 | * Creates an instance of \Auth\Adapter\ExternalApplication |
| 42 | 42 | * |
| 43 | 43 | * - injects the UserRepository fetched from the service manager. |
@@ -59,8 +59,8 @@ |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
| 62 | - $externalAdapter = $container->get('ExternalApplicationAdapter'); |
|
| 63 | - $repositories = $container->get('repositories'); |
|
| 62 | + $externalAdapter = $container->get('ExternalApplicationAdapter'); |
|
| 63 | + $repositories = $container->get('repositories'); |
|
| 64 | 64 | $controller = new IndexController($auth, $logger, $userLoginAdapter,$locale,$viewHelperManager,$forms, $options,$hybridAuthAdapter,$externalAdapter,$repositories); |
| 65 | 65 | return $controller; |
| 66 | 66 | } |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | { |
| 31 | 31 | /* @var $users \Auth\Repository\User */ |
| 32 | 32 | $users = $container->get('repositories')->get('Auth/User'); |
| 33 | - $formManager = $container->get('forms'); |
|
| 34 | - $viewHelper = $container->get('ViewHelperManager'); |
|
| 33 | + $formManager = $container->get('forms'); |
|
| 34 | + $viewHelper = $container->get('ViewHelperManager'); |
|
| 35 | 35 | return new UsersController($users,$formManager,$viewHelper); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -27,9 +27,9 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | private $service; |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @var LoggerInterface |
|
| 32 | - */ |
|
| 30 | + /** |
|
| 31 | + * @var LoggerInterface |
|
| 32 | + */ |
|
| 33 | 33 | private $logger; |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -36,24 +36,24 @@ |
||
| 36 | 36 | private $filterManager; |
| 37 | 37 | |
| 38 | 38 | public function __construct( |
| 39 | - $formManager, |
|
| 40 | - $repositories, |
|
| 41 | - $filterManager |
|
| 39 | + $formManager, |
|
| 40 | + $repositories, |
|
| 41 | + $filterManager |
|
| 42 | 42 | ) |
| 43 | 43 | { |
| 44 | - $this->formManager = $formManager; |
|
| 45 | - $this->repositories = $repositories; |
|
| 46 | - $this->filterManager = $filterManager; |
|
| 44 | + $this->formManager = $formManager; |
|
| 45 | + $this->repositories = $repositories; |
|
| 46 | + $this->filterManager = $filterManager; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - static public function factory(ContainerInterface $container) |
|
| 50 | - { |
|
| 51 | - return new self( |
|
| 52 | - $container->get('FormElementManager'), |
|
| 53 | - $container->get('repositories'), |
|
| 54 | - $container->get('FilterManager') |
|
| 55 | - ); |
|
| 56 | - } |
|
| 49 | + static public function factory(ContainerInterface $container) |
|
| 50 | + { |
|
| 51 | + return new self( |
|
| 52 | + $container->get('FormElementManager'), |
|
| 53 | + $container->get('repositories'), |
|
| 54 | + $container->get('FilterManager') |
|
| 55 | + ); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * Register the default events for this controller |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | class SocialProfiles extends AbstractPlugin |
| 18 | 18 | { |
| 19 | - protected $hybridAuth; |
|
| 19 | + protected $hybridAuth; |
|
| 20 | 20 | |
| 21 | 21 | protected $adapterMap = array( |
| 22 | 22 | 'facebook' => '\\Auth\\Controller\\Plugin\\SocialProfiles\\Facebook', |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | ); |
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @var RequestInterface |
|
| 30 | - */ |
|
| 28 | + /** |
|
| 29 | + * @var RequestInterface |
|
| 30 | + */ |
|
| 31 | 31 | protected $request; |
| 32 | 32 | |
| 33 | 33 | public function __construct($hybridAuth,RequestInterface $request,array $adapters = array()) |