예제 #1
0
파일: Udp.php 프로젝트: eyehere/aha
 public function excute()
 {
     $response = $this->_objDispatcher->getResponse();
     $objFetch = new \Application\Models\Coroutine\Fetch();
     $data = (yield $objFetch->getFromUdp());
     $response->end(json_encode($data));
 }
예제 #2
0
파일: Http.php 프로젝트: eyehere/aha
 public function excute()
 {
     $response = $this->_objDispatcher->getResponse();
     $objFetch = new \Application\Models\Coroutine\Fetch();
     $data = (yield $objFetch->getMeituPage());
     if (isset($data['data']['body'])) {
         $response->end($data['data']['body']);
     } else {
         $response->end(json_encode($data));
     }
 }
예제 #3
0
파일: Db.php 프로젝트: eyehere/aha
 public function excute()
 {
     $response = $this->_objDispatcher->getResponse();
     $objFetch = new \Application\Models\Coroutine\Fetch();
     $data = (yield $objFetch->getFromDb($this->_objDispatcher));
     $result = isset($data['result']) ? $data['result'] : false;
     $arrData = array();
     if (false === $result) {
         $arrData = array('query_error');
     } else {
         $arrData = $result->fetch_all(MYSQLI_ASSOC);
     }
     $response->end(json_encode($arrData));
 }
예제 #4
0
파일: Multi.php 프로젝트: vucms/aha
 public function excute()
 {
     $response = $this->_objDispatcher->getResponse();
     $objFetch = new \Application\Models\Coroutine\Fetch();
     $data = (yield $objFetch->getFromMulti());
     //		if ( isset($data['data']['length']['data']['body']) ) {
     //			$response->end($data['data']['length']['data']['body']);
     //		} else {
     //			$response->end(json_encode($data['data']['length']));
     //		}
     if (isset($data['data']['trunked']['data']['body'])) {
         $response->end($data['data']['trunked']['data']['body']);
     } else {
         $response->end(json_encode($data['data']['trunked']));
     }
 }