PHP Класс Symfony\Bundle\FrameworkBundle\HttpKernel

Автор: Fabien Potencier ([email protected])
Автор: Johannes M. Schmitt ([email protected])
Наследование: extends Symfony\Component\HttpKernel\HttpKernel
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Symfony\Component\DependencyInjection\ContainerInterface $container, Symfony\Component\HttpKernel\Controller\ControllerResolverInterface $controllerResolver )
forward ( string $controller, array $attributes = [], array $query = [] ) : Response Forwards the request to another controller.
generateInternalUri ( string $controller, array $attributes = [], array $query = [] ) : string Generates an internal URI for a given controller.
handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true )
render ( string $controller, array $options = [] ) : string Renders a Controller and returns the Response content.

Описание методов

__construct() публичный Метод

public __construct ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, Symfony\Component\DependencyInjection\ContainerInterface $container, Symfony\Component\HttpKernel\Controller\ControllerResolverInterface $controllerResolver )
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$container Symfony\Component\DependencyInjection\ContainerInterface
$controllerResolver Symfony\Component\HttpKernel\Controller\ControllerResolverInterface

forward() публичный Метод

Forwards the request to another controller.
public forward ( string $controller, array $attributes = [], array $query = [] ) : Response
$controller string The controller name (a string like BlogBundle:Post:index)
$attributes array An array of request attributes
$query array An array of request query parameters
Результат Response A Response instance

generateInternalUri() публичный Метод

This method uses the "_internal" route, which should be available.
public generateInternalUri ( string $controller, array $attributes = [], array $query = [] ) : string
$controller string A controller name to execute (a string like BlogBundle:Post:index), or a relative URI
$attributes array An array of request attributes
$query array An array of request query parameters
Результат string An internal URI

handle() публичный Метод

public handle ( Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true )
$request Symfony\Component\HttpFoundation\Request

render() публичный Метод

Note that this method generates an esi:include tag only when both the standalone option is set to true and the request has ESI capability (@see Symfony\Component\HttpKernel\HttpCache\ESI). Available options: * attributes: An array of request attributes (only when the first argument is a controller) * query: An array of request query parameters (only when the first argument is a controller) * ignore_errors: true to return an empty string in case of an error * alt: an alternative controller to execute in case of an error (can be a controller, a URI, or an array with the controller, the attributes, and the query arguments) * standalone: whether to generate an esi:include tag or not when ESI is supported * comment: a comment to add when returning an esi:include tag
public render ( string $controller, array $options = [] ) : string
$controller string A controller name to execute (a string like BlogBundle:Post:index), or a relative URI
$options array An array of options
Результат string The Response content