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; } $api->setCheckIfNoneMatch(true)->setBody(json_encode( array('owner' => (string)$path->owner->pseudo, 'geom' => (string)$path->geom) )); } }