Tariqa  3.0
 All Data Structures Namespaces Files Functions Variables Enumerations
mCache Class Reference

Static Public Member Functions

static getVariableFileName ($name)
static saveVariable ($value, $name, $base64=true)
static deleteVariable ($name)
static isCached ($name, $file=null)
static loadVariable ($name, $file=null, $base64=true)
static path ($path)
static initialize ($config_path=null, $config_format= 'xml')

Member Function Documentation

static deleteVariable ( name) [static]

Deletes a cached variable

Parameters:
string$nameThe variable name public
Returns:
void
static getVariableFileName ( name) [static]

Fetches the filename for a variable

static initialize ( config_path = null,
config_format = 'xml' 
) [static]

Initializes

Parameters:
string$config_pathThe full path to the configuration file
string$config_formatThe file format used by the configuration file public
Returns:
void
static isCached ( name,
file = null 
) [static]

Returns true if a variable is cached

Parameters:
string$nameThe name of the variable
string$fileIf this is set, then the cache time is compared with the file time and if the file is newer, the function will return false [OPTIONAL] This means that the variable is practically the content of a parsed file. public
Returns:
boolean
static loadVariable ( name,
file = null,
base64 = true 
) [static]

Loads a variable from cache

Parameters:
string$nameThe name of the cache data
string$fileIf this is set, then the cache time is compared with the file time and if the file is newer, the function will return false [OPTIONAL]
boolean$base64If true, base64 decode the unserialized value [OPTIONAL] public
Returns:
mixed
static path ( path) [static]

Adds a '/' at the end of a path if it is the case

Parameters:
string$pathThe path public
Returns:
string
static saveVariable ( value,
name,
base64 = true 
) [static]

Caches a variable value

Parameters:
mixed$valueThe variable value
string$nameThe name of the cache data
boolean$base64If true, base64 encode the value after the serialization [OPTIONAL] public
Returns:
boolean

The documentation for this class was generated from the following file: