DDC-3078 - removing cache class name setter/getter from cache configuration API
This commit is contained in:
parent
87a907f9dd
commit
9b2ee88683
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user