class Response extends Response (View source)

A Thumbnail Response.

Properties

protected Thumbnail $thumbnail

Methods

__construct(Thumbnail $thumbnail, int $status = 200, array $headers = [], bool $public = true, bool $autoEtag = false, bool $autoLastModified = true)

Constructor.

static Response
create(Thumbnail $thumbnail = null, int $status = 200, array $headers = [], bool $public = true, bool $autoEtag = false, bool $autoLastModified = true)

Factory method for chainability.

getThumbnail()

No description

setThumbnail(Thumbnail $thumbnail, bool $autoEtag = false, bool $autoLastModified = true)

No description

setAutoLastModified()

Automatically sets the Last-Modified header according the file modification date.

setAutoEtag()

Automatically sets the ETag header according to the checksum of the file.

Details

__construct(Thumbnail $thumbnail, int $status = 200, array $headers = [], bool $public = true, bool $autoEtag = false, bool $autoLastModified = true)

Constructor.

Parameters

Thumbnail $thumbnail The thumbnail
int $status The response status code
array $headers An array of response headers
bool $public Thumbnails are public by default
bool $autoEtag Whether the ETag header should be automatically set
bool $autoLastModified Whether the Last-Modified header should be automatically set

static Response create(Thumbnail $thumbnail = null, int $status = 200, array $headers = [], bool $public = true, bool $autoEtag = false, bool $autoLastModified = true)

Factory method for chainability.

Parameters

Thumbnail $thumbnail The thumbnail
int $status The response status code
array $headers An array of response headers
bool $public Thumbnails are public by default
bool $autoEtag Whether the ETag header should be automatically set
bool $autoLastModified Whether the Last-Modified header should be automatically set

Return Value

Response

Thumbnail getThumbnail()

Return Value

Thumbnail

setThumbnail(Thumbnail $thumbnail, bool $autoEtag = false, bool $autoLastModified = true)

Parameters

Thumbnail $thumbnail
bool $autoEtag
bool $autoLastModified

setAutoLastModified()

Automatically sets the Last-Modified header according the file modification date.

setAutoEtag()

Automatically sets the ETag header according to the checksum of the file.