mirror of
https://github.com/friendica/friendica
synced 2024-06-13 23:36:26 +02:00
Philipp Holzer
8bdd90066f
- Add all dependencies, necessary to run the content (baseUrl, Arguments) - Encapsulate all POST/GET/DELETE/PATCH/PUT methods as protected methods inside the BaseModule - Return Module content ONLY per `BaseModule::run()` (including the Hook logic there as well)
22 lines
566 B
PHP
22 lines
566 B
PHP
<?php
|
|
|
|
namespace Friendica\Capabilities;
|
|
|
|
use Friendica\Network\HTTPException;
|
|
|
|
/**
|
|
* This interface provides the capability to handle requests from clients and returns the desired outcome
|
|
*/
|
|
interface ICanHandleRequests
|
|
{
|
|
/**
|
|
* @param array $post The $_POST content (in case of POST)
|
|
* @param array $request The $_REQUEST content (in case of GET, POST)
|
|
*
|
|
* @return string Returns the content of the module as string
|
|
*
|
|
* @throws HTTPException\InternalServerErrorException
|
|
*/
|
|
public function run(array $post = [], array $request = []): string;
|
|
}
|