Imdb\Title::genre PHP Method

genre() public method

Get the movies main genre Since IMDB.COM does not really now a "Main Genre", this simply means the first mentioned genre will be returned.
See also: IMDB page / (TitlePage)
public genre ( ) : string
return string genre first of the genres listed on the movies main page
    public function genre()
    {
        if (empty($this->main_genre)) {
            if (empty($this->moviegenres)) {
                $genres = $this->genres();
            }
            if (!empty($genres)) {
                $this->main_genre = $this->moviegenres[0];
            }
        }
        return $this->main_genre;
    }