1
0
mirror of synced 2025-01-31 12:32:59 +03:00

DDC-3078 - adding exception methods for invalid cache instantiator

This commit is contained in:
Marco Pivetta 2014-04-10 03:00:35 +02:00 committed by fabios
parent 04b52149ab
commit 1b5eb55ed9

View File

@ -262,6 +262,19 @@ class ORMException extends Exception
return new self("Invalid repository class '".$className."'. It must be a Doctrine\Common\Persistence\ObjectRepository.");
}
/**
* @param mixed $instantiator
*
* @return ORMException
*/
public static function invalidSecondLevelCacheInstantiator($instantiator)
{
return new self(sprintf(
'The provided instantiator is not a valid callable, "%s" given.',
is_object($instantiator) ? get_class($instantiator) : gettype($instantiator)
));
}
/**
* @param string $className
*