public function getPagesIndex($nb = 11, $absolute = false)
    {
        $space = ($nb - 1) / 2;
        $start = $this->getCurPage() - $space;
        $end = $this->getCurPage() + $space;
        if ($start < 1 && $end > $this->getNbPages()) {
            $start = 1;
            $end = $this->getNbPages();
        } elseif ($start < 1) {
            $start = 1;
            $end = $nb - 1;
        } elseif ($end > $this->getNbPages()) {
            $end = $this->getNbPages();
            $start = $end - $nb + 1;
        }

        if ($start < 1) {
            $start = 1;
        }
        if ($end > $this->getNbPages()) {
            $end = $this->getNbPages();
        }

        $ret = array();
        for ($i = $start; $i <= $end; ++$i) {
            $ret[$i] = array(
                $this->getUrl($i, $absolute),
                $i == $this->getCurPage(),
            );
        }

        return $ret;
    }
public function getPagesIndex($nb = 11, $absolute = false)
    {
        $space = ($nb - 1) / 2;
        $start = $this->getCurPage() - $space;
        $end = $this->getCurPage() + $space;
        if ($start < 1 && $end > $this->getNbPages()) {
            $start = 1;
            $end = $this->getNbPages();
        } elseif ($start < 1) {
            $start = 1;
            $end = $nb - 1;
        } elseif ($end > $this->getNbPages()) {
            $end = $this->getNbPages();
            $start = $end - $nb + 1;
        }

        if ($start < 1) {
            $start = 1;
        }
        if ($end > $this->getNbPages()) {
            $end = $this->getNbPages();
        }

        $ret = array();
        for ($i = $start; $i <= $end; ++$i) {
            $ret[$i] = array(
                $this->getUrl($i, $absolute),
                $i == $this->getCurPage(),
            );
        }

        return $ret;
    }
public function getPagesIndex ( $ nb = 11 , $ absolute = false ) { $ space = ( $ nb - 1 ) / 2 ; $ start = $ this -> getCurPage ( ) - $ space ; $ end = $ this -> getCurPage ( ) + $ space ; if ( $ start < 1 && $ end > $ this -> getNbPages ( ) ) { $ start = 1 ; $ end = $ this -> getNbPages ( ) ; } elseif ( $ start < 1 ) { $ start = 1 ; $ end = $ nb - 1 ; } elseif ( $ end > $ this -> getNbPages ( ) ) { $ end = $ this -> getNbPages ( ) ; $ start = $ end - $ nb + 1 ; } if ( $ start < 1 ) { $ start = 1 ; } if ( $ end > $ this -> getNbPages ( ) ) { $ end = $ this -> getNbPages ( ) ; } $ ret = array ( ) ; for ( $ i = $ start ; $ i <= $ end ; ++ $ i ) { $ ret [ $ i ] = array ( $ this -> getUrl ( $ i , $ absolute ) , $ i == $ this -> getCurPage ( ) , ) ; } return $ ret ; }
Get Pages index URLs.

@param int  $nb       Number of pages to be shown in the index
@param bool $absolute Indicate if the URI should be absolute

@return array
Get Pages index URLs .