latest updates, towns and regions
[namibia] / module / User / src / User / Controller / ImportController.php
1 <?php
2 namespace User\Controller;
3
4
5
6 class ImportController extends \Zend\Mvc\Controller\AbstractActionController
7 {
8
9         public function processAction()
10         {
11                 \Utility\Registry::setServiceManager($this->serviceLocator);
12                 \Utility\Registry::addDynamicConfig(
13                                 \Utility\Registry::getEntityManager()
14                                 ->getRepository('Config\Entity\Config')
15                                 ->find(1)
16                                 ->toArray()
17                 );
18                 $service = new \User\Service\Import();
19                 $service->setWorkflow($this->serviceLocator->get('User'));
20                 $service->cronProcess();
21                 return "\n";
22         }
23
24         public function notifyAction()
25         {
26                 \Utility\Registry::setServiceManager($this->serviceLocator);
27                 \Utility\Registry::addDynamicConfig(
28                                 \Utility\Registry::getEntityManager()
29                                 ->getRepository('Config\Entity\Config')
30                                 ->find(1)
31                                 ->toArray()
32                 );
33                 $service = new \User\Service\Import();
34                 $service->setWorkflow($this->serviceLocator->get('User'));
35                 $service->notifyProcess();
36                 return "\n";
37         }
38
39 }