Goose\Modules\Extractors\PublishDateExtractor::run PHP Method

run() public method

public run ( Goose\Article $article ) : DateTime
$article Goose\Article
return DateTime
    public function run(Article $article)
    {
        $this->article($article);
        $dt = null;
        $dt = $this->getDateFromSchemaOrg();
        if (is_null($dt)) {
            $dt = $this->getDateFromOpenGraph();
        }
        if (is_null($dt)) {
            $dt = $this->getDateFromURL();
        }
        if (is_null($dt)) {
            $dt = $this->getDateFromDublinCore();
        }
        if (is_null($dt)) {
            $dt = $this->getDateFromParsely();
        }
        $article->setPublishDate($dt);
    }