Imdb\Person::name PHP Method

name() public method

Get the name of the person
See also: IMDB person page / (Main page)
public name ( ) : string
return string name full name of the person
    public function name()
    {
        if (empty($this->fullname)) {
            $this->getPage("Name");
            if (preg_match("/<title>(.*?) - IMDb<\\/title>/i", $this->page["Name"], $match)) {
                $this->fullname = trim($match[1]);
            } elseif (preg_match("/<title>IMDb - (.*?)<\\/title>/i", $this->page["Name"], $match)) {
                $this->fullname = trim($match[1]);
            }
        }
        return $this->fullname;
    }