1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-11-21 22:42:48 +01:00
Nextcloud-News/lib/Scraper/IScraper.php
Petros Koutsolampros d27dddad25 Allow getContent() in Scraper and IScraper to return null (#606)
Allow getContent() in Scraper and IScraper to return null
2020-01-07 14:57:19 +01:00

44 lines
837 B
PHP

<?php
/**
* Nextcloud - News
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Gioele Falcetti <thegio.f@gmail.com>
* @copyright 2019 Gioele Falcetti
*/
namespace OCA\News\Scraper;
interface IScraper
{
/**
* Scrape feed url
*
* @param string $url
*
* @return bool False if failed
*
*/
public function scrape(string $url): bool;
/**
* Get the scraped content
*
* @return string|null
*
*/
public function getContent(): ?string;
/**
* Get the RTL (rigth-to-left) information
*
* @param bool $default Return this value if the scraper is unable to determine it
*
* @return bool
*
*/
public function getRTL(bool $default = false): bool;
}