public function excute() { $response = $this->_objDispatcher->getResponse(); $objFetch = new \Application\Models\Coroutine\Fetch(); $data = (yield $objFetch->getFromUdp()); $response->end(json_encode($data)); }
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)); } }
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)); }
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'])); } }