Renders a URI that represents a resource fragment.
This class handles the rendering of resource fragments that are included into a main resource. The handling of the rendering is managed by specialized renderers.
This listener works in 2 modes:
- 2.3 compatibility mode where you must call setRequest whenever the Request changes.
- 2.4+ mode where you must pass a RequestStack instance in the constructor.
at line 49
__construct(RequestStack $requestStack = null, FragmentRendererInterface $renderers = array(), bool $debug = false)
RequestStack will become required in 3.0.
at line 79
Adds a renderer.
at line 95
setRequest(Request $request = null)
Sets the current Request.
This method was used to synchronize the Request, but as the HttpKernel is doing that automatically now, you should never call it directly. It is kept public for BC with the 2.3 version.
at line 118
render(string|ControllerReference $uri, string $renderer = 'inline', array $options = array())
Renders a URI and returns the Response content.
- ignore_errors: true to return an empty string in case of an error
at line 145
Delivers the Response as a string.
When the Response is a StreamedResponse, the content is streamed immediately instead of being returned.