PHP Class Pop\Cache\Adapter\Sqlite

Author: Nick Sagona, III ([email protected])
Inheritance: extends Pop\Cache\Adapter\AbstractAdapter
Show file Open project: nicksagona/PopPHP

Protected Properties

Property Type Description
$db string Cache db file
$sqlite Pop\Db\Sql Cache SQL object
$table string Cache db table

Public Methods

Method Description
__construct ( string $db, string $table = 'pop_cache', boolean $pdo = false ) : Sqlite Constructor
clear ( ) : void Method to clear all stored values from cache.
delete ( ) : void Method to delete the entire database file
getDb ( ) : string Method to get the current cache db file.
getTable ( ) : string Method to get the current cache db table.
load ( string $id, string $time ) : mixed Method to load a value from cache.
remove ( string $id ) : void Method to delete a value in cache.
save ( string $id, mixed $value, string $time ) : void Method to save a value to cache.
setTable ( string $table = 'pop_cache' ) : Sqlite Method to Set the cache db table.

Method Details

__construct() public method

Instantiate the cache db object
public __construct ( string $db, string $table = 'pop_cache', boolean $pdo = false ) : Sqlite
$db string
$table string
$pdo boolean
return Sqlite

clear() public method

Method to clear all stored values from cache.
public clear ( ) : void
return void

delete() public method

Method to delete the entire database file
public delete ( ) : void
return void

getDb() public method

Method to get the current cache db file.
public getDb ( ) : string
return string

getTable() public method

Method to get the current cache db table.
public getTable ( ) : string
return string

load() public method

Method to load a value from cache.
public load ( string $id, string $time ) : mixed
$id string
$time string
return mixed

remove() public method

Method to delete a value in cache.
public remove ( string $id ) : void
$id string
return void

save() public method

Method to save a value to cache.
public save ( string $id, mixed $value, string $time ) : void
$id string
$value mixed
$time string
return void

setTable() public method

Method to Set the cache db table.
public setTable ( string $table = 'pop_cache' ) : Sqlite
$table string
return Sqlite

Property Details

$db protected property

Cache db file
protected string $db
return string

$sqlite protected property

Cache SQL object
protected Sql,Pop\Db $sqlite
return Pop\Db\Sql

$table protected property

Cache db table
protected string $table
return string