public function fetchAction($osId) { $os = Entity\Os::findPk($osId); if (!$os) { throw new ApiErrorException(404, ErrorMessage::ERR_OBJECT_NOT_FOUND, "Unable to find requested OS"); } return $this->result($this->adapter('os')->toData($os)); }