Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
StudipCacheFactory Class Reference
Collaboration diagram for StudipCacheFactory:
Collaboration graph

Static Public Member Functions

static getConfig ()
static setConfig ($config)
static configure ($file, $class, $arguments)
static unconfigure ()
static getCache ()
static loadCacheClass ()
static retrieveConstructorArguments ()
static instantiateCache ($class, $arguments)

Data Fields

const DEFAULT_CACHE_CLASS = 'StudipFileCache'

Member Function Documentation

static configure (   $file,
  $class,
  $arguments 
)
static

Configure the file, class and arguments used for instantiation of the StudipCache instance. After sending this method, the previously used cache instance is voided and a new instance will be created on demand.

Parameters
stringthe absolute path to the implementing class
stringthe name of the class
arrayan array of custom arguments
Returns
void

Here is the call graph for this function:

static getCache ( )
static

Returns a cache instance.

Returns
StudipCache the cache instance

Here is the call graph for this function:

Here is the caller graph for this function:

static getConfig ( )
static

Returns the currently used config instance

Returns
Config an instance of class Config used by this factory to determine the class of the actual implementation of the StudipCache interface; if no config was set, it returns the instance returned by Config::getInstance
See Also
Config

Here is the call graph for this function:

Here is the caller graph for this function:

static instantiateCache (   $class,
  $arguments 
)
static

Return an instance of a given class using some arguments

Parameters
stringthe name of the class
arrayan array of arguments to be used by the constructor
Returns
StudipCache an instance of the specified class

Here is the caller graph for this function:

static loadCacheClass ( )
static

Load configured cache class and return its name.

Returns
string the name of the configured cache class

Here is the call graph for this function:

Here is the caller graph for this function:

static retrieveConstructorArguments ( )
static

Return an array of arguments required for instantiation of the cache class.

Returns
array the array of arguments

Here is the call graph for this function:

Here is the caller graph for this function:

static setConfig (   $config)
static
Parameters
Configan instance of class Config which will be used to determine the class of the implementation of interface StudipCache
Returns
void
static unconfigure ( )
static

Resets the configuration and voids the cache instance.

Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

const DEFAULT_CACHE_CLASS = 'StudipFileCache'

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