path = $testFile; $sourceString = file_get_contents($testFile); $source = json_decode($sourceString, true); foreach ($source as $key => $view) { if ($key != "-1" && is_numeric($key) == TRUE) { $viewObj = new View($view, $key); array_push($this->viewList, $viewObj); } } if (array_key_exists("runtime", $source)) { $this->runTime = $source["runtime"]; } if (array_key_exists("locktime", $source)) { $this->lockTime = $source["locktime"]; } if (array_key_exists("msgcount", $source)) { $this->msgCount = $source["msgcount"]; } $this->name = str_replace(".json", "", basename($testFile)); $this->lockRunTime = $this->lockTime / $this->runTime; $this->lockTimeMsgCount = $this->lockTime / $this->msgCount; } public function toHTML() { $result = "
Runtitme:$this->runTimeLockTime$this->lockTimeMsgCount:$this->msgCount
"; foreach ($this->viewList as $value) { $result .= $value->toHTML(); } return $result; } } ?>