Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
 
3
/**
4
 * Slim Framework (https://slimframework.com)
5
 *
6
 * @license https://github.com/slimphp/Slim/blob/4.x/LICENSE.md (MIT License)
7
 */
8
 
9
declare(strict_types=1);
10
 
11
namespace Slim\Interfaces;
12
 
13
use Psr\Http\Message\ResponseInterface;
14
use Psr\Http\Message\ServerRequestInterface;
15
 
16
/**
17
 * Defines a contract for invoking a route callable.
18
 */
19
interface InvocationStrategyInterface
20
{
21
    /**
22
     * Invoke a route callable.
23
     *
24
     * @param callable               $callable       The callable to invoke using the strategy.
25
     * @param ServerRequestInterface $request        The request object.
26
     * @param ResponseInterface      $response       The response object.
27
     * @param array<string, string>  $routeArguments The route's placeholder arguments
28
     *
29
     * @return ResponseInterface The response from the callable.
30
     */
31
    public function __invoke(
32
        callable $callable,
33
        ServerRequestInterface $request,
34
        ResponseInterface $response,
35
        array $routeArguments
36
    ): ResponseInterface;
37
}