Cache_Lite: Use __construct (#399)

This commit is contained in:
onli 2016-05-10 12:40:15 +00:00
parent 78de4c894b
commit dbf21c3df5
4 changed files with 7 additions and 7 deletions

View File

@ -294,7 +294,7 @@ class Cache_Lite
* @param array $options options
* @access public
*/
function Cache_Lite($options = array(NULL))
function __construct($options = array(NULL))
{
foreach($options as $key => $value) {
$this->setOption($key, $value);

View File

@ -52,10 +52,10 @@ class Cache_Lite_File extends Cache_Lite
* @param array $options options
* @access public
*/
function Cache_Lite_File($options = array(NULL))
function __construct($options = array(NULL))
{
$options['lifetime'] = 0;
$this->Cache_Lite($options);
parent::__construct($options);
if (isset($options['masterFile'])) {
$this->_masterFile = $options['masterFile'];
} else {

View File

@ -81,7 +81,7 @@ class Cache_Lite_Function extends Cache_Lite
* @param array $options options
* @access public
*/
function Cache_Lite_Function($options = array(NULL))
function __construct($options = array(NULL))
{
$availableOptions = array('debugCacheLiteFunction', 'defaultGroup', 'dontCacheWhenTheOutputContainsNOCACHE', 'dontCacheWhenTheResultIsFalse', 'dontCacheWhenTheResultIsNull');
while (list($name, $value) = each($options)) {
@ -91,7 +91,7 @@ class Cache_Lite_Function extends Cache_Lite
}
}
reset($options);
$this->Cache_Lite($options);
parent::__construct($options);
}
/**

View File

@ -26,9 +26,9 @@ class Cache_Lite_Output extends Cache_Lite
* @param array $options options
* @access public
*/
function Cache_Lite_Output($options)
function __construct($options)
{
$this->Cache_Lite($options);
parent::__construct($options);
}
/**