leilukin-tumbleblog/includes/interface/FeedGenerator.php

91 lines
1.9 KiB
PHP
Raw Normal View History

2024-06-20 14:10:42 +00:00
<?php
/**
* Interface: FeedGenerator
* Describes the functions required by FeedGenerator implementations.
*/
interface FeedGenerator {
/**
* Function: type
* Returns the content type of the feed.
*/
public static function type(): string;
/**
* Function: open
* Opens the feed.
*/
2025-01-13 09:56:01 +00:00
public function open(
$title,
$subtitle,
$id,
$updated
): bool;
2024-06-20 14:10:42 +00:00
/**
* Function: entry
* Adds an individual entry to the feed.
*/
public function entry(
$title,
$id,
$content,
$link,
$published,
$updated,
$name,
$uri,
$email
): bool;
/**
* Function: category
* Adds a category to an entry or feed.
*/
2025-01-13 09:56:01 +00:00
public function category(
$term,
$scheme,
$label
): bool;
2024-06-20 14:10:42 +00:00
/**
* Function: rights
* Adds human-readable licensing information to an entry or feed.
*/
2025-01-13 09:56:01 +00:00
public function rights(
$text
): bool;
2024-06-20 14:10:42 +00:00
/**
* Function: enclosure
* Adds a link for a resource that is potentially large in size.
*/
2025-01-13 09:56:01 +00:00
public function enclosure(
$link,
$length,
$type,
$title
): bool;
2024-06-20 14:10:42 +00:00
/**
* Function: related
* Adds a link for a resource related to an entry or feed.
*/
2025-01-13 09:56:01 +00:00
public function related(
$link
): bool;
2024-06-20 14:10:42 +00:00
/**
* Function: feed
* Returns the generated feed.
*/
2025-01-13 09:56:01 +00:00
public function feed(
): string;
2024-06-20 14:10:42 +00:00
/**
* Function: display
* Displays the generated feed.
*/
2025-01-13 09:56:01 +00:00
public function display(
): bool;
2024-06-20 14:10:42 +00:00
}