]> git.mxchange.org Git - friendica.git/blob - src/Capabilities/ICanHandleRequests.php
Introduce `Response` for Modules to create a testable way for module responses
[friendica.git] / src / Capabilities / ICanHandleRequests.php
1 <?php
2
3 namespace Friendica\Capabilities;
4
5 use Friendica\Network\HTTPException;
6
7 /**
8  * This interface provides the capability to handle requests from clients and returns the desired outcome
9  */
10 interface ICanHandleRequests
11 {
12         /**
13          * @param array $post    The $_POST content (in case of POST)
14          * @param array $request The $_REQUEST content (in case of GET, POST)
15          *
16          * @return IRespondToRequests responding to the request handling
17          *
18          * @throws HTTPException\InternalServerErrorException
19          */
20         public function run(array $post = [], array $request = []): IRespondToRequests;
21 }