@@ -29,7 +29,6 @@ class Cache
29
29
public function __construct ($ drivers )
30
30
{
31
31
foreach ($ drivers ['drivers ' ] as $ name => $ driver ) {
32
- dump ($ driver );
33
32
$ this ->createInstance ($ name , CacheManager::getInstance ($ driver ['type ' ], $ driver ['parameters ' ]));
34
33
}
35
34
}
@@ -45,7 +44,7 @@ public function __construct($drivers)
45
44
public function createInstance ($ name , ExtendedCacheItemPoolInterface $ instance )
46
45
{
47
46
if (array_key_exists ($ name , $ this ->cacheInstances ) && $ this ->cacheInstances [$ name ] instanceof ExtendedCacheItemPoolInterface) {
48
- throw new phpFastCacheDriverException ("Driver named $ name already exists " );
47
+ throw new phpFastCacheDriverException ("Cache instance ' { $ name} ' already exists " );
49
48
}
50
49
$ this ->cacheInstances [$ name ] = $ instance ;
51
50
}
@@ -62,10 +61,10 @@ public function createInstance($name, ExtendedCacheItemPoolInterface $instance)
62
61
public function get ($ name )
63
62
{
64
63
if (!array_key_exists ($ name , $ this ->cacheInstances )) {
65
- throw new phpFastCacheDriverException ("Driver named $ name not exists " );
64
+ throw new phpFastCacheDriverException ("Cache instance ' { $ name} ' not exists " );
66
65
}
67
66
if (!$ this ->cacheInstances [$ name ] instanceof ExtendedCacheItemPoolInterface) {
68
- throw new phpFastCacheDriverException ("Driver named $ name already instanciated " );
67
+ throw new phpFastCacheDriverException ("Cache instance ' { $ name} ' already instanciated " );
69
68
}
70
69
71
70
return $ this ->cacheInstances [$ name ];
0 commit comments