W3cubDocs

/Symfony 4.1

AbstractSurrogateFragmentRenderer

abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRenderer

Implements Surrogate rendering strategy.

Methods

setFragmentPath(string $path)

Sets the fragment path that triggers the fragment listener.

from RoutableFragmentRenderer
string generateFragmentUri(ControllerReference $reference, Request $request, bool $absolute = false, bool $strict = true)

Generates a fragment URI for a given controller.

from RoutableFragmentRenderer
__construct(SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null)

The "fallback" strategy when surrogate is not available should always be an instance of InlineFragmentRenderer.

Response render(string|ControllerReference $uri, Request $request, array $options = array())

Renders a URI and returns the Response content.

Details

setFragmentPath(string $path)

Sets the fragment path that triggers the fragment listener.

Parameters

string $path The path

See also

FragmentListener

protected string generateFragmentUri(ControllerReference $reference, Request $request, bool $absolute = false, bool $strict = true)

Generates a fragment URI for a given controller.

Parameters

ControllerReference $reference A ControllerReference instance
Request $request A Request instance
bool $absolute Whether to generate an absolute URL or not
bool $strict Whether to allow non-scalar attributes or not

Return Value

string A fragment URI

__construct(SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null)

The "fallback" strategy when surrogate is not available should always be an instance of InlineFragmentRenderer.

Parameters

SurrogateInterface $surrogate An Surrogate instance
FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported
UriSigner $signer

Response render(string|ControllerReference $uri, Request $request, array $options = array())

Renders a URI and returns the Response content.

Parameters

string|ControllerReference $uri A URI as a string or a ControllerReference instance
Request $request A Request instance
array $options An array of options

Return Value

Response A Response instance

See also

SurrogateInterface