Imdb\Title::fromSearchResult PHP Method

fromSearchResult() public static method

Create an imdb object populated with id, title, year, and movie type
public static fromSearchResult ( string $id, string $title, integer $year, string $type, Config $config = null, Psr\Log\LoggerInterface $logger = null, CacheInterface $cache = null ) : Title
$id string imdb ID
$title string film title
$year integer
$type string
$config Config
$logger Psr\Log\LoggerInterface OPTIONAL override default logger
$cache CacheInterface OPTIONAL override default cache
return Title
    public static function fromSearchResult($id, $title, $year, $type, Config $config = null, LoggerInterface $logger = null, CacheInterface $cache = null)
    {
        $imdb = new Title($id, $config, $logger, $cache);
        $imdb->main_title = $title;
        $imdb->main_year = (int) $year;
        $imdb->main_movietype = $type;
        return $imdb;
    }