summaryrefslogtreecommitdiff
path: root/vendor/psr/cache
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/psr/cache')
-rw-r--r--vendor/psr/cache/CHANGELOG.md16
-rw-r--r--vendor/psr/cache/LICENSE.txt19
-rw-r--r--vendor/psr/cache/README.md12
-rw-r--r--vendor/psr/cache/composer.json25
-rw-r--r--vendor/psr/cache/src/CacheException.php10
-rw-r--r--vendor/psr/cache/src/CacheItemInterface.php105
-rw-r--r--vendor/psr/cache/src/CacheItemPoolInterface.php138
-rw-r--r--vendor/psr/cache/src/InvalidArgumentException.php13
8 files changed, 338 insertions, 0 deletions
diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md
new file mode 100644
index 0000000..58ddab0
--- /dev/null
+++ b/vendor/psr/cache/CHANGELOG.md
@@ -0,0 +1,16 @@
1# Changelog
2
3All notable changes to this project will be documented in this file, in reverse chronological order by release.
4
5## 1.0.1 - 2016-08-06
6
7### Fixed
8
9- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr
10- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr
11- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell
12- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell
13
14## 1.0.0 - 2015-12-11
15
16Initial stable release; reflects accepted PSR-6 specification
diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt
new file mode 100644
index 0000000..b1c2c97
--- /dev/null
+++ b/vendor/psr/cache/LICENSE.txt
@@ -0,0 +1,19 @@
1Copyright (c) 2015 PHP Framework Interoperability Group
2
3Permission is hereby granted, free of charge, to any person obtaining a copy
4of this software and associated documentation files (the "Software"), to deal
5in the Software without restriction, including without limitation the rights
6to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7copies of the Software, and to permit persons to whom the Software is
8furnished to do so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in
11all copies or substantial portions of the Software.
12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19THE SOFTWARE.
diff --git a/vendor/psr/cache/README.md b/vendor/psr/cache/README.md
new file mode 100644
index 0000000..9855a31
--- /dev/null
+++ b/vendor/psr/cache/README.md
@@ -0,0 +1,12 @@
1Caching Interface
2==============
3
4This repository holds all interfaces related to [PSR-6 (Caching Interface)][psr-url].
5
6Note that this is not a Caching implementation of its own. It is merely interfaces that describe the components of a Caching mechanism.
7
8The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
9
10[psr-url]: https://www.php-fig.org/psr/psr-6/
11[package-url]: https://packagist.org/packages/psr/cache
12[implementation-url]: https://packagist.org/providers/psr/cache-implementation
diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json
new file mode 100644
index 0000000..4b68797
--- /dev/null
+++ b/vendor/psr/cache/composer.json
@@ -0,0 +1,25 @@
1{
2 "name": "psr/cache",
3 "description": "Common interface for caching libraries",
4 "keywords": ["psr", "psr-6", "cache"],
5 "license": "MIT",
6 "authors": [
7 {
8 "name": "PHP-FIG",
9 "homepage": "https://www.php-fig.org/"
10 }
11 ],
12 "require": {
13 "php": ">=8.0.0"
14 },
15 "autoload": {
16 "psr-4": {
17 "Psr\\Cache\\": "src/"
18 }
19 },
20 "extra": {
21 "branch-alias": {
22 "dev-master": "1.0.x-dev"
23 }
24 }
25}
diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php
new file mode 100644
index 0000000..bb785f4
--- /dev/null
+++ b/vendor/psr/cache/src/CacheException.php
@@ -0,0 +1,10 @@
1<?php
2
3namespace Psr\Cache;
4
5/**
6 * Exception interface for all exceptions thrown by an Implementing Library.
7 */
8interface CacheException extends \Throwable
9{
10}
diff --git a/vendor/psr/cache/src/CacheItemInterface.php b/vendor/psr/cache/src/CacheItemInterface.php
new file mode 100644
index 0000000..2b2e4bb
--- /dev/null
+++ b/vendor/psr/cache/src/CacheItemInterface.php
@@ -0,0 +1,105 @@
1<?php
2
3namespace Psr\Cache;
4
5/**
6 * CacheItemInterface defines an interface for interacting with objects inside a cache.
7 *
8 * Each Item object MUST be associated with a specific key, which can be set
9 * according to the implementing system and is typically passed by the
10 * Cache\CacheItemPoolInterface object.
11 *
12 * The Cache\CacheItemInterface object encapsulates the storage and retrieval of
13 * cache items. Each Cache\CacheItemInterface is generated by a
14 * Cache\CacheItemPoolInterface object, which is responsible for any required
15 * setup as well as associating the object with a unique Key.
16 * Cache\CacheItemInterface objects MUST be able to store and retrieve any type
17 * of PHP value defined in the Data section of the specification.
18 *
19 * Calling Libraries MUST NOT instantiate Item objects themselves. They may only
20 * be requested from a Pool object via the getItem() method. Calling Libraries
21 * SHOULD NOT assume that an Item created by one Implementing Library is
22 * compatible with a Pool from another Implementing Library.
23 */
24interface CacheItemInterface
25{
26 /**
27 * Returns the key for the current cache item.
28 *
29 * The key is loaded by the Implementing Library, but should be available to
30 * the higher level callers when needed.
31 *
32 * @return string
33 * The key string for this cache item.
34 */
35 public function getKey(): string;
36
37 /**
38 * Retrieves the value of the item from the cache associated with this object's key.
39 *
40 * The value returned must be identical to the value originally stored by set().
41 *
42 * If isHit() returns false, this method MUST return null. Note that null
43 * is a legitimate cached value, so the isHit() method SHOULD be used to
44 * differentiate between "null value was found" and "no value was found."
45 *
46 * @return mixed
47 * The value corresponding to this cache item's key, or null if not found.
48 */
49 public function get(): mixed;
50
51 /**
52 * Confirms if the cache item lookup resulted in a cache hit.
53 *
54 * Note: This method MUST NOT have a race condition between calling isHit()
55 * and calling get().
56 *
57 * @return bool
58 * True if the request resulted in a cache hit. False otherwise.
59 */
60 public function isHit(): bool;
61
62 /**
63 * Sets the value represented by this cache item.
64 *
65 * The $value argument may be any item that can be serialized by PHP,
66 * although the method of serialization is left up to the Implementing
67 * Library.
68 *
69 * @param mixed $value
70 * The serializable value to be stored.
71 *
72 * @return static
73 * The invoked object.
74 */
75 public function set(mixed $value): static;
76
77 /**
78 * Sets the expiration time for this cache item.
79 *
80 * @param ?\DateTimeInterface $expiration
81 * The point in time after which the item MUST be considered expired.
82 * If null is passed explicitly, a default value MAY be used. If none is set,
83 * the value should be stored permanently or for as long as the
84 * implementation allows.
85 *
86 * @return static
87 * The called object.
88 */
89 public function expiresAt(?\DateTimeInterface $expiration): static;
90
91 /**
92 * Sets the expiration time for this cache item.
93 *
94 * @param int|\DateInterval|null $time
95 * The period of time from the present after which the item MUST be considered
96 * expired. An integer parameter is understood to be the time in seconds until
97 * expiration. If null is passed explicitly, a default value MAY be used.
98 * If none is set, the value should be stored permanently or for as long as the
99 * implementation allows.
100 *
101 * @return static
102 * The called object.
103 */
104 public function expiresAfter(int|\DateInterval|null $time): static;
105}
diff --git a/vendor/psr/cache/src/CacheItemPoolInterface.php b/vendor/psr/cache/src/CacheItemPoolInterface.php
new file mode 100644
index 0000000..4b3017c
--- /dev/null
+++ b/vendor/psr/cache/src/CacheItemPoolInterface.php
@@ -0,0 +1,138 @@
1<?php
2
3namespace Psr\Cache;
4
5/**
6 * CacheItemPoolInterface generates CacheItemInterface objects.
7 *
8 * The primary purpose of Cache\CacheItemPoolInterface is to accept a key from
9 * the Calling Library and return the associated Cache\CacheItemInterface object.
10 * It is also the primary point of interaction with the entire cache collection.
11 * All configuration and initialization of the Pool is left up to an
12 * Implementing Library.
13 */
14interface CacheItemPoolInterface
15{
16 /**
17 * Returns a Cache Item representing the specified key.
18 *
19 * This method must always return a CacheItemInterface object, even in case of
20 * a cache miss. It MUST NOT return null.
21 *
22 * @param string $key
23 * The key for which to return the corresponding Cache Item.
24 *
25 * @throws InvalidArgumentException
26 * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
27 * MUST be thrown.
28 *
29 * @return CacheItemInterface
30 * The corresponding Cache Item.
31 */
32 public function getItem(string $key): CacheItemInterface;
33
34 /**
35 * Returns a traversable set of cache items.
36 *
37 * @param string[] $keys
38 * An indexed array of keys of items to retrieve.
39 *
40 * @throws InvalidArgumentException
41 * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
42 * MUST be thrown.
43 *
44 * @return iterable
45 * An iterable collection of Cache Items keyed by the cache keys of
46 * each item. A Cache item will be returned for each key, even if that
47 * key is not found. However, if no keys are specified then an empty
48 * traversable MUST be returned instead.
49 */
50 public function getItems(array $keys = []): iterable;
51
52 /**
53 * Confirms if the cache contains specified cache item.
54 *
55 * Note: This method MAY avoid retrieving the cached value for performance reasons.
56 * This could result in a race condition with CacheItemInterface::get(). To avoid
57 * such situation use CacheItemInterface::isHit() instead.
58 *
59 * @param string $key
60 * The key for which to check existence.
61 *
62 * @throws InvalidArgumentException
63 * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
64 * MUST be thrown.
65 *
66 * @return bool
67 * True if item exists in the cache, false otherwise.
68 */
69 public function hasItem(string $key): bool;
70
71 /**
72 * Deletes all items in the pool.
73 *
74 * @return bool
75 * True if the pool was successfully cleared. False if there was an error.
76 */
77 public function clear(): bool;
78
79 /**
80 * Removes the item from the pool.
81 *
82 * @param string $key
83 * The key to delete.
84 *
85 * @throws InvalidArgumentException
86 * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
87 * MUST be thrown.
88 *
89 * @return bool
90 * True if the item was successfully removed. False if there was an error.
91 */
92 public function deleteItem(string $key): bool;
93
94 /**
95 * Removes multiple items from the pool.
96 *
97 * @param string[] $keys
98 * An array of keys that should be removed from the pool.
99 *
100 * @throws InvalidArgumentException
101 * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
102 * MUST be thrown.
103 *
104 * @return bool
105 * True if the items were successfully removed. False if there was an error.
106 */
107 public function deleteItems(array $keys): bool;
108
109 /**
110 * Persists a cache item immediately.
111 *
112 * @param CacheItemInterface $item
113 * The cache item to save.
114 *
115 * @return bool
116 * True if the item was successfully persisted. False if there was an error.
117 */
118 public function save(CacheItemInterface $item): bool;
119
120 /**
121 * Sets a cache item to be persisted later.
122 *
123 * @param CacheItemInterface $item
124 * The cache item to save.
125 *
126 * @return bool
127 * False if the item could not be queued or if a commit was attempted and failed. True otherwise.
128 */
129 public function saveDeferred(CacheItemInterface $item): bool;
130
131 /**
132 * Persists any deferred cache items.
133 *
134 * @return bool
135 * True if all not-yet-saved items were successfully saved or there were none. False otherwise.
136 */
137 public function commit(): bool;
138}
diff --git a/vendor/psr/cache/src/InvalidArgumentException.php b/vendor/psr/cache/src/InvalidArgumentException.php
new file mode 100644
index 0000000..be7c6fa
--- /dev/null
+++ b/vendor/psr/cache/src/InvalidArgumentException.php
@@ -0,0 +1,13 @@
1<?php
2
3namespace Psr\Cache;
4
5/**
6 * Exception interface for invalid cache arguments.
7 *
8 * Any time an invalid argument is passed into a method it must throw an
9 * exception class which implements Psr\Cache\InvalidArgumentException.
10 */
11interface InvalidArgumentException extends CacheException
12{
13}