repod/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php
Michel Roux df30ff2318
All checks were successful
repod / nextcloud (push) Successful in 47s
repod / nodejs (push) Successful in 1m18s
Readd gpodder stubs
2023-08-02 12:13:16 +02:00

58 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\GPodderSync\Core\PodcastData;
/**
* @psalm-type PodcastDataType = array{
* title: ?string,
* author: ?string,
* link: ?string,
* description: ?string,
* imageUrl: ?string,
* fetchedAtUnix: int,
* imageBlob: ?string
* }
*/
interface PodcastData extends \JsonSerializable
{
public function __toString(): string;
/**
* @throws \Exception if the XML data could not be parsed
*/
public static function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null): PodcastData;
public function getTitle(): ?string;
public function getAuthor(): ?string;
public function getLink(): ?string;
public function getDescription(): ?string;
public function getImageUrl(): ?string;
public function getFetchedAtUnix(): ?int;
public function getImageBlob(): ?string;
public function setImageBlob(?string $blob): void;
/**
* @return PodcastDataType
*/
public function toArray(): array;
/**
* @return PodcastDataType
*/
public function jsonSerialize(): array;
/**
* @param PodcastDataType $data
*/
public static function fromArray(array $data): PodcastData;
}