2021-11-14 14:28:36 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Capabilities;
|
|
|
|
|
2021-11-20 09:38:03 -05:00
|
|
|
use Friendica\Network\HTTPException;
|
2021-11-21 17:37:17 -05:00
|
|
|
use Psr\Http\Message\ResponseInterface;
|
2021-11-20 09:38:03 -05:00
|
|
|
|
2021-11-14 14:28:36 -05:00
|
|
|
/**
|
|
|
|
* This interface provides the capability to handle requests from clients and returns the desired outcome
|
|
|
|
*/
|
|
|
|
interface ICanHandleRequests
|
|
|
|
{
|
|
|
|
/**
|
2021-11-20 09:38:03 -05:00
|
|
|
* @param array $post The $_POST content (in case of POST)
|
|
|
|
* @param array $request The $_REQUEST content (in case of GET, POST)
|
2021-11-14 14:28:36 -05:00
|
|
|
*
|
2021-11-21 17:37:17 -05:00
|
|
|
* @return ResponseInterface responding to the request handling
|
2021-11-14 14:28:36 -05:00
|
|
|
*
|
2021-11-20 09:38:03 -05:00
|
|
|
* @throws HTTPException\InternalServerErrorException
|
2021-11-14 14:28:36 -05:00
|
|
|
*/
|
2021-11-21 17:37:17 -05:00
|
|
|
public function run(array $post = [], array $request = []): ResponseInterface;
|
2021-11-14 14:28:36 -05:00
|
|
|
}
|