public function render($page, $settings=array())
    {
        $this->settings = array_merge($this->settings, $settings);

        if (!empty($page->currentUri)) {
            $this->htmlAHref = str_replace('?', '&', $this->htmlAHref);
            $this->currentUri = $page->currentUri;
        } else {
            $this->currentUri = $this->di->get('router')->getRewriteUri();
        }

        $html = '';
        if ($page->total_pages > 1) {
            $this->page = $page;

            $this->checkBoundary();

            $html .= '<ul class="pagination">';
            $html .= $this->renderPreviousButton();
            $html .= $this->renderPages();
            $html .= $this->renderNextButton();
            $html .= '</ul>';
        }

        return $html;
    }
public function render($page, $settings=array())
    {
        $this->settings = array_merge($this->settings, $settings);

        if (!empty($page->currentUri)) {
            $this->htmlAHref = str_replace('?', '&', $this->htmlAHref);
            $this->currentUri = $page->currentUri;
        } else {
            $this->currentUri = $this->di->get('router')->getRewriteUri();
        }

        $html = '';
        if ($page->total_pages > 1) {
            $this->page = $page;

            $this->checkBoundary();

            $html .= '<ul class="pagination">';
            $html .= $this->renderPreviousButton();
            $html .= $this->renderPages();
            $html .= $this->renderNextButton();
            $html .= '</ul>';
        }

        return $html;
    }
public function render ( $ page , $ settings = array ( ) ) { $ this -> settings = array_merge ( $ this -> settings , $ settings ) ; if ( ! empty ( $ page -> currentUri ) ) { $ this -> htmlAHref = str_replace ( '?' , '&' , $ this -> htmlAHref ) ; $ this -> currentUri = $ page -> currentUri ; } else { $ this -> currentUri = $ this -> di -> get ( 'router' ) -> getRewriteUri ( ) ; } $ html = '' ; if ( $ page -> total_pages > 1 ) { $ this -> page = $ page ; $ this -> checkBoundary ( ) ; $ html .= '<ul class="pagination">' ; $ html .= $ this -> renderPreviousButton ( ) ; $ html .= $ this -> renderPages ( ) ; $ html .= $ this -> renderNextButton ( ) ; $ html .= '</ul>' ; } return $ html ; }
Renders pagination html

@param $page
@param array $settings
@return string
Renders pagination html