public function fetchVariableAction($farmId, $name) { $this->getFarm($farmId); $globalVar = $this->getVariableInstance(); $fetch = $this->getGlobalVariable($name, $globalVar, 0, $farmId); if (empty($fetch)) { throw new ApiErrorException(404, ErrorMessage::ERR_OBJECT_NOT_FOUND, "Requested Global Variable does not exist."); } return $this->result($this->adapter('globalVariable')->convertData($fetch)); }