LazyLoadingFragmentHandler
extends FragmentHandler
in package
Lazily loads fragment renderers from the dependency injection container.
Tags
Table of Contents
- $container : mixed
- $debug : mixed
- $initialized : array<string, bool>
- $renderers : mixed
- $requestStack : mixed
- __construct() : mixed
- addRenderer() : mixed
- Adds a renderer.
- render() : string|null
- Renders a URI and returns the Response content.
- deliver() : string|null
- Delivers the Response as a string.
Properties
$container
private
mixed
$container
$debug
private
mixed
$debug
$initialized
private
array<string, bool>
$initialized
= []
$renderers
private
mixed
$renderers
= []
$requestStack
private
mixed
$requestStack
Methods
__construct()
public
__construct(ContainerInterface $container, RequestStack $requestStack[, bool $debug = false ]) : mixed
Parameters
- $container : ContainerInterface
- $requestStack : RequestStack
- $debug : bool = false
-
Whether the debug mode is enabled or not
Return values
mixed —addRenderer()
Adds a renderer.
public
addRenderer(FragmentRendererInterface $renderer) : mixed
Parameters
- $renderer : FragmentRendererInterface
Return values
mixed —render()
Renders a URI and returns the Response content.
public
render(mixed $uri[, string $renderer = 'inline' ][, array<string|int, mixed> $options = [] ]) : string|null
Parameters
- $uri : mixed
-
A URI as a string or a ControllerReference instance
- $renderer : string = 'inline'
- $options : array<string|int, mixed> = []
Return values
string|null —deliver()
Delivers the Response as a string.
protected
deliver(Response $response) : string|null
When the Response is a StreamedResponse, the content is streamed immediately instead of being returned.
Parameters
- $response : Response
Tags
Return values
string|null —The Response content or null when the Response is streamed