27 lines
574 B
PHP
27 lines
574 B
PHP
|
<?php declare(strict_types=1);
|
||
|
|
||
|
namespace Orbit;
|
||
|
|
||
|
use Monolog\Logger;
|
||
|
|
||
|
/**
|
||
|
* Module interface
|
||
|
*
|
||
|
* This represents some work that a request->response handler can do
|
||
|
*
|
||
|
* @package Orbit
|
||
|
*/
|
||
|
interface ModuleInterface
|
||
|
{
|
||
|
/**
|
||
|
* Handle
|
||
|
*
|
||
|
* Take a request and generate a response
|
||
|
*
|
||
|
* Must return an array with two values: [bool, Response];
|
||
|
* The first value (bool) must indicate whether the response should
|
||
|
* continue on or if it should be returned immediately to the client.
|
||
|
*/
|
||
|
public function handle(Request $request): array;
|
||
|
}
|