Documentation

Fallback
in package
implements HandlerInterface

A fallback thumbnail handler creating a document-like icon filled with the resource's mime type

Tags
author

zozlak

Table of Contents

Interfaces

HandlerInterface
Description of FormatInterface

Properties

$config  : object

Methods

__construct()  : mixed
createThumbnail()  : void
Creates a thumbnail with given dimensions for a given resource
getHandledMimeTypes()  : array<string|int, string>
Returns a list of handled mime types.
maintainsAspectRatio()  : bool
Is the handler able to maintain the aspect ratio? (in other words is it possible to pass only one dimension and the other will be computed automatically)
createFromMap()  : Imagick
createFromTemplate()  : Imagick
createGeneric()  : Imagick
findFontSize()  : float

Properties

Methods

__construct()

public __construct(object $config) : mixed
Parameters
$config : object

createThumbnail()

Creates a thumbnail with given dimensions for a given resource

public createThumbnail(Resource $resource, int $width, int $height, string $path) : void
Parameters
$resource : Resource
$width : int
$height : int
$path : string

getHandledMimeTypes()

Returns a list of handled mime types.

public getHandledMimeTypes() : array<string|int, string>
Return values
array<string|int, string>

maintainsAspectRatio()

Is the handler able to maintain the aspect ratio? (in other words is it possible to pass only one dimension and the other will be computed automatically)

public maintainsAspectRatio() : bool
Return values
bool

createFromMap()

private createFromMap(string $imgPath, int $width, int $height) : Imagick
Parameters
$imgPath : string
$width : int
$height : int
Return values
Imagick

createFromTemplate()

private createFromTemplate(string $label, int $width, int $height, string $tmplPath, float $lx, float $ly, float $lw, float $lh, string $textColor, float $textWeight, int $labelMinLen) : Imagick
Parameters
$label : string
$width : int
$height : int
$tmplPath : string
$lx : float
$ly : float
$lw : float
$lh : float
$textColor : string
$textWeight : float
$labelMinLen : int
Return values
Imagick

createGeneric()

private createGeneric(string $label, int $width, int $height, float $strokeWidth, string $textColor, int $textWeight, int $labelMinLen) : Imagick
Parameters
$label : string
$width : int
$height : int
$strokeWidth : float
$textColor : string
$textWeight : int
$labelMinLen : int
Return values
Imagick

findFontSize()

private findFontSize(Imagick $img, ImagickDraw $draw, float $availWidth, string $label, int $labelMinLen) : float
Parameters
$img : Imagick
$draw : ImagickDraw
$availWidth : float
$label : string
$labelMinLen : int
Return values
float

        
On this page

Search results