error === null && $this->html !== ''; } } /** * How a page's HTML is obtained. Kept behind an interface so the extraction * pipeline is identical whether the markup came from a plain HTTP GET or from a * headless browser -- and so the engine can be exercised from the CLI without * tt-rss present. */ interface Fetcher { /** @param array $headers extra request headers (lowercased names) */ public function fetch(string $url, array $headers = []): FetchResult; /** Short identifier used in logs and the prefs UI. */ public function name(): string; }