2021-11-21 14:06:36 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Capabilities;
|
|
|
|
|
|
|
|
interface IRespondToRequests
|
|
|
|
{
|
2021-11-21 15:52:36 -05:00
|
|
|
const TYPE_HTML = 'html';
|
|
|
|
const TYPE_XML = 'xml';
|
|
|
|
const TYPE_JSON = 'json';
|
|
|
|
const TYPE_ATOM = 'atom';
|
|
|
|
const TYPE_RSS = 'rss';
|
2021-11-21 14:06:36 -05:00
|
|
|
|
|
|
|
const ALLOWED_TYPES = [
|
2021-11-21 15:52:36 -05:00
|
|
|
self::TYPE_HTML,
|
|
|
|
self::TYPE_XML,
|
|
|
|
self::TYPE_JSON,
|
|
|
|
self::TYPE_ATOM,
|
|
|
|
self::TYPE_RSS
|
2021-11-21 14:06:36 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns all set headers during the module execution
|
|
|
|
*
|
2021-11-21 15:52:36 -05:00
|
|
|
* @return string[]
|
2021-11-21 14:06:36 -05:00
|
|
|
*/
|
|
|
|
public function getHeaders(): array;
|
|
|
|
|
|
|
|
/**
|
2021-11-21 15:52:36 -05:00
|
|
|
* Returns the output of the module (mixed content possible)
|
2021-11-21 14:06:36 -05:00
|
|
|
*
|
2021-11-21 15:52:36 -05:00
|
|
|
* @return mixed
|
2021-11-21 14:06:36 -05:00
|
|
|
*/
|
2021-11-21 15:52:36 -05:00
|
|
|
public function getContent();
|
2021-11-21 14:06:36 -05:00
|
|
|
|
|
|
|
/**
|
2021-11-21 15:52:36 -05:00
|
|
|
* Returns the response type
|
2021-11-21 14:06:36 -05:00
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2021-11-21 15:52:36 -05:00
|
|
|
public function getType(): string;
|
2021-11-21 14:06:36 -05:00
|
|
|
}
|