Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 * This file is part of the Symfony package.
5
 *
6
 * (c) Fabien Potencier <fabien@symfony.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Symfony\Component\HttpKernel\Controller;
13
 
14
use Symfony\Component\HttpFoundation\Request;
15
 
16
/**
17
 * A ControllerResolverInterface implementation knows how to determine the
18
 * controller to execute based on a Request object.
19
 *
20
 * A Controller can be any valid PHP callable.
21
 *
22
 * @author Fabien Potencier <fabien@symfony.com>
23
 */
24
interface ControllerResolverInterface
25
{
26
    /**
27
     * Returns the Controller instance associated with a Request.
28
     *
29
     * As several resolvers can exist for a single application, a resolver must
30
     * return false when it is not able to determine the controller.
31
     *
32
     * The resolver must only throw an exception when it should be able to load a
33
     * controller but cannot because of some errors made by the developer.
34
     *
35
     * @return callable|false A PHP callable representing the Controller,
36
     *                        or false if this resolver is not able to determine the controller
37
     *
38
     * @throws \LogicException If a controller was found based on the request but it is not callable
39
     */
40
    public function getController(Request $request): callable|false;
41
}