class TileSingleImage extends Job implements ShouldQueue

Traits

InteractsWithQueue
SerializesModels
Queueable
Dispatchable

Properties

Image $image

The image to generate tiles for.

string $tempPath

Path to the temporary storage file for the tiles.

protected bool $deleteWhenMissingModels

Ignore this job if the image does not exist any more.

Methods

void
__construct(Image $image)

Create a new job instance.

void
handle()

Execute the job.

generateTiles(Image $image, string $path)

Generate tiles for the image and put them to temporary storage.

uploadToStorage($disk)

Upload the tiles from temporary local storage to the tiles storage disk.

uploadToS3Storage(AwsS3V3Adapter $disk)

Upload the tiles from temporary local storage to the s3 tiles storage disk.

getClient(mixed $disk)

Returns the S3Client of the s3 storage.

string
getBucket(mixed $disk)

Returns the s3 bucket name.

sendRequests(Iterator $files, callable $onFullfill = null)

Upload files to the S3 storage.

Image
getVipsImage(string $path)

Get the vips image instance.

getIterator(string $path)

Get the recursive directory iterator for the given path.

Details

at line 54
void __construct(Image $image)

Create a new job instance.

Parameters

Image $image

The image to generate tiles for.

Return Value

void

at line 66
void handle()

Execute the job.

Return Value

void

at line 90
generateTiles(Image $image, string $path)

Generate tiles for the image and put them to temporary storage.

Parameters

Image $image
string $path

Path to the cached image file.

at line 102
uploadToStorage($disk)

Upload the tiles from temporary local storage to the tiles storage disk.

Parameters

$disk

at line 124
uploadToS3Storage(AwsS3V3Adapter $disk)

Upload the tiles from temporary local storage to the s3 tiles storage disk.

Parameters

AwsS3V3Adapter $disk

S3 filesystem adapter

at line 167
protected getClient(mixed $disk)

Returns the S3Client of the s3 storage.

Parameters

mixed $disk

S3 filesystem adapter

at line 178
protected string getBucket(mixed $disk)

Returns the s3 bucket name.

Parameters

mixed $disk

S3 filesystem adapter

Return Value

string

bucket name

at line 191
protected sendRequests(Iterator $files, callable $onFullfill = null)

Upload files to the S3 storage.

Parameters

Iterator $files

The files to upload.

callable $onFullfill

Callback for successful uploads.

Exceptions

UploadException

at line 220
protected Image getVipsImage(string $path)

Get the vips image instance.

Parameters

string $path

Return Value

Image

at line 232
protected RecursiveIteratorIterator getIterator(string $path)

Get the recursive directory iterator for the given path.

Parameters

string $path

Return Value

RecursiveIteratorIterator