1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-09 14:46:53 +02:00

fix(cache): fix all cache drivers names

This commit is contained in:
Awilum
2020-07-26 22:37:01 +03:00
parent 7a52754514
commit 3b6afa66d1
10 changed files with 13 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ namespace Flextype\App\Foundation\Cache;
use Doctrine\Cache\Common\AcpuCache;
use Psr\Container\ContainerInterface;
class AcpuAdapter implements CacheAdapterInterface
class AcpuCacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -7,7 +7,7 @@ namespace Flextype\App\Foundation\Cache;
use Doctrine\Common\Cache\ArrayCache;
use Psr\Container\ContainerInterface;
class ArrayAdapter implements CacheAdapterInterface
class ArrayCacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -8,7 +8,7 @@ use Doctrine\Common\Cache\FilesystemCache;
use Flextype\Component\Filesystem\Filesystem;
use Psr\Container\ContainerInterface;
class FilesystemAdapter implements CacheAdapterInterface
class FilesystemCacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -8,7 +8,7 @@ use Doctrine\Common\Cache\MemcachedCache;
use Memecached;
use Psr\Container\ContainerInterface;
class MemcachedAdapter implements CacheAdapterInterface
class MemcachedCacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -8,7 +8,7 @@ use Doctrine\Common\Cache\PhpFileCache;
use Psr\Container\ContainerInterface;
use Flextype\Component\Filesystem\Filesystem;
class PhpFileAdapter implements CacheAdapterInterface
class PhpFileCacheAdapter extends PhpFileCache implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{
@@ -25,4 +25,5 @@ class PhpFileAdapter implements CacheAdapterInterface
return new PhpFileCache($cache_directory);
}
}

View File

@@ -9,7 +9,7 @@ use Psr\Container\ContainerInterface;
use Redis;
use RedisException;
class RedisAdapter implements CacheAdapterInterface
class RedisCacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -9,7 +9,7 @@ use Flextype\Component\Filesystem\Filesystem;
use Psr\Container\ContainerInterface;
use SQLite3;
class SQLite3Adapter implements CacheAdapterInterface
class SQLite3CacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -7,7 +7,7 @@ namespace Flextype\App\Foundation\Cache;
use Doctrine\Common\Cache\WinCacheCache;
use Psr\Container\ContainerInterface;
class WinCacheAdapter implements CacheAdapterInterface
class WinCacheCacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -7,7 +7,7 @@ namespace Flextype\App\Foundation\Cache;
use Doctrine\Common\Cache\ZendDataCache;
use Psr\Container\ContainerInterface;
class ZendDataCacheAdapter implements CacheAdapterInterface
class ZendDataCacheCacheAdapter implements CacheAdapterInterface
{
public function __construct(ContainerInterface $flextype)
{

View File

@@ -108,16 +108,15 @@ $flextype['cache_adapter'] = function ($container) use ($flextype) {
if (! $driver_name || $driver_name === 'auto') {
if (extension_loaded('apcu')) {
$driver_name = 'apcu';
$driver_name = 'Apcu';
} elseif (extension_loaded('wincache')) {
$driver_name = 'wincache';
$driver_name = 'WinCache';
} else {
$driver_name = 'PhpFile';
}
}
$class = ucfirst($driver_name);
$adapter = "Flextype\\App\\Foundation\\Cache\\{$class}Adapter";
$adapter = "Flextype\\App\\Foundation\\Cache\\{$driver_name}CacheAdapter";
return new $adapter($flextype);
};