RePod-Nextcloud-App/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php

58 lines
1.1 KiB
PHP
Raw Normal View History

2023-08-02 12:13:16 +02:00
<?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;
}