2021-11-14 20:28:36 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Capabilities;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This interface provides the capability to handle requests from clients and returns the desired outcome
|
|
|
|
*/
|
|
|
|
interface ICanHandleRequests
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Module GET method to display raw content from technical endpoints
|
|
|
|
*
|
|
|
|
* Extend this method if the module is supposed to return communication data,
|
|
|
|
* e.g. from protocol implementations.
|
|
|
|
*/
|
2021-11-14 23:13:47 +01:00
|
|
|
public function rawContent();
|
2021-11-14 20:28:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Module GET method to display any content
|
|
|
|
*
|
|
|
|
* Extend this method if the module is supposed to return any display
|
|
|
|
* through a GET request. It can be an HTML page through templating or a
|
|
|
|
* XML feed or a JSON output.
|
|
|
|
*/
|
2021-11-14 23:13:47 +01:00
|
|
|
public function content(): string;
|
2021-11-14 20:28:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Module DELETE method to process submitted data
|
|
|
|
*
|
|
|
|
* Extend this method if the module is supposed to process DELETE requests.
|
|
|
|
* Doesn't display any content
|
|
|
|
*/
|
2021-11-14 23:13:47 +01:00
|
|
|
public function delete();
|
2021-11-14 20:28:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Module PATCH method to process submitted data
|
|
|
|
*
|
|
|
|
* Extend this method if the module is supposed to process PATCH requests.
|
|
|
|
* Doesn't display any content
|
|
|
|
*/
|
2021-11-14 23:13:47 +01:00
|
|
|
public function patch();
|
2021-11-14 20:28:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Module POST method to process submitted data
|
|
|
|
*
|
|
|
|
* Extend this method if the module is supposed to process POST requests.
|
|
|
|
* Doesn't display any content
|
|
|
|
*/
|
2021-11-14 23:13:47 +01:00
|
|
|
public function post();
|
2021-11-14 20:28:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Module PUT method to process submitted data
|
|
|
|
*
|
|
|
|
* Extend this method if the module is supposed to process PUT requests.
|
|
|
|
* Doesn't display any content
|
|
|
|
*/
|
2021-11-14 23:13:47 +01:00
|
|
|
public function put();
|
2021-11-14 20:28:36 +01:00
|
|
|
|
2021-11-14 23:13:47 +01:00
|
|
|
public function getClassName(): string;
|
2021-11-14 20:28:36 +01:00
|
|
|
}
|