HttpKernelInterface

interface HttpKernelInterface HttpKernelInterface handles a Request to convert it to a Response. Constants MASTER_REQUEST SUB_REQUEST Methods Response handle(Request $request, int $type = self::MASTER_REQUEST, bool $catch = true) Handles a Request to convert it to a Response. Details Response handle(Request $request, int $type = self::MASTER_REQUEST, bool $catch = true) Handles a Request to convert it to a Response. When $catch is tru

HttpKernelExtension::renderFragmentStrategy()

string renderFragmentStrategy(string $strategy, string|ControllerReference $uri, array $options = array()) Renders a fragment. Parameters string $strategy A strategy name string|ControllerReference $uri A URI as a string or a ControllerReference instance array $options An array of options Return Value string The fragment content See also FragmentHandler::render()

HttpKernelExtension::renderFragment()

string renderFragment(string|ControllerReference $uri, array $options = array()) Renders a fragment. Parameters string|ControllerReference $uri A URI as a string or a ControllerReference instance array $options An array of options Return Value string The fragment content See also FragmentHandler::render()

HttpKernelExtension::getName()

getName() {@inheritdoc}

HttpKernelExtension::getFunctions()

getFunctions()

HttpKernelExtension::controller()

controller($controller, $attributes = array(), $query = array()) Parameters $controller $attributes $query

HttpKernelExtension

class HttpKernelExtension extends Twig_Extension Provides integration with the HttpKernel component. Methods __construct(FragmentHandler $handler) Constructor. getFunctions() string renderFragment(string|ControllerReference $uri, array $options = array()) Renders a fragment. string renderFragmentStrategy(string $strategy, string|ControllerReference $uri, array $options = array()) Renders a fragment. controller($controller, $attributes = array(), $query = array())

HttpKernel::terminateWithException()

terminateWithException(Exception $exception) Parameters Exception $exception Exceptions LogicException If the request stack is empty

HttpKernel::terminate()

terminate(Request $request, Response $response) Terminates a request/response cycle. Should be called after sending the response and before shutting down the kernel. Parameters Request $request A Request instance Response $response A Response instance

HttpKernel::handle()

Response handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true) Handles a Request to convert it to a Response. When $catch is true, the implementation must catch all exceptions and do its best to convert them to a Response instance. Parameters Request $request A Request instance int $type The type of the request (one of HttpKernelInterface::MASTERREQUEST or HttpKernelInterface::SUBREQUEST) bool $catch Whether to catch exceptions or not Re