@@ -8,9 +8,9 @@ |
||
| 8 | 8 | class FrontendSwitchLocaleControllerFactory implements FactoryInterface |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * @param ServiceLocatorInterface $locator |
|
| 12 | - * @return \PlaygroundCore\Controller\Frontend\SwitchLocaleController |
|
| 13 | - */ |
|
| 11 | + * @param ServiceLocatorInterface $locator |
|
| 12 | + * @return \PlaygroundCore\Controller\Frontend\SwitchLocaleController |
|
| 13 | + */ |
|
| 14 | 14 | public function createService(ServiceLocatorInterface $locator) |
| 15 | 15 | { |
| 16 | 16 | $controller = new SwitchLocaleController($locator); |
@@ -8,9 +8,9 @@ |
||
| 8 | 8 | class AdminElfinderControllerFactory implements FactoryInterface |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * @param ServiceLocatorInterface $locator |
|
| 12 | - * @return \PlaygroundCore\Controller\Admin\ElfinderController |
|
| 13 | - */ |
|
| 11 | + * @param ServiceLocatorInterface $locator |
|
| 12 | + * @return \PlaygroundCore\Controller\Admin\ElfinderController |
|
| 13 | + */ |
|
| 14 | 14 | public function createService(ServiceLocatorInterface $locator) |
| 15 | 15 | { |
| 16 | 16 | $controller = new ElfinderController($locator); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | * set service |
| 37 | 37 | * |
| 38 | 38 | * @param $service |
| 39 | - * @return String |
|
| 39 | + * @return Recaptcha |
|
| 40 | 40 | */ |
| 41 | 41 | public function setService($service) |
| 42 | 42 | { |
@@ -28,8 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * This method calls Google ReCaptcha. |
| 31 | - * @param unknown_type $url |
|
| 32 | - * @return unknown |
|
| 31 | + * @return boolean |
|
| 33 | 32 | */ |
| 34 | 33 | public function recaptcha($response, $ipClient = null) |
| 35 | 34 | { |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | public function __construct($property, $value = null) |
| 10 | 10 | { |
| 11 | 11 | $this->property = $property; |
| 12 | - $this->value = $value; |
|
| 12 | + $this->value = $value; |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | public function getProperty() |
@@ -8,9 +8,9 @@ |
||
| 8 | 8 | class RecaptchaFactory implements FactoryInterface |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * @param ServiceLocatorInterface $locator |
|
| 12 | - * @return \PlaygroundCore\Service\Recaptcha |
|
| 13 | - */ |
|
| 11 | + * @param ServiceLocatorInterface $locator |
|
| 12 | + * @return \PlaygroundCore\Service\Recaptcha |
|
| 13 | + */ |
|
| 14 | 14 | public function createService(ServiceLocatorInterface $locator) |
| 15 | 15 | { |
| 16 | 16 | $service = new Recaptcha($locator); |
@@ -8,9 +8,9 @@ |
||
| 8 | 8 | class MessageFactory implements FactoryInterface |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * @param ServiceLocatorInterface $locator |
|
| 12 | - * @return \PlaygroundCore\Service\Country |
|
| 13 | - */ |
|
| 11 | + * @param ServiceLocatorInterface $locator |
|
| 12 | + * @return \PlaygroundCore\Service\Country |
|
| 13 | + */ |
|
| 14 | 14 | public function createService(ServiceLocatorInterface $locator) |
| 15 | 15 | { |
| 16 | 16 | $service = new Message($locator); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | if (empty($locale) && in_array('cookie', $pgstrat)) { |
| 91 | 91 | $serviceManager->get('router')->setTranslator($translator); |
| 92 | 92 | if ($serviceManager->get('router')->match($serviceManager->get('request')) && |
| 93 | - strpos($serviceManager->get('router')->match($serviceManager->get('request'))->getMatchedRouteName(), 'admin') !==false |
|
| 93 | + strpos($serviceManager->get('router')->match($serviceManager->get('request'))->getMatchedRouteName(), 'admin') !== false |
|
| 94 | 94 | ) { |
| 95 | 95 | if ($e->getRequest()->getCookie() && |
| 96 | 96 | $e->getRequest()->getCookie()->offsetExists('pg_locale_back') |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | // Google Analytics : When the render event is triggered, we invoke the view helper to |
| 193 | 193 | // render the javascript code. |
| 194 | - $e->getApplication()->getEventManager()->attach(\Zend\Mvc\MvcEvent::EVENT_RENDER, function (\Zend\Mvc\MvcEvent $e) use ($serviceManager) { |
|
| 194 | + $e->getApplication()->getEventManager()->attach(\Zend\Mvc\MvcEvent::EVENT_RENDER, function(\Zend\Mvc\MvcEvent $e) use ($serviceManager) { |
|
| 195 | 195 | $view = $serviceManager->get('ViewHelperManager'); |
| 196 | 196 | $plugin = $view->get('googleAnalytics'); |
| 197 | 197 | $plugin(); |
@@ -218,8 +218,8 @@ discard block |
||
| 218 | 218 | // that they need to send the user back to FB... |
| 219 | 219 | |
| 220 | 220 | if (!count($_COOKIE) > 0 && strpos($_SERVER['HTTP_USER_AGENT'], 'Safari')) { |
| 221 | - echo '<script type="text/javascript">' . |
|
| 222 | - 'window.top.location.href = window.location.href+"?redir_fb_page_id='. $data["page"]["id"]. '";' . |
|
| 221 | + echo '<script type="text/javascript">'. |
|
| 222 | + 'window.top.location.href = window.location.href+"?redir_fb_page_id='.$data["page"]["id"].'";'. |
|
| 223 | 223 | '</script>'; |
| 224 | 224 | } |
| 225 | 225 | |
@@ -236,11 +236,11 @@ discard block |
||
| 236 | 236 | { |
| 237 | 237 | return array( |
| 238 | 238 | 'Zend\Loader\ClassMapAutoloader' => array( |
| 239 | - __DIR__ . '/../../autoload_classmap.php', |
|
| 239 | + __DIR__.'/../../autoload_classmap.php', |
|
| 240 | 240 | ), |
| 241 | 241 | 'Zend\Loader\StandardAutoloader' => array( |
| 242 | 242 | 'namespaces' => array( |
| 243 | - __NAMESPACE__ => __DIR__ . '/../../src/' . __NAMESPACE__, |
|
| 243 | + __NAMESPACE__ => __DIR__.'/../../src/'.__NAMESPACE__, |
|
| 244 | 244 | ), |
| 245 | 245 | ), |
| 246 | 246 | ); |
@@ -248,21 +248,21 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | public function getConfig() |
| 250 | 250 | { |
| 251 | - return include __DIR__ . '/../../config/module.config.php'; |
|
| 251 | + return include __DIR__.'/../../config/module.config.php'; |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | public function getViewHelperConfig() |
| 255 | 255 | { |
| 256 | 256 | return array( |
| 257 | 257 | 'factories' => array( |
| 258 | - 'QgCKEditor' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 258 | + 'QgCKEditor' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 259 | 259 | $config = $sm->getServiceLocator()->get('config'); |
| 260 | 260 | $QuCk = new View\Helper\AdCKEditor($config['playgroundcore']['ckeditor']); |
| 261 | 261 | |
| 262 | 262 | return $QuCk; |
| 263 | 263 | }, |
| 264 | 264 | |
| 265 | - 'googleAnalytics' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 265 | + 'googleAnalytics' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 266 | 266 | $tracker = $sm->getServiceLocator()->get('google-analytics'); |
| 267 | 267 | |
| 268 | 268 | $helper = new View\Helper\GoogleAnalytics($tracker, $sm->getServiceLocator()->get('Request')); |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | return $helper; |
| 271 | 271 | }, |
| 272 | 272 | |
| 273 | - 'facebookOpengraph' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 273 | + 'facebookOpengraph' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 274 | 274 | $tracker = $sm->getServiceLocator()->get('facebook-opengraph'); |
| 275 | 275 | |
| 276 | 276 | $helper = new View\Helper\FacebookOpengraph($tracker, $sm->getServiceLocator()->get('Request')); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | return $helper; |
| 279 | 279 | }, |
| 280 | 280 | |
| 281 | - 'twitterCard' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 281 | + 'twitterCard' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 282 | 282 | $viewHelper = new View\Helper\TwitterCard(); |
| 283 | 283 | $viewHelper->setConfig($sm->getServiceLocator()->get('twitter-card')); |
| 284 | 284 | $viewHelper->setRequest($sm->getServiceLocator()->get('Request')); |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | return $viewHelper; |
| 287 | 287 | }, |
| 288 | 288 | |
| 289 | - 'switchLocaleWidget' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 289 | + 'switchLocaleWidget' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 290 | 290 | $viewHelper = new View\Helper\SwitchLocaleWidget(); |
| 291 | 291 | $viewHelper->setLocaleService($sm->getServiceLocator()->get('playgroundcore_locale_service')); |
| 292 | 292 | $viewHelper->setWebsiteService($sm->getServiceLocator()->get('playgroundcore_website_service')); |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | return $viewHelper; |
| 296 | 296 | }, |
| 297 | 297 | |
| 298 | - 'countryName' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 298 | + 'countryName' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 299 | 299 | $service = $sm->getServiceLocator()->get('playgroundcore_country_service'); |
| 300 | 300 | $viewHelper = new View\Helper\CountryName($service); |
| 301 | 301 | |
@@ -316,13 +316,13 @@ discard block |
||
| 316 | 316 | ), |
| 317 | 317 | |
| 318 | 318 | 'factories' => array( |
| 319 | - 'playgroundcore_module_options' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 319 | + 'playgroundcore_module_options' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 320 | 320 | $config = $sm->get('Configuration'); |
| 321 | 321 | |
| 322 | 322 | return new Options\ModuleOptions(isset($config['playgroundcore']) ? $config['playgroundcore'] : array()); |
| 323 | 323 | }, |
| 324 | 324 | |
| 325 | - 'playgroundcore_formgen_mapper' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 325 | + 'playgroundcore_formgen_mapper' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 326 | 326 | return new Mapper\Formgen( |
| 327 | 327 | $sm->get('playgroundcore_doctrine_em'), |
| 328 | 328 | $sm->get('playgroundcore_module_options'), |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | ); |
| 331 | 331 | }, |
| 332 | 332 | |
| 333 | - 'playgroundcore_website_mapper' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 333 | + 'playgroundcore_website_mapper' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 334 | 334 | |
| 335 | 335 | return new Mapper\Website( |
| 336 | 336 | $sm->get('playgroundcore_doctrine_em'), |
@@ -339,14 +339,14 @@ discard block |
||
| 339 | 339 | ); |
| 340 | 340 | }, |
| 341 | 341 | |
| 342 | - 'playgroundcore_locale_mapper' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 342 | + 'playgroundcore_locale_mapper' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 343 | 343 | return new Mapper\Locale( |
| 344 | 344 | $sm->get('playgroundcore_doctrine_em'), |
| 345 | 345 | $sm->get('playgroundcore_module_options'), |
| 346 | 346 | $sm |
| 347 | 347 | ); |
| 348 | 348 | }, |
| 349 | - 'PlaygroundCore\Analytics\Tracker' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 349 | + 'PlaygroundCore\Analytics\Tracker' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 350 | 350 | $config = $sm->get('config'); |
| 351 | 351 | $config = isset($config['playgroundcore']) ? $config['playgroundcore']['googleAnalytics'] : array('id' => 'UA-XXXXXXXX-X'); |
| 352 | 352 | |
@@ -359,8 +359,8 @@ discard block |
||
| 359 | 359 | if (isset($config['custom_vars'])) { |
| 360 | 360 | foreach ($config['custom_vars'] as $customVar) { |
| 361 | 361 | $customVarId = $customVar['id']; |
| 362 | - $customVarName = $customVar['name']; |
|
| 363 | - $customVarValue = $customVar['value']; |
|
| 362 | + $customVarName = $customVar['name']; |
|
| 363 | + $customVarValue = $customVar['value']; |
|
| 364 | 364 | $customVarOptScope = $customVar['optScope']; |
| 365 | 365 | $customVar = new Analytics\CustomVar($customVarId, $customVarName, $customVarValue, $customVarOptScope); |
| 366 | 366 | $tracker->addCustomVar($customVar); |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | return $tracker; |
| 383 | 383 | }, |
| 384 | - 'PlaygroundCore\Opengraph\Tracker' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 384 | + 'PlaygroundCore\Opengraph\Tracker' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 385 | 385 | $config = $sm->get('config'); |
| 386 | 386 | $config = isset($config['playgroundcore']['facebookOpengraph']) ? $config['playgroundcore']['facebookOpengraph'] : array('appId' => ''); |
| 387 | 387 | |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | |
| 401 | 401 | return $tracker; |
| 402 | 402 | }, |
| 403 | - 'PlaygroundCore\TwitterCard\Config' => function (\Zend\ServiceManager\ServiceManager $sm) { |
|
| 403 | + 'PlaygroundCore\TwitterCard\Config' => function(\Zend\ServiceManager\ServiceManager $sm) { |
|
| 404 | 404 | $config = $sm->get('config'); |
| 405 | 405 | $config = isset($config['playgroundcore']['twitterCard']) ? $config['playgroundcore']['twitterCard'] : array(); |
| 406 | 406 | return new TwitterCard\Config($config); |