Esempio n. 1
0
 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 ');
     }
 }
Esempio n. 2
0
 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());
         }
     }
 }
Esempio n. 3
0
 public function output()
 {
     print json_encode($this->aOutput);
     Trace::setDisabled();
     die;
 }
Esempio n. 4
0
 /**
  *   -------------------------------------------------------------------------------------------
  *   Формирует данные в json форме
  *   @return
  *   -------------------------------------------------------------------------------------------
  */
 public function outputJSONP($callback)
 {
     print $callback . '(' . json_encode($this->aOutput) . ');';
     Trace::setDisabled();
     die;
 }