示例#1
0
 public function processRequest(MMapRequest $request, MMapResponse $response)
 {
     $data = explode('/', $request->getSERVER('PATH_INFO'));
     if (count($data) < 3) {
         self::$Logger->error('Invalid PATH_INFO: ' . $request->getSERVER('PATH_INFO') . '. Cannot route request to final MMapManager.');
         return;
     }
     // => MMapExtern
     if ($data[1] == 'extern') {
         $path = '';
         for ($i = 2; $i < count($data); $i++) {
             if (empty($path)) {
                 $path = $data[$i];
             } else {
                 $path .= '/' . $data[$i];
             }
         }
         $request->setGET('extern', $path);
         MMapExtern::getInstance()->processRequest($request, $response);
     } elseif ($data[1] == 'externApplication') {
         $path = '';
         for ($i = 4; $i < count($data); $i++) {
             if (empty($path)) {
                 $path = $data[$i];
             } else {
                 $path .= '/' . $data[$i];
             }
         }
         $request->setGET('checknum', $data[2]);
         $request->setGET('appName', $data[3]);
         $request->setGET('appFile', $path);
         MMapExternApp::getInstance()->processRequest($request, $response);
     } elseif ($data[1] == 'msg') {
         $request->setGET('checknum', $data[2]);
         $request->setGET('message', $data[3]);
         $request->setPOST('params', $data[4]);
         MMapMsg::getInstance()->processRequest($request, $response);
     }
 }
 public function __construct()
 {
     $this->myMMapExternApp = MMapExternApp::getInstance();
 }
示例#3
0
 public static function getInstance()
 {
     self::$Logger = Logger::getLogger('system.services.MMap.MMapExternApp');
     return parent::getInstance(__CLASS__);
 }