public function test($testId) { Trace::setDisabled(); $test = new extasyTestModel(); $found = $test->get($testId); if ($found) { $test->execute(); $result = array('lastTestDate' => $test->lastTestDate->getValue(), 'testResult' => $test->obj_lastResult->getAdminViewValue()); die(json_encode($result)); } else { throw new Exception('test model not found '); } }
protected function outputDebugResults() { $this->loadSystemConfig(); $value = intval($this->systemConfig->enable_debug->value); if ($value) { if (CMSAuth::getInstance()->isLogined()) { Trace::setDisabled(false); $this->insertIntoResponse(Trace::finish()); } } }
public function output() { print json_encode($this->aOutput); Trace::setDisabled(); die; }
/** * ------------------------------------------------------------------------------------------- * Формирует данные в json форме * @return * ------------------------------------------------------------------------------------------- */ public function outputJSONP($callback) { print $callback . '(' . json_encode($this->aOutput) . ');'; Trace::setDisabled(); die; }