2021-11-14 20:28:36 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Capabilities;
|
|
|
|
|
2021-11-20 15:38:03 +01:00
|
|
|
use Friendica\Network\HTTPException;
|
2021-11-21 23:37:17 +01:00
|
|
|
use Psr\Http\Message\ResponseInterface;
|
2021-11-20 15:38:03 +01:00
|
|
|
|
2021-11-14 20:28:36 +01:00
|
|
|
/**
|
|
|
|
* This interface provides the capability to handle requests from clients and returns the desired outcome
|
|
|
|
*/
|
|
|
|
interface ICanHandleRequests
|
|
|
|
{
|
|
|
|
/**
|
2021-11-20 15:38:03 +01: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 20:28:36 +01:00
|
|
|
*
|
2021-11-21 23:37:17 +01:00
|
|
|
* @return ResponseInterface responding to the request handling
|
2021-11-14 20:28:36 +01:00
|
|
|
*
|
2021-11-20 15:38:03 +01:00
|
|
|
* @throws HTTPException\InternalServerErrorException
|
2021-11-14 20:28:36 +01:00
|
|
|
*/
|
2021-11-21 23:37:17 +01:00
|
|
|
public function run(array $post = [], array $request = []): ResponseInterface;
|
2021-11-14 20:28:36 +01:00
|
|
|
}
|