VuFind API Documentation

CacheDecorator
in package
implements ReaderInterface

This class decorates a configuration file reader with caching support.

Tags
category

VuFind

author

David Maus maus@hab.de

license

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

link

Main Site

Interfaces, Classes, Traits and Enums

ReaderInterface

Table of Contents

$reader  : ReaderInterface
The decorated reader.
$storage  : StorageInterface
Cache storage.
__construct()  : void
Constructor.
fromFile()  : array<string|int, mixed>
Read from a file and create an array
fromString()  : array<string|int, mixed>|bool
Read from a string and create an array
generateKey()  : string
Return a cache key.

Properties

Methods

__construct()

Constructor.

public __construct(ReaderInterface $reader, StorageInterface $storage) : void
Parameters
$reader : ReaderInterface

Config reader

$storage : StorageInterface

Cache storage

Return values
void

fromFile()

Read from a file and create an array

public fromFile(string $filename) : array<string|int, mixed>
Parameters
$filename : string

Filename

Return values
array<string|int, mixed>

fromString()

Read from a string and create an array

public fromString(string $string) : array<string|int, mixed>|bool
Parameters
$string : string

String

Return values
array<string|int, mixed>|bool

generateKey()

Return a cache key.

protected generateKey(string $string) : string
Parameters
$string : string

String

Return values
string

Search results