/** Setup the index page for rulers */ public function indexAction() { $byzantium = new Rulers(); $byz = $byzantium->getRulersByzantineList($this->_getParam('page')); $contexts = array('json', 'xml'); if (in_array($this->_helper->contextSwitch()->getCurrentContext(), $contexts)) { $data = array('pageNumber' => $byz->getCurrentPageNumber(), 'total' => number_format($byz->getTotalItemCount(), 0), 'itemsReturned' => $byz->getCurrentItemCount(), 'totalPages' => number_format($byz->getTotalItemCount() / $byz->getCurrentItemCount(), 0)); $this->view->data = $data; $byza = array(); foreach ($byz as $r) { $byza[]['ruler'] = array('id' => $r->id, 'name' => $r->issuer); } $this->view->rulers = $byza; } else { $this->view->byzantium = $byz; } }
/** Setup the index page for rulers * @access public * @return void */ public function indexAction() { $this->view->rulers = $this->_rulers->getRulersByzantineList($this->getParam('page')); }