Example #1
0
 public function z_statpage($sid, $part = 'text')
 {
     $sp = new Z_Statpage($sid);
     if ($part == 'title') {
         return $sp->getTitle();
     } else {
         return $sp;
     }
 }
Example #2
0
 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;
 }
Example #3
0
 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));
     }
 }