@@ -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. |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | class ExternalApplicationAdapterFactory implements FactoryInterface |
| 24 | 24 | { |
| 25 | 25 | |
| 26 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 26 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 27 | 27 | { |
| 28 | 28 | $repository = $container->get('repositories')->get('Auth/User'); |
| 29 | 29 | $adapter = new ExternalApplication($repository); |
@@ -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 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
| 62 | 62 | $externalAdapter = $container->get('ExternalApplicationAdapter'); |
| 63 | 63 | $repositories = $container->get('repositories'); |
| 64 | - $controller = new IndexController($auth, $logger, $userLoginAdapter,$locale,$viewHelperManager,$forms, $options,$hybridAuthAdapter,$externalAdapter,$repositories); |
|
| 64 | + $controller = new IndexController($auth, $logger, $userLoginAdapter, $locale, $viewHelperManager, $forms, $options, $hybridAuthAdapter, $externalAdapter, $repositories); |
|
| 65 | 65 | return $controller; |
| 66 | 66 | } |
| 67 | 67 | /** |
@@ -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 | } |
@@ -32,6 +32,6 @@ |
||
| 32 | 32 | $users = $container->get('repositories')->get('Auth/User'); |
| 33 | 33 | $formManager = $container->get('forms'); |
| 34 | 34 | $viewHelper = $container->get('ViewHelperManager'); |
| 35 | - return new UsersController($users,$formManager,$viewHelper); |
|
| 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 |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | $events->attach( |
| 77 | 77 | MvcEvent::EVENT_DISPATCH, |
| 78 | - function ($event) { |
|
| 78 | + function($event) { |
|
| 79 | 79 | $routeMatch = $event->getRouteMatch(); |
| 80 | 80 | $action = $routeMatch->getParam('action'); |
| 81 | 81 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | $events->attach( |
| 97 | 97 | MvcEvent::EVENT_DISPATCH, |
| 98 | - function ($event) { |
|
| 98 | + function($event) { |
|
| 99 | 99 | $model = $event->getResult(); |
| 100 | 100 | if (!$model instanceof ViewModel || $model->terminate()) { |
| 101 | 101 | return; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $users = $repository->findByQuery($query); |
| 224 | 224 | |
| 225 | 225 | $userFilter = $this->filterManager->get('Auth/Entity/UserToSearchResult'); |
| 226 | - $filterFunc = function ($user) use ($userFilter) { |
|
| 226 | + $filterFunc = function($user) use ($userFilter) { |
|
| 227 | 227 | return $userFilter->filter($user); |
| 228 | 228 | }; |
| 229 | 229 | $result = array_values(array_map($filterFunc, $users->toArray())); |
@@ -16,12 +16,12 @@ |
||
| 16 | 16 | |
| 17 | 17 | class SocialProfilesFactory implements FactoryInterface |
| 18 | 18 | { |
| 19 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 20 | - { |
|
| 21 | - $request = $container->get('request'); |
|
| 22 | - $hybridAuth = $container->get('HybridAuth'); |
|
| 23 | - $plugin = new SocialProfiles($hybridAuth,$request); |
|
| 19 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 20 | + { |
|
| 21 | + $request = $container->get('request'); |
|
| 22 | + $hybridAuth = $container->get('HybridAuth'); |
|
| 23 | + $plugin = new SocialProfiles($hybridAuth,$request); |
|
| 24 | 24 | |
| 25 | - return $plugin; |
|
| 26 | - } |
|
| 25 | + return $plugin; |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -16,11 +16,11 @@ |
||
| 16 | 16 | |
| 17 | 17 | class SocialProfilesFactory implements FactoryInterface |
| 18 | 18 | { |
| 19 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 19 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 20 | 20 | { |
| 21 | 21 | $request = $container->get('request'); |
| 22 | 22 | $hybridAuth = $container->get('HybridAuth'); |
| 23 | - $plugin = new SocialProfiles($hybridAuth,$request); |
|
| 23 | + $plugin = new SocialProfiles($hybridAuth, $request); |
|
| 24 | 24 | |
| 25 | 25 | return $plugin; |
| 26 | 26 | } |
@@ -37,14 +37,14 @@ |
||
| 37 | 37 | $this->options['allowName'] = isset($options['allowName']) ? $options['allowName'] : null; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 41 | - { |
|
| 42 | - $auth = $container->get('AuthenticationService'); |
|
| 43 | - $user = $auth->getUser(); |
|
| 44 | - $options = $this->options; |
|
| 45 | - $options['user'] = $user; |
|
| 46 | - $validator = new UniqueGroupName($options); |
|
| 40 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 41 | + { |
|
| 42 | + $auth = $container->get('AuthenticationService'); |
|
| 43 | + $user = $auth->getUser(); |
|
| 44 | + $options = $this->options; |
|
| 45 | + $options['user'] = $user; |
|
| 46 | + $validator = new UniqueGroupName($options); |
|
| 47 | 47 | |
| 48 | - return $validator; |
|
| 49 | - } |
|
| 48 | + return $validator; |
|
| 49 | + } |
|
| 50 | 50 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $this->options['allowName'] = isset($options['allowName']) ? $options['allowName'] : null; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 40 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 41 | 41 | { |
| 42 | 42 | $auth = $container->get('AuthenticationService'); |
| 43 | 43 | $user = $auth->getUser(); |
@@ -55,8 +55,8 @@ |
||
| 55 | 55 | { |
| 56 | 56 | /* @var $options \Applications\Options\ModuleOptions */ |
| 57 | 57 | $form->get($this->fileName)->setViewHelper('formImageUpload') |
| 58 | - ->setMaxSize($options->getContactImageMaxSize()) |
|
| 59 | - ->setAllowedTypes($options->getContactImageMimeType()) |
|
| 60 | - ->setForm($form); |
|
| 58 | + ->setMaxSize($options->getContactImageMaxSize()) |
|
| 59 | + ->setAllowedTypes($options->getContactImageMimeType()) |
|
| 60 | + ->setForm($form); |
|
| 61 | 61 | } |
| 62 | 62 | } |
@@ -56,6 +56,6 @@ |
||
| 56 | 56 | $form = new static(); |
| 57 | 57 | $form->forms = $forms->get('FormElementManager'); |
| 58 | 58 | |
| 59 | - return $form; |
|
| 59 | + return $form; |
|
| 60 | 60 | } |
| 61 | 61 | } |