public function out() { $this->pache = $GLOBALS['pache']; $this->service = GetService::getInstance(); /* 如果出错的话则不返回html */ if (is_null($this->service->article['id'])) { return ''; } $method = 'out' . (strlen($this->pache->duoshuo) ? 'Duoshuo' : 'Pache'); return $this->{$method}(); }
public function backHTML() { $pache = $GLOBALS['pache']; /* 检查当前的位置(是get.php还是index.php) */ if (isset($GLOBALS['getView'])) { $service = GetService::getInstance(); $currentCategories = $service->article['categories']; } else { if (isset($_GET['categories'])) { $currentCategories = $_GET['categories']; } else { $currentCategories = NULL; } } $str = ''; foreach ($this->categories as $value) { if (strlen($value)) { $str .= self::createLi($value, $currentCategories, $value, $value); } } $str = $str . self::outCustomClassHTML() . self::createLi('', $currentCategories, '', '其它'); $str = '<nav id="class">' . self::noCategories($currentCategories) . $str . '</nav>'; return $str; }
public function __construct() { $this->controller = new GetController(); $this->service = GetService::getInstance(); }
public function init() { $this->service = GetService::getInstance(); $this->article = $this->service->getArticle(); }