Documentation

ResourceCheckerConfigCacheFactory
in package
implements ConfigCacheFactoryInterface

A ConfigCacheFactory implementation that validates the cache with an arbitrary set of ResourceCheckers.

Tags
author

Matthias Pigulla mp@webfactory.de

Interfaces, Classes and Traits

ConfigCacheFactoryInterface
Interface for a ConfigCache factory. This factory creates an instance of ConfigCacheInterface and initializes the cache if necessary.

Table of Contents

$resourceCheckers  : mixed
__construct()  : mixed
cache()  : ConfigCacheInterface
Creates a cache instance and (re-)initializes it if necessary.

Properties

Methods

cache()

Creates a cache instance and (re-)initializes it if necessary.

public cache(string $file, callable $callable) : ConfigCacheInterface
Parameters
$file : string

The absolute cache file path

$callable : callable

The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback

Return values
ConfigCacheInterface

Search results