1: <?php
2:
3: /*
4: * This file is part of the Stash package.
5: *
6: * (c) Robert Hafner <tedivm@tedivm.com>
7: *
8: * For the full copyright and license information, please view the LICENSE
9: * file that was distributed with this source code.
10: */
11:
12: namespace Xoops\Core\Cache;
13:
14: /**
15: * DriverList overrides for Stash
16: *
17: * @package Xoops\Core\Cache
18: * @author Richard Griffith <richard@geekwright.com>
19: */
20: class DriverList extends \Stash\DriverList
21: {
22: /**
23: * Returns the driver class for a specific driver name.
24: *
25: * This overrides the Stash class to provide a case insensitive lookup
26: *
27: * @param string $name
28: * @return string|false class name or false if no matching class
29: */
30: public static function getDriverClass($name)
31: {
32: if (isset(self::$drivers[$name])) {
33: return self::$drivers[$name];
34: }
35: foreach (self::$drivers as $driverName => $className) {
36: if (0 == strcasecmp($name, $driverName)) {
37: return $className;
38: }
39: }
40: return false;
41: }
42: }
43: