independent-analytics
/
vendor
/
doctrine
/
cache
/
lib
/
Doctrine
/
Common
/
Cache
/
InvalidCacheId.php
independent-analytics
/
vendor
/
doctrine
/
cache
/
lib
/
Doctrine
/
Common
/
Cache
Last commit date
Psr6
2 years ago
ApcCache.php
2 years ago
ApcuCache.php
2 years ago
ArrayCache.php
2 years ago
Cache.php
2 years ago
CacheProvider.php
2 years ago
ChainCache.php
2 years ago
ClearableCache.php
2 years ago
CouchbaseBucketCache.php
2 years ago
CouchbaseCache.php
2 years ago
ExtMongoDBCache.php
2 years ago
FileCache.php
2 years ago
FilesystemCache.php
2 years ago
FlushableCache.php
2 years ago
InvalidCacheId.php
2 years ago
LegacyMongoDBCache.php
2 years ago
MemcacheCache.php
2 years ago
MemcachedCache.php
2 years ago
MongoDBCache.php
2 years ago
MultiDeleteCache.php
2 years ago
MultiGetCache.php
2 years ago
MultiOperationCache.php
2 years ago
MultiPutCache.php
2 years ago
PhpFileCache.php
2 years ago
PredisCache.php
2 years ago
RedisCache.php
2 years ago
SQLite3Cache.php
2 years ago
Version.php
2 years ago
VoidCache.php
2 years ago
WinCacheCache.php
2 years ago
XcacheCache.php
2 years ago
ZendDataCache.php
2 years ago
InvalidCacheId.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | declare (strict_types=1); |
| 4 | namespace IAWP_SCOPED\Doctrine\Common\Cache; |
| 5 | |
| 6 | use InvalidArgumentException; |
| 7 | use function sprintf; |
| 8 | /** |
| 9 | * @deprecated Deprecated without replacement in doctrine/cache 1.11. This class will be dropped in 2.0 |
| 10 | * @internal |
| 11 | */ |
| 12 | final class InvalidCacheId extends InvalidArgumentException |
| 13 | { |
| 14 | /** |
| 15 | * @param mixed $id |
| 16 | */ |
| 17 | public static function exceedsMaxLength($id, int $maxLength) : self |
| 18 | { |
| 19 | return new self(sprintf('Cache id "%s" exceeds maximum length %d', $id, $maxLength)); |
| 20 | } |
| 21 | /** |
| 22 | * @param mixed $id |
| 23 | */ |
| 24 | public static function containsUnauthorizedCharacter($id, string $character) : self |
| 25 | { |
| 26 | return new self(sprintf('Cache id "%s" contains unauthorized character "%s"', $id, $character)); |
| 27 | } |
| 28 | /** |
| 29 | * @param mixed $id |
| 30 | */ |
| 31 | public static function containsControlCharacter($id) : self |
| 32 | { |
| 33 | return new self(sprintf('Cache id "%s" contains at least one control character', $id)); |
| 34 | } |
| 35 | } |
| 36 |