DefaultController::loadData PHP Method

loadData() protected method

protected loadData ( $tag, $maxRetry )
    protected function loadData($tag, $maxRetry = 0)
    {
        for ($retry = 0; $retry <= $maxRetry; ++$retry) {
            $manifest = $this->getManifest($retry > 0);
            if (isset($manifest[$tag])) {
                $path = $this->getOwner()->logPath;
                $dataFile = "{$path}/{$tag}.data";
                $data = unserialize(file_get_contents($dataFile));
                foreach ($this->getOwner()->panels as $id => $panel) {
                    if (isset($data[$id])) {
                        $panel->load($data[$id], $tag);
                    } else {
                        // remove the panel since it has not received any data
                        unset($this->getOwner()->panels[$id]);
                    }
                }
                $this->summary = $data['summary'];
                return;
            }
            sleep(1);
        }
        throw new CHttpException(404, "Unable to find debug data tagged with '{$tag}'.");
    }