public function getUrl($page)
    {
        if (is_null($this->url)) {
            throw new RuntimeException('URL template must be defined');
        }

        if (strpos($this->url, $this->placeholder) !== false) {
            return str_replace($this->placeholder, $page, $this->url);
        } else {
            // Without placeholder, no substitution is done, therefore pagination links won't work
            throw new LogicException('The URL string must contain at least one placeholder to make pagination links work');
        }
    }
public function getUrl($page)
    {
        if (is_null($this->url)) {
            throw new RuntimeException('URL template must be defined');
        }

        if (strpos($this->url, $this->placeholder) !== false) {
            return str_replace($this->placeholder, $page, $this->url);
        } else {
            // Without placeholder, no substitution is done, therefore pagination links won't work
            throw new LogicException('The URL string must contain at least one placeholder to make pagination links work');
        }
    }
public function getUrl ( $ page ) { if ( is_null ( $ this -> url ) ) { throw new RuntimeException ( 'URL template must be defined' ) ; } if ( strpos ( $ this -> url , $ this -> placeholder ) !== false ) { return str_replace ( $ this -> placeholder , $ page , $ this -> url ) ; } else { // Without placeholder, no substitution is done, therefore pagination links won't work throw new LogicException ( 'The URL string must contain at least one placeholder to make pagination links work' ) ; } }
Returns permanent URL substituting a placeholder with current page number

@param integer $page Current page number
@throws \RuntimeException If URL isn't defined
@throws \LogicException In case the URL string hasn't a placeholder
@return string
Returns permanent URL substituting a placeholder with current page number