mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 19:41:36 +01:00
Framework\Cache: Update all exceptions to be compatible with Psr\SimpleCache
This commit is contained in:
@@ -33,7 +33,7 @@ class ChainCache extends AbstractCache
|
||||
* Chain Cache constructor.
|
||||
* @param array $caches
|
||||
* @param null|int|\DateInterval $defaultLifetime
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function __construct(array $caches, $defaultLifetime = null)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ class DoctrineCache extends AbstractCache
|
||||
* @param CacheProvider $doctrineCache
|
||||
* @param string $namespace
|
||||
* @param null|int|\DateInterval $defaultLifetime
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function __construct(CacheProvider $doctrineCache, $namespace = '', $defaultLifetime = null)
|
||||
{
|
||||
@@ -96,6 +96,7 @@ class DoctrineCache extends AbstractCache
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function doDeleteMultiple($keys)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ class FileCache extends AbstractCache
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws CacheException
|
||||
* @throws \Psr\SimpleCache\CacheException
|
||||
*/
|
||||
public function doSet($key, $value, $ttl)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ class FileCache extends AbstractCache
|
||||
/**
|
||||
* @param string $namespace
|
||||
* @param string $directory
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
private function init($namespace, $directory)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ trait CacheTrait
|
||||
*
|
||||
* @param string $namespace
|
||||
* @param null|int|\DateInterval $defaultLifetime
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
protected function init($namespace = '', $defaultLifetime = null)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function get($key, $default = null)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function set($key, $value, $ttl = null)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function delete($key)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function getMultiple($keys, $default = null)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function setMultiple($values, $ttl = null)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function deleteMultiple($keys)
|
||||
{
|
||||
@@ -206,7 +206,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
@@ -274,7 +274,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
protected function validateKey($key)
|
||||
{
|
||||
@@ -303,7 +303,7 @@ trait CacheTrait
|
||||
|
||||
/**
|
||||
* @param array $keys
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
protected function validateKeys($keys)
|
||||
{
|
||||
@@ -315,7 +315,7 @@ trait CacheTrait
|
||||
/**
|
||||
* @param null|int|\DateInterval $ttl
|
||||
* @return int|null
|
||||
* @throws InvalidArgumentException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
protected function convertTtl($ttl)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user