HEX
Server: Apache/2.4.65 (Debian)
System: Linux 88f31f35b0b8 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/wp-rss-aggregator/core/src/RssReader.php
<?php

declare(strict_types=1);

namespace RebelCode\Aggregator\Core;

use RebelCode\Aggregator\Core\RssReader\RssFeed;
use RebelCode\Aggregator\Core\RssReader\RssFeedInfo;
use RebelCode\Aggregator\Core\Utils\Result;

interface RssReader {

	/**
	 * Reads an RSS feed from a URI and creates an `RssFeed` object.
	 *
	 * @param string $uri The URI of the RSS feed.
	 * @param bool   $autoDiscover Whether to auto-discover feeds from the URI.
	 * @return Result<RssFeed>
	 */
	public function read( string $uri, bool $autoDiscover = false ): Result;

	/**
	 * Finds RSS feeds for a given URI and returns a list `RssFeedInfo` objects.
	 *
	 * @param string $uri The URI of the RSS feed.
	 * @return Result<RssFeedInfo[]>
	 */
	public function findFeeds( string $uri ): Result;
}