@@ -115,27 +115,27 @@ |
||
115 | 115 | */ |
116 | 116 | protected function generateHtml() |
117 | 117 | { |
118 | - /* |
|
118 | + /* |
|
119 | 119 | * "ViewHelperManager" defined by ZF2 |
120 | 120 | * see http://framework.zend.com/manual/2.0/en/modules/zend.mvc.services.html#viewmanager |
121 | 121 | */ |
122 | - $viewManager = $this->viewManager; |
|
122 | + $viewManager = $this->viewManager; |
|
123 | 123 | |
124 | 124 | return $viewManager->get("partial")->__invoke('applications/mail/forward', array("application"=>$this->application)); |
125 | 125 | } |
126 | 126 | |
127 | 127 | public function setContainer(ContainerInterface $container) |
128 | 128 | { |
129 | - $this->viewManager = $container->get('ViewHelperManager'); |
|
129 | + $this->viewManager = $container->get('ViewHelperManager'); |
|
130 | 130 | } |
131 | 131 | |
132 | - /** |
|
133 | - * @param ContainerInterface $container |
|
134 | - * @param $requestedName |
|
135 | - * @param array $options |
|
136 | - * |
|
137 | - * @return Forward |
|
138 | - */ |
|
132 | + /** |
|
133 | + * @param ContainerInterface $container |
|
134 | + * @param $requestedName |
|
135 | + * @param array $options |
|
136 | + * |
|
137 | + * @return Forward |
|
138 | + */ |
|
139 | 139 | static public function factory(ContainerInterface $container,$requestedName,array $options=[]) |
140 | 140 | { |
141 | 141 | $ob = new self($options); |
@@ -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 | ); |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function getService($name) |
44 | 44 | { |
45 | - /* @TODO: [ZF3] ->getServiceLocator() should be removed in future */ |
|
46 | - $config = $this->dm->getConfiguration(); |
|
45 | + /* @TODO: [ZF3] ->getServiceLocator() should be removed in future */ |
|
46 | + $config = $this->dm->getConfiguration(); |
|
47 | 47 | return $this->dm->getConfiguration()->getServiceLocator()->get($name); |
48 | 48 | } |
49 | 49 | |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | { |
127 | 127 | $this->checkEntityType($entity); |
128 | 128 | $this->dm->remove($entity); |
129 | - if($flush){ |
|
130 | - $this->dm->flush($entity); |
|
131 | - } |
|
129 | + if($flush){ |
|
130 | + $this->dm->flush($entity); |
|
131 | + } |
|
132 | 132 | return $this; |
133 | 133 | } |
134 | 134 |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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; |
@@ -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() |