VuFind API Documentation

CachingDownloader
in package
implements HttpServiceAwareInterface Uses HttpServiceAwareTrait

Caching downloader.

Tags
category

VuFind

author

Mario Trojan mario.trojan@uni-tuebingen.de

license

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

link

Wiki

Interfaces, Classes, Traits and Enums

HttpServiceAwareInterface

Table of Contents

$cache  : StorageInterface
Cache to use for downloads
$cacheId  : string
Cache ID to use for downloads
$cacheManager  : Manager
CacheManager to update caches if necessary.
$cacheOptions  : array<string|int, mixed>
Stored client options for cache key generation.
$configManager  : PluginManager
ConfigManager to get additional settings if necessary.
__construct()  : mixed
Constructor
download()  : mixed
Download a resource using the cache in the background.
downloadJson()  : stdClass
Download a resource using the cache in the background, including decoding for JSON.
setUpCache()  : void
Set up a different cache.
getDownloaderCache()  : StorageInterface
Get cache and initialize it, if necessary.

Properties

$cacheOptions

Stored client options for cache key generation.

protected array<string|int, mixed> $cacheOptions = []

Methods

download()

Download a resource using the cache in the background.

public download(string $url[, array<string|int, mixed> $params = [] ][, callable|null $decodeCallback = null ]) : mixed
Parameters
$url : string

URL

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

Request parameters (e.g. additional headers)

$decodeCallback : callable|null = null

Callback for decoding

Return values
mixed

downloadJson()

Download a resource using the cache in the background, including decoding for JSON.

public downloadJson(string $url[, array<string|int, mixed> $params = [] ]) : stdClass
Parameters
$url : string

URL

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

Request parameters (e.g. additional headers)

Return values
stdClass

setUpCache()

Set up a different cache.

public setUpCache(string $cacheId[, string $cacheOptionsSection = null ]) : void
Parameters
$cacheId : string

Cache ID

$cacheOptionsSection : string = null

Cache Options Section

Return values
void

getDownloaderCache()

Get cache and initialize it, if necessary.

protected getDownloaderCache() : StorageInterface
Return values
StorageInterface

Search results