1
0
mirror of synced 2024-12-13 22:56:04 +03:00
This commit is contained in:
zYne 2007-02-09 22:43:38 +00:00
parent ee2c5f6231
commit 2c306fdce0

View File

@ -33,5 +33,47 @@
*/
abstract class Doctrine_Cache_Driver implements Doctrine_Cache_Interface
{
/**
* @var array $options an array of options
*/
protected $options;
/**
* constructor
*
* @param array $options an array of options
*/
public function __construct($options)
{
$this->options = $options;
}
/**
* setOption
*
* @param mixed $option the option name
* @param mixed $value option value
* @return boolean TRUE on success, FALSE on failure
*/
public function setOption($option, $value)
{
if (isset($this->_options[$option])) {
$this->_options[$option] = $value;
return true;
}
return false;
}
/**
* getOption
*
* @param mixed $option the option name
* @return mixed option value
*/
public function getOption($option)
{
if ( ! isset($this->_options[$option])) {
return null;
}
return $this->_options[$option];
}
}