public static function checkCache() { if (CShell::caching() && ($page = self::isPageReady(PageTool::getVersion(PageTool::getPage(), CShell::pages()), CShell::target(), CShell::duration()))) { echo $page; return true; } return false; }
function render($echo = true) { $this->set('ENV', ENV); $page = PageTool::renderPage($this->page, $this->variables); if ($this->cache && $echo) { $pageName = PageTool::getVersion(PageTool::getPage(), CShell::pages()); $dump = ["page" => $page, "timestamp" => time()]; apc_store($pageName, $dump); } if ($echo) { echo $page; } else { return $page; } }
public function share_email() { //For the event iFrame. $cookies = PageTool::getCookies(PageTool::getPage(), CShell::pages()); $refer = $cookies[CShell::REFER]->set && $cookies[CShell::REFER]->val == '1'; $this->set('refer', $refer); }