1
0
mirror of synced 2025-02-20 22:23:14 +03:00

DDC-3078 - removing cache class name setter/getter from cache configuration API

This commit is contained in:
Marco Pivetta 2014-04-10 03:15:15 +02:00 committed by fabios
parent 87a907f9dd
commit 9b2ee88683

View File

@ -57,11 +57,6 @@ class CacheConfiguration
*/
private $cacheInstantiator;
/**
* @var string
*/
private $cacheClassName = 'Doctrine\ORM\Cache\DefaultCache';
/**
* @return \Doctrine\ORM\Cache\CacheFactory|null
*/
@ -164,28 +159,4 @@ class CacheConfiguration
return $this->cacheInstantiator;
}
/**
* @param string $className
*
* @throws \Doctrine\ORM\ORMException If is not a \Doctrine\ORM\Cache
*/
public function setCacheClassName($className)
{
$reflectionClass = new \ReflectionClass($className);
if ( ! $reflectionClass->implementsInterface('Doctrine\ORM\Cache')) {
throw ORMException::invalidSecondLevelCache($className);
}
$this->cacheClassName = $className;
}
/**
* @return string A \Doctrine\ORM\Cache class name
*/
public function getCacheClassName()
{
return $this->cacheClassName;
}
}