/** * Creates a new invalid key exception. * * Indicates that $key is not a valid cache key for a certain storage. * $reason specifies what is invalid about the key. * * @param string $key * @param string $reason */ public function __construct($key, $reason = null) { parent::__construct("The cache key '{$key}' is invalid." . ($reason !== null ? ' Reason: ' . $reason : '')); }
/** * Creates a new ezcCacheInvalidStorageClassException * * @param string $storageClass The invalid storage class. * @return void */ function __construct($storageClass) { parent::__construct("'{$storageClass}' is not a valid storage class. Storage classes must extend ezcCacheStorage."); }
/** * Creates a new ezcCacheStackStorageUsedTwiceException. * * The $storage is the object that is used twice in the {@link * ezcCacheStack}. * * @param ezcCacheStackableStorage $storage * @return void */ function __construct(ezcCacheStackableStorage $storage) { parent::__construct("The storage of type '" . get_class($storage) . "' with location '" . $storage->location . "' is already used in the stack."); }
/** * Creates a new ezcCacheInvalidIdException. * * @param string $id The invalid ID. * @return void */ function __construct($id) { parent::__construct("No cache or cache configuration known with ID '{$id}'."); }
/** * Creates a new ezcCacheInvalidMetaDataException. * * @param ezcCacheStackMetaData $metaData * @param string $class Expected class of $metaData. */ function __construct(ezcCacheStackMetaData $metaData, $class) { parent::__construct("The given meta data of class '" . get_class($metaData) . "'could not be handled by the replacement strategy. Expected: '{$class}'."); }
/** * Creates a new ezcCacheStackIdAlreadyUsedException. * * @param string $id The ID that is already in use. * @return void */ function __construct($id) { parent::__construct("The ID '{$id}' is already used in the stack."); }
/** * Creates a new ezcCacheStackUnderflowException. * * @param mixed $actualType Type of data received. * @param array $expectedTypes Expected data types. * @return void */ function __construct() { parent::__construct("No storages in stack."); }
/** * Creates a new ezcCacheInvalidDataException. * * @param mixed $actualType Type of data received. * @param array $expectedTypes Expected data types. * @return void */ function __construct($actualType, array $expectedTypes) { parent::__construct("The given data was of type '{$actualType}', which can not be stored. Expecting: '" . implode(', ', $expectedTypes) . "'."); }
/** * Creates a new ezcCacheUsedLocationException. * * @param string $location The used location. * @param string $cacheId The cache ID using this location. * @return void */ function __construct($location, $cacheId) { parent::__construct("Location '{$location}' is already in use by cache with ID '{$cacheId}'."); }