X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCapabilities%2FICanHandleRequests.php;h=154eae69e5b65ae534fa3057bdf09b4839a8efcf;hb=acba7d25a02827e46298bbb380b96b8ef4e19ca4;hp=23feec2b73a4c3b128e1a40d157e7c9a013a42f8;hpb=645e4edc63a6b4cb273e06590a77f99619037e7b;p=friendica.git diff --git a/src/Capabilities/ICanHandleRequests.php b/src/Capabilities/ICanHandleRequests.php index 23feec2b73..154eae69e5 100644 --- a/src/Capabilities/ICanHandleRequests.php +++ b/src/Capabilities/ICanHandleRequests.php @@ -1,60 +1,40 @@ . + * + */ namespace Friendica\Capabilities; +use Friendica\Network\HTTPException; +use Psr\Http\Message\ResponseInterface; + /** * 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. - */ - public function rawContent(); - - /** - * Module GET method to display any content + * @param array $request The $_REQUEST content (including content from the PHP input stream) * - * 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. - */ - public function content(): string; - - /** - * Module DELETE method to process submitted data + * @return ResponseInterface responding to the request handling * - * Extend this method if the module is supposed to process DELETE requests. - * Doesn't display any content + * @throws HTTPException\InternalServerErrorException */ - public function delete(); - - /** - * Module PATCH method to process submitted data - * - * Extend this method if the module is supposed to process PATCH requests. - * Doesn't display any content - */ - public function patch(); - - /** - * Module POST method to process submitted data - * - * Extend this method if the module is supposed to process POST requests. - * Doesn't display any content - */ - public function post(); - - /** - * Module PUT method to process submitted data - * - * Extend this method if the module is supposed to process PUT requests. - * Doesn't display any content - */ - public function put(); - - public function getClassName(): string; + public function run(array $request = []): ResponseInterface; }