url_match('wikipedia.org/wiki', 'mediawiki.org/wiki'); } /** * * @param HttpResource $asset * */ public function render($asset) { if (!$this->accept($asset)) { return; } $domain = $asset->url_domain(); $description = $asset->findx('//div[@id="bodyContent"]/p'); $result = array(); $result[self::EMBED_SNIPPET] = $description; $result[self::TITLE] = $title; $result[self::DESCRIPTION] = $description; $result[self::TAGS] = $keywords; return $result; } }