class Controller implements ControllerProviderInterface (View source)

Controller for the thumbnail route.

Passes the parsed request to the service.

Methods

connect(Application $app)

{@inheritdoc}

thumbnail(Application $app, Request $request, string $file, string $action, int $width, int $height)

Returns a thumbnail response.

alias(Application $app, Request $request, string $file, string $alias)

Returns a thumbnail response.

serve(Application $app, Request $request, string $file, string $action, int $width, int $height)

Serve a request for a thumbnail

boolean
isRestricted(Application $app, Request $request)

Check if thumbnail request for specific resolution is allowed

defaultResponse(Application $app, Request $request)

Get the default error image on restriction errors or undefined aliases

Details

connect(Application $app)

{@inheritdoc}

Parameters

Application $app

Response thumbnail(Application $app, Request $request, string $file, string $action, int $width, int $height)

Returns a thumbnail response.

Parameters

Application $app
Request $request
string $file
string $action
int $width
int $height

Return Value

Response

Response alias(Application $app, Request $request, string $file, string $alias)

Returns a thumbnail response.

Parameters

Application $app
Request $request
string $file
string $alias

Return Value

Response

protected Response serve(Application $app, Request $request, string $file, string $action, int $width, int $height)

Serve a request for a thumbnail

Parameters

Application $app
Request $request
string $file
string $action
int $width
int $height

Return Value

Response

protected boolean isRestricted(Application $app, Request $request)

Check if thumbnail request for specific resolution is allowed

Parameters

Application $app
Request $request

Return Value

boolean

protected Response defaultResponse(Application $app, Request $request)

Get the default error image on restriction errors or undefined aliases

Parameters

Application $app
Request $request

Return Value

Response