@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | use Zend\ServiceManager\Factory\InvokableFactory; |
17 | 17 | |
18 | -$doctrineConfig = include __DIR__ . '/doctrine.config.php'; |
|
18 | +$doctrineConfig = include __DIR__.'/doctrine.config.php'; |
|
19 | 19 | |
20 | 20 | |
21 | 21 | return array( |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | 'doctrine' => $doctrineConfig, |
24 | 24 | |
25 | 25 | 'options' => [ |
26 | - 'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ], |
|
26 | + 'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'], |
|
27 | 27 | ], |
28 | 28 | |
29 | 29 | 'Core' => array( |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'name' => 'stream', |
44 | 44 | 'priority' => 1000, |
45 | 45 | 'options' => array( |
46 | - 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
46 | + 'stream' => __DIR__.'/../../../log/yawik.log', |
|
47 | 47 | ), |
48 | 48 | ), |
49 | 49 | ), |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'name' => 'stream', |
55 | 55 | 'priority' => 1000, |
56 | 56 | 'options' => array( |
57 | - 'stream' => __DIR__ .'/../../../log/mails.log', |
|
57 | + 'stream' => __DIR__.'/../../../log/mails.log', |
|
58 | 58 | ), |
59 | 59 | ), |
60 | 60 | ), |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array |
72 | 72 | 'bar' => false, // bool = enabled|Toggle nette diagnostics bar. |
73 | 73 | 'strict' => true, // bool = cause immediate death|int = matched against error severity |
74 | - 'log' => __DIR__ . '/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files) |
|
74 | + 'log' => __DIR__.'/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files) |
|
75 | 75 | 'email' => null, // in production mode notifies the recipient |
76 | 76 | 'email_snooze' => 900 // interval for sending email in seconds |
77 | 77 | ], |
@@ -198,17 +198,17 @@ discard block |
||
198 | 198 | 'Core/JsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory', |
199 | 199 | 'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory', |
200 | 200 | 'Core/Options' => 'Core\Factory\ModuleOptionsFactory', |
201 | - 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'], |
|
202 | - 'DefaultListeners' => ['Core\Listener\DefaultListener','factory'], |
|
203 | - 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'], |
|
204 | - 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'], |
|
201 | + 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'], |
|
202 | + 'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'], |
|
203 | + 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'], |
|
204 | + 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'], |
|
205 | 205 | 'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory', |
206 | 206 | 'Core/Locale' => 'Core\I18n\LocaleFactory', |
207 | 207 | 'mvctranslator' => \Zend\Mvc\I18n\TranslatorFactory::class, |
208 | 208 | \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class, |
209 | 209 | \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class, |
210 | 210 | 'Imagine' => \Core\Factory\Service\ImagineFactory::class, |
211 | - 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'], |
|
211 | + 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'], |
|
212 | 212 | ), |
213 | 213 | 'abstract_factories' => array( |
214 | 214 | 'Core\Factory\OptionsAbstractFactory', |
@@ -230,17 +230,17 @@ discard block |
||
230 | 230 | 'translation_file_patterns' => array( |
231 | 231 | [ |
232 | 232 | 'type' => 'gettext', |
233 | - 'base_dir' => __DIR__ . '/../language', |
|
233 | + 'base_dir' => __DIR__.'/../language', |
|
234 | 234 | 'pattern' => '%s.mo', |
235 | 235 | ], |
236 | 236 | [ |
237 | 237 | 'type' => 'phparray', |
238 | - 'base_dir' => __DIR__ . '/../language', |
|
238 | + 'base_dir' => __DIR__.'/../language', |
|
239 | 239 | 'pattern' => 'Zend_Validate.%s.php', |
240 | 240 | ], |
241 | 241 | [ |
242 | 242 | 'type' => 'phparray', |
243 | - 'base_dir' => __DIR__ . '/../language', |
|
243 | + 'base_dir' => __DIR__.'/../language', |
|
244 | 244 | 'pattern' => 'Zend_Captcha.%s.php', |
245 | 245 | ] |
246 | 246 | ), |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | ), |
269 | 269 | 'factories' => [ |
270 | 270 | // @TODO: improve this factory |
271 | - 'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'], |
|
272 | - 'Core/Admin' => [\Core\Controller\AdminController::class,'factory'], |
|
273 | - 'Core\Controller\File' => [\Core\Controller\FileController::class,'factory'], |
|
271 | + 'Core\Controller\Index' => [\Core\Controller\IndexController::class, 'factory'], |
|
272 | + 'Core/Admin' => [\Core\Controller\AdminController::class, 'factory'], |
|
273 | + 'Core\Controller\File' => [\Core\Controller\FileController::class, 'factory'], |
|
274 | 274 | ], |
275 | 275 | 'abstract_factories' => [ |
276 | 276 | \Core\Factory\Controller\LazyControllerFactory::class |
@@ -285,9 +285,9 @@ discard block |
||
285 | 285 | 'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory', |
286 | 286 | 'listquery' => 'Core\Controller\Plugin\ListQuery::factory', |
287 | 287 | 'mail' => 'Core\Controller\Plugin\Mail::factory', |
288 | - 'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'], |
|
289 | - 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'], |
|
290 | - 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'], |
|
288 | + 'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'], |
|
289 | + 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'], |
|
290 | + 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'], |
|
291 | 291 | ), |
292 | 292 | 'invokables' => array( |
293 | 293 | 'Core/FileSender' => 'Core\Controller\Plugin\FileSender', |
@@ -317,32 +317,32 @@ discard block |
||
317 | 317 | 'exception_template' => 'error/index', |
318 | 318 | // Map template to files. Speeds up the lookup through the template stack. |
319 | 319 | 'template_map' => array( |
320 | - 'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml', |
|
321 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
322 | - 'error/404' => __DIR__ . '/../view/error/404.phtml', |
|
323 | - 'error/403' => __DIR__ . '/../view/error/403.phtml', |
|
324 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
325 | - 'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml', |
|
326 | - 'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml', |
|
327 | - 'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml', |
|
328 | - 'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml', |
|
329 | - 'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml', |
|
330 | - 'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml', |
|
331 | - 'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml', |
|
332 | - 'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml', |
|
333 | - 'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml', |
|
334 | - 'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml', |
|
335 | - 'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml', |
|
336 | - 'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml', |
|
337 | - 'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml', |
|
338 | - 'mail/header' => __DIR__ . '/../view/mail/header.phtml', |
|
339 | - 'mail/footer' => __DIR__ . '/../view/mail/footer.phtml', |
|
340 | - 'mail/footer.en' => __DIR__ . '/../view/mail/footer.en.phtml', |
|
320 | + 'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml', |
|
321 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
322 | + 'error/404' => __DIR__.'/../view/error/404.phtml', |
|
323 | + 'error/403' => __DIR__.'/../view/error/403.phtml', |
|
324 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
325 | + 'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml', |
|
326 | + 'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml', |
|
327 | + 'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml', |
|
328 | + 'core/notifications' => __DIR__.'/../view/partial/notifications.phtml', |
|
329 | + 'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml', |
|
330 | + 'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml', |
|
331 | + 'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml', |
|
332 | + 'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml', |
|
333 | + 'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml', |
|
334 | + 'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml', |
|
335 | + 'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml', |
|
336 | + 'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml', |
|
337 | + 'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml', |
|
338 | + 'mail/header' => __DIR__.'/../view/mail/header.phtml', |
|
339 | + 'mail/footer' => __DIR__.'/../view/mail/footer.phtml', |
|
340 | + 'mail/footer.en' => __DIR__.'/../view/mail/footer.en.phtml', |
|
341 | 341 | //'startpage' => __DIR__ . '/../view/layout/startpage.phtml', |
342 | 342 | ), |
343 | 343 | // Where to look for view templates not mapped above |
344 | 344 | 'template_path_stack' => array( |
345 | - __DIR__ . '/../view', |
|
345 | + __DIR__.'/../view', |
|
346 | 346 | ), |
347 | 347 | ), |
348 | 348 | 'view_helpers' => array( |
@@ -39,24 +39,24 @@ discard block |
||
39 | 39 | 'log' => array( |
40 | 40 | 'Core/Log' => array( |
41 | 41 | 'writers' => array( |
42 | - array( |
|
43 | - 'name' => 'stream', |
|
42 | + array( |
|
43 | + 'name' => 'stream', |
|
44 | 44 | 'priority' => 1000, |
45 | 45 | 'options' => array( |
46 | - 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
46 | + 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
47 | + ), |
|
47 | 48 | ), |
48 | - ), |
|
49 | 49 | ), |
50 | 50 | ), |
51 | 51 | 'Log/Core/Mail' => array( |
52 | 52 | 'writers' => array( |
53 | - array( |
|
54 | - 'name' => 'stream', |
|
53 | + array( |
|
54 | + 'name' => 'stream', |
|
55 | 55 | 'priority' => 1000, |
56 | 56 | 'options' => array( |
57 | - 'stream' => __DIR__ .'/../../../log/mails.log', |
|
57 | + 'stream' => __DIR__ .'/../../../log/mails.log', |
|
58 | + ), |
|
58 | 59 | ), |
59 | - ), |
|
60 | 60 | ), |
61 | 61 | ), |
62 | 62 | ), |
@@ -248,17 +248,17 @@ discard block |
||
248 | 248 | // Defines the Core/Navigation. |
249 | 249 | 'navigation' => array( |
250 | 250 | 'default' => array( |
251 | - 'home' => array( |
|
252 | - 'label' => /*@translate*/ 'Home', |
|
253 | - 'route' => 'lang', |
|
254 | - 'visible' => false |
|
255 | - ), |
|
256 | - 'admin' => array( |
|
257 | - 'label ' => /*@translate*/ 'Admin', |
|
258 | - 'route' => 'lang/admin', |
|
259 | - 'resource' => 'route/lang/admin', |
|
260 | - 'order' => 200, |
|
261 | - ), |
|
251 | + 'home' => array( |
|
252 | + 'label' => /*@translate*/ 'Home', |
|
253 | + 'route' => 'lang', |
|
254 | + 'visible' => false |
|
255 | + ), |
|
256 | + 'admin' => array( |
|
257 | + 'label ' => /*@translate*/ 'Admin', |
|
258 | + 'route' => 'lang/admin', |
|
259 | + 'resource' => 'route/lang/admin', |
|
260 | + 'order' => 200, |
|
261 | + ), |
|
262 | 262 | ), |
263 | 263 | ), |
264 | 264 | // Configuration of the controller service manager (Which loads controllers) |
@@ -266,14 +266,14 @@ discard block |
||
266 | 266 | 'invokables' => array( |
267 | 267 | 'Core\Controller\Content' => 'Core\Controller\ContentController', |
268 | 268 | ), |
269 | - 'factories' => [ |
|
270 | - // @TODO: improve this factory |
|
271 | - 'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'], |
|
272 | - 'Core/Admin' => [\Core\Controller\AdminController::class,'factory'], |
|
273 | - 'Core\Controller\File' => [\Core\Controller\FileController::class,'factory'], |
|
274 | - ], |
|
269 | + 'factories' => [ |
|
270 | + // @TODO: improve this factory |
|
271 | + 'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'], |
|
272 | + 'Core/Admin' => [\Core\Controller\AdminController::class,'factory'], |
|
273 | + 'Core\Controller\File' => [\Core\Controller\FileController::class,'factory'], |
|
274 | + ], |
|
275 | 275 | 'abstract_factories' => [ |
276 | - \Core\Factory\Controller\LazyControllerFactory::class |
|
276 | + \Core\Factory\Controller\LazyControllerFactory::class |
|
277 | 277 | ], |
278 | 278 | ), |
279 | 279 | // Configuration of the controller plugin service manager |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | 'paginatorservice' => 'Core/PaginatorService', |
305 | 305 | 'paginationParams' => 'Core/PaginationParams', |
306 | 306 | 'searchform' => 'Core/SearchForm', |
307 | - 'notification' => 'Notification', |
|
307 | + 'notification' => 'Notification', |
|
308 | 308 | ) |
309 | 309 | ), |
310 | 310 | // Configure the view service manager |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | ), |
403 | 403 | 'aliases' => [ |
404 | 404 | 'snippet' => \Core\View\Helper\Snippet::class, |
405 | - 'ajaxUrl' => \Core\View\Helper\AjaxUrl::class, |
|
405 | + 'ajaxUrl' => \Core\View\Helper\AjaxUrl::class, |
|
406 | 406 | 'proxy' => \Core\View\Helper\Proxy::class, |
407 | 407 | 'form_element' => 'formElement', |
408 | 408 | ], |
@@ -500,17 +500,17 @@ discard block |
||
500 | 500 | ], |
501 | 501 | |
502 | 502 | 'Core/Ajax/Events' => [ |
503 | - 'service' => 'Core/EventManager', |
|
504 | - 'event' => \Core\Listener\Events\AjaxEvent::class, |
|
503 | + 'service' => 'Core/EventManager', |
|
504 | + 'event' => \Core\Listener\Events\AjaxEvent::class, |
|
505 | 505 | ], |
506 | 506 | |
507 | - 'Core/File/Events' => [ |
|
508 | - 'service' => 'Core/EventManager', |
|
509 | - 'event' => \Core\Listener\Events\FileEvent::class, |
|
507 | + 'Core/File/Events' => [ |
|
508 | + 'service' => 'Core/EventManager', |
|
509 | + 'event' => \Core\Listener\Events\FileEvent::class, |
|
510 | 510 | 'listeners' => [ |
511 | 511 | \Core\Listener\DeleteImageSetListener::class => [\Core\Listener\Events\FileEvent::EVENT_DELETE, -1000], |
512 | 512 | ], |
513 | - ] |
|
513 | + ] |
|
514 | 514 | ], |
515 | 515 | |
516 | 516 | ); |
@@ -112,16 +112,16 @@ |
||
112 | 112 | $eventManager->attach( |
113 | 113 | MvcEvent::EVENT_DISPATCH_ERROR, |
114 | 114 | function ($event) { |
115 | - if($event instanceof MvcEvent){ |
|
116 | - $application = $event->getApplication(); |
|
115 | + if($event instanceof MvcEvent){ |
|
116 | + $application = $event->getApplication(); |
|
117 | 117 | |
118 | - if ($application::ERROR_EXCEPTION == $event->getError()) { |
|
119 | - $ex = $event->getParam('exception'); |
|
120 | - if (404 == $ex->getCode()) { |
|
121 | - $event->setError($application::ERROR_CONTROLLER_NOT_FOUND); |
|
122 | - } |
|
123 | - } |
|
124 | - } |
|
118 | + if ($application::ERROR_EXCEPTION == $event->getError()) { |
|
119 | + $ex = $event->getParam('exception'); |
|
120 | + if (404 == $ex->getCode()) { |
|
121 | + $event->setError($application::ERROR_CONTROLLER_NOT_FOUND); |
|
122 | + } |
|
123 | + } |
|
124 | + } |
|
125 | 125 | }, |
126 | 126 | 500 |
127 | 127 | ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public function getConsoleBanner(Console $console) |
42 | 42 | { |
43 | 43 | $version = `git describe 2>/dev/null`; |
44 | - $name = 'YAWIK ' . trim($version); |
|
44 | + $name = 'YAWIK '.trim($version); |
|
45 | 45 | $width = $console->getWidth(); |
46 | 46 | return sprintf( |
47 | 47 | "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n", |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | |
112 | 112 | $eventManager->attach( |
113 | 113 | MvcEvent::EVENT_DISPATCH_ERROR, |
114 | - function ($event) { |
|
115 | - if($event instanceof MvcEvent){ |
|
114 | + function($event) { |
|
115 | + if ($event instanceof MvcEvent) { |
|
116 | 116 | $application = $event->getApplication(); |
117 | 117 | |
118 | 118 | if ($application::ERROR_EXCEPTION == $event->getError()) { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | ); |
128 | 128 | $eventManager->attach( |
129 | 129 | MvcEvent::EVENT_DISPATCH, |
130 | - function ($event) use ($eventManager) { |
|
130 | + function($event) use ($eventManager) { |
|
131 | 131 | $eventManager->trigger('postDispatch', $event); |
132 | 132 | }, |
133 | 133 | -150 |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function getConfig() |
144 | 144 | { |
145 | - $config = include __DIR__ . '/config/module.config.php'; |
|
145 | + $config = include __DIR__.'/config/module.config.php'; |
|
146 | 146 | return $config; |
147 | 147 | } |
148 | 148 | |
@@ -155,13 +155,13 @@ discard block |
||
155 | 155 | { |
156 | 156 | return array( |
157 | 157 | 'Zend\Loader\ClassMapAutoloader' => [ |
158 | - __DIR__ . '/src/autoload_classmap.php' |
|
158 | + __DIR__.'/src/autoload_classmap.php' |
|
159 | 159 | ], |
160 | 160 | 'Zend\Loader\StandardAutoloader' => array( |
161 | 161 | 'namespaces' => array( |
162 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
163 | - 'CoreTest' => __DIR__ . '/test/' . 'CoreTest', |
|
164 | - 'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils', |
|
162 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
163 | + 'CoreTest' => __DIR__.'/test/'.'CoreTest', |
|
164 | + 'CoreTestUtils' => __DIR__.'/test/CoreTestUtils', |
|
165 | 165 | ), |
166 | 166 | ), |
167 | 167 | ); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | class ServiceLocatorAwareConfiguration extends Configuration |
16 | 16 | { |
17 | - public function setServiceLocator($serviceLocator) |
|
17 | + public function setServiceLocator($serviceLocator) |
|
18 | 18 | { |
19 | 19 | $this->attributes['serviceLocator'] = $serviceLocator; |
20 | 20 | return $this; |
@@ -22,17 +22,17 @@ |
||
22 | 22 | */ |
23 | 23 | class DocumentManagerFactory implements FactoryInterface |
24 | 24 | { |
25 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
26 | - $container->setAllowOverride(true); |
|
27 | - $container->setFactory('doctrine.configuration.odm_default', new ConfigurationFactory('odm_default')); |
|
28 | - $container->setAllowOverride(false); |
|
25 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
26 | + $container->setAllowOverride(true); |
|
27 | + $container->setFactory('doctrine.configuration.odm_default', new ConfigurationFactory('odm_default')); |
|
28 | + $container->setAllowOverride(false); |
|
29 | 29 | |
30 | - $configFactory = new ConfigurationFactory('odm_default'); |
|
31 | - $config = $configFactory->createService($container); |
|
30 | + $configFactory = new ConfigurationFactory('odm_default'); |
|
31 | + $config = $configFactory->createService($container); |
|
32 | 32 | |
33 | - $dm = $container->get('doctrine.documentmanager.odm_default'); |
|
34 | - $dm = DoctrineDocumentManager::create($dm->getConnection(), $config, $dm->getEventManager()); |
|
35 | - $dm->getSchemaManager()->ensureIndexes(); |
|
36 | - return $dm; |
|
37 | - } |
|
33 | + $dm = $container->get('doctrine.documentmanager.odm_default'); |
|
34 | + $dm = DoctrineDocumentManager::create($dm->getConnection(), $config, $dm->getEventManager()); |
|
35 | + $dm->getSchemaManager()->ensureIndexes(); |
|
36 | + return $dm; |
|
37 | + } |
|
38 | 38 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | class DocumentManagerFactory implements FactoryInterface |
24 | 24 | { |
25 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
25 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
|
26 | 26 | $container->setAllowOverride(true); |
27 | 27 | $container->setFactory('doctrine.configuration.odm_default', new ConfigurationFactory('odm_default')); |
28 | 28 | $container->setAllowOverride(false); |
@@ -21,16 +21,16 @@ |
||
21 | 21 | class RepositoryServiceFactory implements FactoryInterface |
22 | 22 | { |
23 | 23 | |
24 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
25 | - $dm = $container->get('Core/DocumentManager'); |
|
26 | - $service = new RepositoryService($dm); |
|
24 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
25 | + $dm = $container->get('Core/DocumentManager'); |
|
26 | + $service = new RepositoryService($dm); |
|
27 | 27 | |
28 | - /* Attach persistence listener */ |
|
29 | - $application = $container->get('Application'); |
|
30 | - $events = $application->getEventManager(); |
|
31 | - $persistenceListener = new PersistenceListener($service); |
|
32 | - $persistenceListener->attach($events); |
|
28 | + /* Attach persistence listener */ |
|
29 | + $application = $container->get('Application'); |
|
30 | + $events = $application->getEventManager(); |
|
31 | + $persistenceListener = new PersistenceListener($service); |
|
32 | + $persistenceListener->attach($events); |
|
33 | 33 | |
34 | - return $service; |
|
35 | - } |
|
34 | + return $service; |
|
35 | + } |
|
36 | 36 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | class RepositoryServiceFactory implements FactoryInterface |
22 | 22 | { |
23 | 23 | |
24 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
24 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
|
25 | 25 | $dm = $container->get('Core/DocumentManager'); |
26 | 26 | $service = new RepositoryService($dm); |
27 | 27 |
@@ -22,20 +22,20 @@ |
||
22 | 22 | */ |
23 | 23 | class XssFilterFactory implements FactoryInterface |
24 | 24 | { |
25 | - /** |
|
26 | - * @param ContainerInterface $container |
|
27 | - * @param string $requestedName |
|
28 | - * @param array|null $options |
|
29 | - * |
|
30 | - * @return XssFilter |
|
31 | - */ |
|
32 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
33 | - { |
|
34 | - $htmlPurifier = new Filter\HTMLPurifierFilter(); |
|
35 | - $htmlPurifier->setConfig(array("Cache.SerializerPath" => "cache/HtmlPurifier")); |
|
25 | + /** |
|
26 | + * @param ContainerInterface $container |
|
27 | + * @param string $requestedName |
|
28 | + * @param array|null $options |
|
29 | + * |
|
30 | + * @return XssFilter |
|
31 | + */ |
|
32 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
33 | + { |
|
34 | + $htmlPurifier = new Filter\HTMLPurifierFilter(); |
|
35 | + $htmlPurifier->setConfig(array("Cache.SerializerPath" => "cache/HtmlPurifier")); |
|
36 | 36 | |
37 | - $filter = new XssFilter($htmlPurifier); |
|
37 | + $filter = new XssFilter($htmlPurifier); |
|
38 | 38 | |
39 | - return $filter; |
|
40 | - } |
|
39 | + return $filter; |
|
40 | + } |
|
41 | 41 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * |
30 | 30 | * @return XssFilter |
31 | 31 | */ |
32 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
32 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
33 | 33 | { |
34 | 34 | $htmlPurifier = new Filter\HTMLPurifierFilter(); |
35 | 35 | $htmlPurifier->setConfig(array("Cache.SerializerPath" => "cache/HtmlPurifier")); |
@@ -86,9 +86,9 @@ |
||
86 | 86 | $values = []; |
87 | 87 | /* @var NodeInterface $item */ |
88 | 88 | foreach ($this->getItems() as $item) { |
89 | - if(!is_null($item)){ |
|
90 | - $values[] = $item->getValueWithParents(); |
|
91 | - } |
|
89 | + if(!is_null($item)){ |
|
90 | + $values[] = $item->getValueWithParents(); |
|
91 | + } |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $this->values = $values; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | use EntityTrait, ClonePropertiesTrait; |
30 | 30 | |
31 | - private $cloneProperties = [ '!items' ]; |
|
31 | + private $cloneProperties = ['!items']; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * The leafs. |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $values = []; |
87 | 87 | /* @var NodeInterface $item */ |
88 | 88 | foreach ($this->getItems() as $item) { |
89 | - if(!is_null($item)){ |
|
89 | + if (!is_null($item)) { |
|
90 | 90 | $values[] = $item->getValueWithParents(); |
91 | 91 | } |
92 | 92 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $parent = $nextParent; |
116 | 116 | } |
117 | 117 | $nameParts[] = $item->getName(); |
118 | - $items[] = join(' | ' , $nameParts); |
|
118 | + $items[] = join(' | ', $nameParts); |
|
119 | 119 | |
120 | 120 | } |
121 | 121 |
@@ -21,15 +21,15 @@ discard block |
||
21 | 21 | { |
22 | 22 | protected $hydrator; |
23 | 23 | |
24 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
25 | - { |
|
26 | - $this->hydrator = $this->getEntityHydrator(); |
|
27 | - $this->prepareHydrator(); |
|
28 | - return $this->hydrator; |
|
29 | - } |
|
24 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
25 | + { |
|
26 | + $this->hydrator = $this->getEntityHydrator(); |
|
27 | + $this->prepareHydrator(); |
|
28 | + return $this->hydrator; |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | - /** |
|
32 | + /** |
|
33 | 33 | * Create the Json Entity Hydrator |
34 | 34 | * |
35 | 35 | * @param ServiceLocatorInterface $serviceLocator |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function createService(ServiceLocatorInterface $serviceLocator) |
39 | 39 | { |
40 | - return $this($serviceLocator,EntityHydrator::class); |
|
40 | + return $this($serviceLocator,EntityHydrator::class); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | protected function prepareHydrator() |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | protected $hydrator; |
23 | 23 | |
24 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
24 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
25 | 25 | { |
26 | 26 | $this->hydrator = $this->getEntityHydrator(); |
27 | 27 | $this->prepareHydrator(); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function createService(ServiceLocatorInterface $serviceLocator) |
39 | 39 | { |
40 | - return $this($serviceLocator,EntityHydrator::class); |
|
40 | + return $this($serviceLocator, EntityHydrator::class); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | protected function prepareHydrator() |
@@ -21,17 +21,17 @@ |
||
21 | 21 | { |
22 | 22 | protected $hydrator; |
23 | 23 | |
24 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
25 | - { |
|
26 | - $this->hydrator = new JsonEntityHydrator(); |
|
27 | - $entityHydrator = $this->getEntityHydrator(); |
|
28 | - $this->hydrator->injectHydrator($entityHydrator); |
|
29 | - $this->prepareHydrator(); |
|
30 | - return $this->hydrator; |
|
31 | - } |
|
24 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
25 | + { |
|
26 | + $this->hydrator = new JsonEntityHydrator(); |
|
27 | + $entityHydrator = $this->getEntityHydrator(); |
|
28 | + $this->hydrator->injectHydrator($entityHydrator); |
|
29 | + $this->prepareHydrator(); |
|
30 | + return $this->hydrator; |
|
31 | + } |
|
32 | 32 | |
33 | 33 | |
34 | - /** |
|
34 | + /** |
|
35 | 35 | * Create the Json Entity Hydrator |
36 | 36 | * |
37 | 37 | * @param ServiceLocatorInterface $serviceLocator |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | protected $hydrator; |
23 | 23 | |
24 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
24 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
25 | 25 | { |
26 | 26 | $this->hydrator = new JsonEntityHydrator(); |
27 | 27 | $entityHydrator = $this->getEntityHydrator(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function createService(ServiceLocatorInterface $serviceLocator) |
41 | 41 | { |
42 | - return $this($serviceLocator,JsonEntityHydrator::class); |
|
42 | + return $this($serviceLocator, JsonEntityHydrator::class); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | protected function prepareHydrator() { |