public static function setup($caches, Logger $logger = null, $logLevel = null)
    {
        if (!is_array($caches)) {
            $caches = array(self::_DEFAULT => array('backend' => $caches));
        }

        self::$logger = $logger;
        self::$logLevel = $logLevel;

        foreach ($caches as $name => $options) {
            self::$caches[$name] = self::factory($options);
        }
    }
public static function setup($caches, Logger $logger = null, $logLevel = null)
    {
        if (!is_array($caches)) {
            $caches = array(self::_DEFAULT => array('backend' => $caches));
        }

        self::$logger = $logger;
        self::$logLevel = $logLevel;

        foreach ($caches as $name => $options) {
            self::$caches[$name] = self::factory($options);
        }
    }
public static function setup ( $ caches , Logger $ logger = null , $ logLevel = null ) { if ( ! is_array ( $ caches ) ) { $ caches = array ( self :: _DEFAULT => array ( 'backend' => $ caches ) ) ; } self :: $ logger = $ logger ; self :: $ logLevel = $ logLevel ; foreach ( $ caches as $ name => $ options ) { self :: $ caches [ $ name ] = self :: factory ( $ options ) ; } }
Setups the cache manager.

If $caches is the class name of a backend, a {@see Backend} instance,
a {@see Cache} instance will be created under the default name.

$caches can also be an array to define multiple cache instances an once.
Keys will be used as cache names and values must be compatible with the
{@see factory()} method $options argument.

<code>
CacheManager::setup(array(
'default' => 'CacheCache\Backend\File'
));
</code>

If $logger is not null, all Backend instances will be wrapped in a
{@see LoggingBackend} object.

@see factory()
@param array $caches
@param Logger $logger
@param int $logLevel
Setups the cache manager .