VuFind API Documentation

Router
in package
implements LoggerAwareInterface Uses LoggerAwareTrait

Cover image router

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Interfaces, Classes, Traits and Enums

LoggerAwareInterface

Table of Contents

$coverLoader  : Loader
Cover loader
$dynamicUrl  : string
Base URL for dynamic cover images.
__construct()  : mixed
Constructor
getMetadata()  : false|array<string|int, mixed>|null
Generate a thumbnail metadata (return false if unsupported; return null to indicate that a subsequent AJAX check is needed).
getUrl()  : string|false|null
Generate a thumbnail URL (return false if unsupported; return null to indicate that a subsequent AJAX check is needed).
debug()  : void
Log a debug message.
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.

Properties

$dynamicUrl

Base URL for dynamic cover images.

protected string $dynamicUrl

Methods

__construct()

Constructor

public __construct(string $url, Loader $coverLoader) : mixed
Parameters
$url : string

Base URL for dynamic cover images.

$coverLoader : Loader

Cover loader

Return values
mixed

getMetadata()

Generate a thumbnail metadata (return false if unsupported; return null to indicate that a subsequent AJAX check is needed).

public getMetadata(AbstractBase $driver[, string $size = 'small' ][, bool $resolveDynamic = true ][, bool $testLoadImage = false ][, bool $ajax = false ]) : false|array<string|int, mixed>|null
Parameters
$driver : AbstractBase

Record driver

$size : string = 'small'

Size of thumbnail (small, medium or large; small is default).

$resolveDynamic : bool = true

Should we resolve dynamic cover data into a URL (true) or simply return false (false)?

$testLoadImage : bool = false

If true the function will try to load the cover image in advance and returns false in case no image could be loaded

$ajax : bool = false

True if the function is called from ajax handler

Return values
false|array<string|int, mixed>|null

getUrl()

Generate a thumbnail URL (return false if unsupported; return null to indicate that a subsequent AJAX check is needed).

public getUrl(AbstractBase $driver[, string $size = 'small' ][, bool $resolveDynamic = true ][, bool $testLoadImage = false ]) : string|false|null
Parameters
$driver : AbstractBase

Record driver

$size : string = 'small'

Size of thumbnail (small, medium or large; small is default).

$resolveDynamic : bool = true

Should we resolve dynamic cover data into a URL (true) or simply return false (false)?

$testLoadImage : bool = false

If true the function will try to load the cover image in advance and returns false in case no image could be loaded

Return values
string|false|null

debug()

Log a debug message.

protected debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

log()

Send a message to the logger.

protected log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
$level : string

Log level

$message : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = false

Prepend class name to message?

Return values
void

logError()

Log an error message.

protected logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

logWarning()

Log a warning message.

protected logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
$msg : string

Log message

$context : array<string|int, mixed> = []

Log context

$prependClass : bool = true

Prepend class name to message?

Return values
void

Search results