<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
/**
* Constructor
*
- * @param array $config an array of configuration params
+ * @param array $config an array of configuration params
*
- * @return void
+ * @return \CRM_Utils_Cache
*/
function __construct(&$config) {
CRM_Core_Error::fatal(ts('this is just an interface and should not be called directly'));
// Going forward, CIVICRM_USE_xxxCACHE should be deprecated.
if (defined('CIVICRM_USE_MEMCACHE') && CIVICRM_USE_MEMCACHE) {
$className = 'Memcache';
- }
+ }
else if (defined('CIVICRM_USE_ARRAYCACHE') && CIVICRM_USE_ARRAYCACHE) {
$className = 'ArrayCache';
- }
+ }
else if (defined('CIVICRM_DB_CACHE_CLASS') && CIVICRM_DB_CACHE_CLASS) {
$className = CIVICRM_DB_CACHE_CLASS;
}
require_once(str_replace('_', DIRECTORY_SEPARATOR, $dbCacheClass) . '.php');
$settings = self::getCacheSettings($className);
self::$_singleton = new $dbCacheClass($settings);
- }
+ }
return self::$_singleton;
}
/**
* Get cache relevant settings
*
+ * @param $cachePlugin
+ *
* @return array
* associative array of settings for the cache
* @static