PHP Class Imdb\CacheBase

Author: Yevgeniy Yanavichus ([email protected])
Inheritance: implements CacheInterface
Datei anzeigen Open project: tboothman/imdbphp Class Usage Examples

Protected Properties

Property Type Description
$config Config
$logger Psr\Log\LoggerInterface

Public Methods

Method Description
__construct ( Config $config = null, Psr\Log\LoggerInterface $logger = null ) CacheBase constructor.
get ( $key )
getInternal ( string $key, string $cleanKey ) : string | null Specific implementation which should be overridden
purge ( )
purgeInternal ( ) Specific implementation which should be overridden
set ( $key, $value )
setInternal ( string $key, string $cleanKey, string $value ) : boolean Specific implementation which should be overridden

Private Methods

Method Description
sanitiseKey ( string $key ) : string Auxiliary method

Method Details

__construct() public method

CacheBase constructor.
public __construct ( Config $config = null, Psr\Log\LoggerInterface $logger = null )
$config Config
$logger Psr\Log\LoggerInterface OPTIONAL override default logger

get() public method

public get ( $key )

getInternal() abstract public method

Specific implementation which should be overridden
abstract public getInternal ( string $key, string $cleanKey ) : string | null
$key string
$cleanKey string
return string | null null on failure / cache miss

purge() public method

public purge ( )

purgeInternal() abstract public method

Specific implementation which should be overridden
abstract public purgeInternal ( )

set() public method

public set ( $key, $value )

setInternal() abstract public method

Specific implementation which should be overridden
abstract public setInternal ( string $key, string $cleanKey, string $value ) : boolean
$key string
$cleanKey string
$value string
return boolean successful?

Property Details

$config protected_oe property

protected Config,imdb $config
return Config

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface