\MslsSqlCacher

Wrapper to avoid direct SQL without caching

Summary

Methods
Properties
Constants
__construct()
init()
set_params()
get_key()
__get()
__call()
get_var()
get_results()
prepare()
query()
$posts
$options
$blogs
$blogid
$siteid
No constants found
No protected methods found
$db
$caller
$params
N/A
No private methods found
No private properties found
N/A

Properties

$posts

$posts : string

Type

string

$options

$options : string

Type

string

$blogs

$blogs : string

Type

string

$blogid

$blogid : int

Type

int

$siteid

$siteid : int

Type

int

$db

$db : object

Database object

Type

object

$caller

$caller : string

Name of the object which created this object

Type

string

$params

$params : mixed

Parameters are used to create the key for the cached resultset

Type

mixed

Methods

__construct()

__construct(object $db, string $caller)

Constructor

Parameters

object $db
string $caller

init()

init(string $caller) : \MslsSqlCacher

Factory

Parameters

string $caller

Returns

\MslsSqlCacher

set_params()

set_params(mixed $params) : \MslsSqlCacher

Set params

Parameters

mixed $params

Returns

\MslsSqlCacher

get_key()

get_key() : string

Get the name of the key which is in use for the cached object

Returns

string

__get()

__get(string $key) : mixed

Magic __get

Parameters

string $key

Returns

mixed

__call()

__call(string $method, array $args) : mixed

Call a method of the db-object with the needed args and cache the result

Parameters

string $method
array $args

Returns

mixed

get_var()

get_var(string $sql) : mixed

Parameters

string $sql

Returns

mixed

get_results()

get_results(string $sql) : array

Parameters

string $sql

Returns

array

prepare()

prepare(string $sql, mixed $a, mixed $b, mixed $c) : string

Parameters

string $sql
mixed $a
mixed $b
mixed $c

Returns

string

query()

query(string $sql) : mixed

Parameters

string $sql

Returns

mixed