getRequest(); $response = $this->getResponse(); $idx = $request->idx; $pathMapper = new Syj_Model_PathMapper(); $path = new Syj_Model_Path(); $api = $this->_helper->SyjApi; if (!$pathMapper->find($idx, $path)) { if ($pathMapper->hasexisted($idx)) { $api->setCode(410); } else { $api->setCode(404); } return; } $data = array('geom' => (string)$path->geom, 'title' => (string)$path->displayTitle); if ($path->creator) { $data['creator'] = (string)$path->creator->pseudo; } $api->setCheckIfNoneMatch(true)->setBodyJson($data); } }