Public Member Functions | Protected Member Functions | Protected Attributes

Zend_Cache_Backend Class Reference

Inheritance diagram for Zend_Cache_Backend:
Zend_Cache_Backend_Apc Zend_Cache_Backend_File Zend_Cache_Backend_Memcached Zend_Cache_Backend_Sqlite Zend_Cache_Backend_Test Zend_Cache_Backend_TwoLevels Zend_Cache_Backend_Xcache Zend_Cache_Backend_ZendPlatform Zend_Cache_Backend_ZendServer

Public Member Functions

 __construct (array $options=array())
 setDirectives ($directives)
 setOption ($name, $value)
 getLifetime ($specificLifetime)
 isAutomaticCleaningAvailable ()
 getTmpDir ()

Protected Member Functions

 _isGoodTmpDir ($dir)
 _loggerSanity ()
 _log ($message, $priority=4)

Protected Attributes

 $_directives
 $_options = array()

Detailed Description

Definition at line 30 of file Backend.php.


Constructor & Destructor Documentation

__construct ( array $  options = array() )

Member Function Documentation

_isGoodTmpDir ( dir ) [protected]

Verify if the given temporary directory is readable and writable

Parameters:
$dirtemporary directory
Returns:
boolean true if the directory is ok

Definition at line 206 of file Backend.php.

_log ( message,
priority = 4 
) [protected]

Log a message at the WARN (4) priority.

Parameters:
string$message
Exceptions:
Zend_Cache_Exception
Returns:
void

Definition at line 257 of file Backend.php.

_loggerSanity (  ) [protected]

Make sure if we enable logging that the Zend_Log class is available. Create a default log object if none is set.

Exceptions:
Zend_Cache_Exception
Returns:
void

See also:
Zend_Log

Definition at line 224 of file Backend.php.

getLifetime ( specificLifetime )

Get the life time

if $specificLifetime is not false, the given specific life time is used else, the global lifetime is used

Parameters:
int$specificLifetime
Returns:
int Cache life time

Definition at line 123 of file Backend.php.

getTmpDir (  )

Determine system TMP directory and detect if we have read access

inspired from Zend_File_Transfer_Adapter_Abstract

Returns:
string
Exceptions:
Zend_Cache_Exceptionif unable to determine directory

Definition at line 152 of file Backend.php.

isAutomaticCleaningAvailable (  )

Return true if the automatic cleaning is available for the backend

DEPRECATED : use getCapabilities() instead

Deprecated:
Returns:
boolean

Reimplemented in Zend_Cache_Backend_Apc, Zend_Cache_Backend_Memcached, Zend_Cache_Backend_Test, and Zend_Cache_Backend_Xcache.

Definition at line 139 of file Backend.php.

setDirectives ( directives )

Set the frontend directives

Parameters:
array$directivesAssoc of directives
Exceptions:
Zend_Cache_Exception
Returns:
void

Reimplemented in Zend_Cache_Backend_Memcached, and Zend_Cache_Backend_Test.

Definition at line 78 of file Backend.php.

setOption ( name,
value 
)

Set an option

Parameters:
string$name
mixed$value
Exceptions:
Zend_Cache_Exception
Returns:
void

Definition at line 103 of file Backend.php.


Field Documentation

$_directives [protected]
Initial value:
 array(
        'lifetime' => 3600,
        'logging'  => false,
        'logger'   => null
    )

Definition at line 44 of file Backend.php.


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