public static function getPurposeList() { $purpose = array(); if (($d1 = opendir(TASK_PATH)) == false) { return $purpose; } while (($d2 = readdir($d1)) !== false) { if (!is_dir(TASK_PATH . $d2) || $d2 == "." || $d2 == "..") { continue; } $p = TASK_PATH . $d2 . "/"; $f = $p . "SUMMARY.txt"; if (!file_exists($f)) { continue; } $sd = TableFile::getAllData($f); if (!$sd) { continue; } $l = array(); foreach ($sd as $d) { if ($d['aim'] != self::$aim) { continue; } $f = $p . 'data/' . $d['table']; if (file_exists($f)) { $l[] = array('table' => $d['table'], 'info' => $d['info'], 'url' => Url::getBasePhp('Sheet') . '?task=' . $d2 . '&table=' . $d['table'] . '&info=' . $d['info']); } } if ($l) { $f = $p . "README.txt"; $re = array(); if (file_exists($f)) { $re = BaseFile::getFileContent($f); $re = explode("\r\n", $re); } $purpose[ucfirst($d2)] = array('readme' => $re, 'list' => $l); } } return $purpose; }
public static function _getRefer($file) { $refer = array(); if (!file_exists($file)) { return $refer; } $refer = parent::getAllData($file); return $refer; }
public static function ReadTable($file) { return TableFile::getAllData($file); }
public function _getData($file) { $this->_innerData = TableFile::getAllData($file); return $this->_innerData; }