PHP Class Bluz\Cache\Adapter\AbstractAdapter

Author: murzik
Inheritance: implements Bluz\Cache\CacheInterface
Show file Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$settings list of Cache settings

Public Methods

Method Description
__construct ( array $settings = [] ) Setup adapter settings
add ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean
contains ( string $id ) : boolean
delete ( string $id ) : mixed
flush ( ) : mixed
get ( string $id ) : mixed
set ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean

Protected Methods

Method Description
doAdd ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : mixed Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::add() goes here
doContains ( string $id ) : mixed Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::contains() goes here
doDelete ( string $id ) : mixed Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::delete() goes here
doFlush ( ) : mixed Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::flush() goes here
doGet ( string $id ) : mixed Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::get() goes here
doSet ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : mixed Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::set() goes here

Method Details

__construct() public method

Setup adapter settings
public __construct ( array $settings = [] )
$settings array setup adapter

add() public method

public add ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean
$id string
$data mixed
$ttl integer
return boolean

contains() public method

public contains ( string $id ) : boolean
$id string
return boolean

delete() public method

public delete ( string $id ) : mixed
$id string
return mixed

doAdd() abstract protected method

Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::add() goes here
See also: CacheInterface::add()
abstract protected doAdd ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : mixed
$id string
$data mixed
$ttl integer
return mixed

doContains() abstract protected method

Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::contains() goes here
See also: CacheInterface::contains()
abstract protected doContains ( string $id ) : mixed
$id string
return mixed

doDelete() abstract protected method

Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::delete() goes here
See also: CacheInterface::delete()
abstract protected doDelete ( string $id ) : mixed
$id string
return mixed

doFlush() abstract protected method

Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::flush() goes here
See also: Bluz\Cache\CacheInterface::flush()
abstract protected doFlush ( ) : mixed
return mixed

doGet() abstract protected method

Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::get() goes here
See also: CacheInterface::get()
abstract protected doGet ( string $id ) : mixed
$id string
return mixed

doSet() abstract protected method

Must be implemented in particular cache driver implementation Actual work for \Bluz\Cache\CacheInterface::set() goes here
See also: CacheInterface::set()
abstract protected doSet ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : mixed
$id string
$data mixed
$ttl integer
return mixed

flush() public method

public flush ( ) : mixed
return mixed

get() public method

public get ( string $id ) : mixed
$id string
return mixed

set() public method

public set ( string $id, mixed $data, integer $ttl = Cache::TTL_NO_EXPIRY ) : boolean
$id string
$data mixed
$ttl integer
return boolean

Property Details

$settings protected property

list of Cache settings
protected $settings