Imdb\Title::getUrlSuffix PHP Method

getUrlSuffix() protected method

protected getUrlSuffix ( string $pageName ) : string
$pageName string internal name of the page
return string
    protected function getUrlSuffix($pageName)
    {
        if (isset($this->pageUrls[$pageName])) {
            return $this->pageUrls[$pageName];
        }
        if (preg_match('!^Episodes-(\\d+)$!', $pageName, $match)) {
            return '/episodes?season=' . $match[1];
        }
        throw new \Exception("Could not find URL for page {$pageName}");
    }