public function z_statpage($sid, $part = 'text') { $sp = new Z_Statpage($sid); if ($part == 'title') { return $sp->getTitle(); } else { return $sp; } }
public function showAction() { $sid = $this->getRequest()->getParam('id'); if ($sid === NULL) { $sid = 'error'; } $page = new Z_Statpage($sid); if ($page->isError()) { $this->getResponse()->setHttpResponseCode(404); } $this->view->page = $page; }
public function __construct($sid) { self::$_model = new Z_Model_Statpage(); $cache = Z_Cache::getInstance(); if (!($this->_row = $cache->load('z_spatpage_' . md5($sid)))) { $this->_row = $this->_getRow($sid); $cache->save($this->_row, 'z_spatpage_' . md5($sid)); } }