@@ -4,201 +4,201 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface Session |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * Get the name of the session. |
|
| 9 | - * |
|
| 10 | - * @return string |
|
| 11 | - */ |
|
| 12 | - public function getName(); |
|
| 13 | - |
|
| 14 | - /** |
|
| 15 | - * Set the name of the session. |
|
| 16 | - * |
|
| 17 | - * @param string $name |
|
| 18 | - * @return void |
|
| 19 | - */ |
|
| 20 | - public function setName($name); |
|
| 21 | - |
|
| 22 | - /** |
|
| 23 | - * Get the current session ID. |
|
| 24 | - * |
|
| 25 | - * @return string |
|
| 26 | - */ |
|
| 27 | - public function getId(); |
|
| 28 | - |
|
| 29 | - /** |
|
| 30 | - * Set the session ID. |
|
| 31 | - * |
|
| 32 | - * @param string $id |
|
| 33 | - * @return void |
|
| 34 | - */ |
|
| 35 | - public function setId($id); |
|
| 36 | - |
|
| 37 | - /** |
|
| 38 | - * Start the session, reading the data from a handler. |
|
| 39 | - * |
|
| 40 | - * @return bool |
|
| 41 | - */ |
|
| 42 | - public function start(); |
|
| 43 | - |
|
| 44 | - /** |
|
| 45 | - * Save the session data to storage. |
|
| 46 | - * |
|
| 47 | - * @return void |
|
| 48 | - */ |
|
| 49 | - public function save(); |
|
| 50 | - |
|
| 51 | - /** |
|
| 52 | - * Get all of the session data. |
|
| 53 | - * |
|
| 54 | - * @return array |
|
| 55 | - */ |
|
| 56 | - public function all(); |
|
| 57 | - |
|
| 58 | - /** |
|
| 59 | - * Checks if a key exists. |
|
| 60 | - * |
|
| 61 | - * @param string|array $key |
|
| 62 | - * @return bool |
|
| 63 | - */ |
|
| 64 | - public function exists($key); |
|
| 65 | - |
|
| 66 | - /** |
|
| 67 | - * Checks if a key is present and not null. |
|
| 68 | - * |
|
| 69 | - * @param string|array $key |
|
| 70 | - * @return bool |
|
| 71 | - */ |
|
| 72 | - public function has($key); |
|
| 73 | - |
|
| 74 | - /** |
|
| 75 | - * Get an item from the session. |
|
| 76 | - * |
|
| 77 | - * @param string $key |
|
| 78 | - * @param mixed $default |
|
| 79 | - * @return mixed |
|
| 80 | - */ |
|
| 81 | - public function get($key, $default = null); |
|
| 82 | - |
|
| 83 | - /** |
|
| 84 | - * Get the value of a given key and then forget it. |
|
| 85 | - * |
|
| 86 | - * @param string $key |
|
| 87 | - * @param mixed $default |
|
| 88 | - * @return mixed |
|
| 89 | - */ |
|
| 90 | - public function pull($key, $default = null); |
|
| 91 | - |
|
| 92 | - /** |
|
| 93 | - * Put a key / value pair or array of key / value pairs in the session. |
|
| 94 | - * |
|
| 95 | - * @param string|array $key |
|
| 96 | - * @param mixed $value |
|
| 97 | - * @return void |
|
| 98 | - */ |
|
| 99 | - public function put($key, $value = null); |
|
| 100 | - |
|
| 101 | - /** |
|
| 102 | - * Get the CSRF token value. |
|
| 103 | - * |
|
| 104 | - * @return string |
|
| 105 | - */ |
|
| 106 | - public function token(); |
|
| 107 | - |
|
| 108 | - /** |
|
| 109 | - * Regenerate the CSRF token value. |
|
| 110 | - * |
|
| 111 | - * @return void |
|
| 112 | - */ |
|
| 113 | - public function regenerateToken(); |
|
| 114 | - |
|
| 115 | - /** |
|
| 116 | - * Remove an item from the session, returning its value. |
|
| 117 | - * |
|
| 118 | - * @param string $key |
|
| 119 | - * @return mixed |
|
| 120 | - */ |
|
| 121 | - public function remove($key); |
|
| 122 | - |
|
| 123 | - /** |
|
| 124 | - * Remove one or many items from the session. |
|
| 125 | - * |
|
| 126 | - * @param string|array $keys |
|
| 127 | - * @return void |
|
| 128 | - */ |
|
| 129 | - public function forget($keys); |
|
| 130 | - |
|
| 131 | - /** |
|
| 132 | - * Remove all of the items from the session. |
|
| 133 | - * |
|
| 134 | - * @return void |
|
| 135 | - */ |
|
| 136 | - public function flush(); |
|
| 137 | - |
|
| 138 | - /** |
|
| 139 | - * Flush the session data and regenerate the ID. |
|
| 140 | - * |
|
| 141 | - * @return bool |
|
| 142 | - */ |
|
| 143 | - public function invalidate(); |
|
| 144 | - |
|
| 145 | - /** |
|
| 146 | - * Generate a new session identifier. |
|
| 147 | - * |
|
| 148 | - * @param bool $destroy |
|
| 149 | - * @return bool |
|
| 150 | - */ |
|
| 151 | - public function regenerate($destroy = false); |
|
| 152 | - |
|
| 153 | - /** |
|
| 154 | - * Generate a new session ID for the session. |
|
| 155 | - * |
|
| 156 | - * @param bool $destroy |
|
| 157 | - * @return bool |
|
| 158 | - */ |
|
| 159 | - public function migrate($destroy = false); |
|
| 160 | - |
|
| 161 | - /** |
|
| 162 | - * Determine if the session has been started. |
|
| 163 | - * |
|
| 164 | - * @return bool |
|
| 165 | - */ |
|
| 166 | - public function isStarted(); |
|
| 167 | - |
|
| 168 | - /** |
|
| 169 | - * Get the previous URL from the session. |
|
| 170 | - * |
|
| 171 | - * @return string|null |
|
| 172 | - */ |
|
| 173 | - public function previousUrl(); |
|
| 174 | - |
|
| 175 | - /** |
|
| 176 | - * Set the "previous" URL in the session. |
|
| 177 | - * |
|
| 178 | - * @param string $url |
|
| 179 | - * @return void |
|
| 180 | - */ |
|
| 181 | - public function setPreviousUrl($url); |
|
| 182 | - |
|
| 183 | - /** |
|
| 184 | - * Get the session handler instance. |
|
| 185 | - * |
|
| 186 | - * @return \SessionHandlerInterface |
|
| 187 | - */ |
|
| 188 | - public function getHandler(); |
|
| 189 | - |
|
| 190 | - /** |
|
| 191 | - * Determine if the session handler needs a request. |
|
| 192 | - * |
|
| 193 | - * @return bool |
|
| 194 | - */ |
|
| 195 | - public function handlerNeedsRequest(); |
|
| 196 | - |
|
| 197 | - /** |
|
| 198 | - * Set the request on the handler instance. |
|
| 199 | - * |
|
| 200 | - * @param \Illuminate\Http\Request $request |
|
| 201 | - * @return void |
|
| 202 | - */ |
|
| 203 | - public function setRequestOnHandler($request); |
|
| 7 | + /** |
|
| 8 | + * Get the name of the session. |
|
| 9 | + * |
|
| 10 | + * @return string |
|
| 11 | + */ |
|
| 12 | + public function getName(); |
|
| 13 | + |
|
| 14 | + /** |
|
| 15 | + * Set the name of the session. |
|
| 16 | + * |
|
| 17 | + * @param string $name |
|
| 18 | + * @return void |
|
| 19 | + */ |
|
| 20 | + public function setName($name); |
|
| 21 | + |
|
| 22 | + /** |
|
| 23 | + * Get the current session ID. |
|
| 24 | + * |
|
| 25 | + * @return string |
|
| 26 | + */ |
|
| 27 | + public function getId(); |
|
| 28 | + |
|
| 29 | + /** |
|
| 30 | + * Set the session ID. |
|
| 31 | + * |
|
| 32 | + * @param string $id |
|
| 33 | + * @return void |
|
| 34 | + */ |
|
| 35 | + public function setId($id); |
|
| 36 | + |
|
| 37 | + /** |
|
| 38 | + * Start the session, reading the data from a handler. |
|
| 39 | + * |
|
| 40 | + * @return bool |
|
| 41 | + */ |
|
| 42 | + public function start(); |
|
| 43 | + |
|
| 44 | + /** |
|
| 45 | + * Save the session data to storage. |
|
| 46 | + * |
|
| 47 | + * @return void |
|
| 48 | + */ |
|
| 49 | + public function save(); |
|
| 50 | + |
|
| 51 | + /** |
|
| 52 | + * Get all of the session data. |
|
| 53 | + * |
|
| 54 | + * @return array |
|
| 55 | + */ |
|
| 56 | + public function all(); |
|
| 57 | + |
|
| 58 | + /** |
|
| 59 | + * Checks if a key exists. |
|
| 60 | + * |
|
| 61 | + * @param string|array $key |
|
| 62 | + * @return bool |
|
| 63 | + */ |
|
| 64 | + public function exists($key); |
|
| 65 | + |
|
| 66 | + /** |
|
| 67 | + * Checks if a key is present and not null. |
|
| 68 | + * |
|
| 69 | + * @param string|array $key |
|
| 70 | + * @return bool |
|
| 71 | + */ |
|
| 72 | + public function has($key); |
|
| 73 | + |
|
| 74 | + /** |
|
| 75 | + * Get an item from the session. |
|
| 76 | + * |
|
| 77 | + * @param string $key |
|
| 78 | + * @param mixed $default |
|
| 79 | + * @return mixed |
|
| 80 | + */ |
|
| 81 | + public function get($key, $default = null); |
|
| 82 | + |
|
| 83 | + /** |
|
| 84 | + * Get the value of a given key and then forget it. |
|
| 85 | + * |
|
| 86 | + * @param string $key |
|
| 87 | + * @param mixed $default |
|
| 88 | + * @return mixed |
|
| 89 | + */ |
|
| 90 | + public function pull($key, $default = null); |
|
| 91 | + |
|
| 92 | + /** |
|
| 93 | + * Put a key / value pair or array of key / value pairs in the session. |
|
| 94 | + * |
|
| 95 | + * @param string|array $key |
|
| 96 | + * @param mixed $value |
|
| 97 | + * @return void |
|
| 98 | + */ |
|
| 99 | + public function put($key, $value = null); |
|
| 100 | + |
|
| 101 | + /** |
|
| 102 | + * Get the CSRF token value. |
|
| 103 | + * |
|
| 104 | + * @return string |
|
| 105 | + */ |
|
| 106 | + public function token(); |
|
| 107 | + |
|
| 108 | + /** |
|
| 109 | + * Regenerate the CSRF token value. |
|
| 110 | + * |
|
| 111 | + * @return void |
|
| 112 | + */ |
|
| 113 | + public function regenerateToken(); |
|
| 114 | + |
|
| 115 | + /** |
|
| 116 | + * Remove an item from the session, returning its value. |
|
| 117 | + * |
|
| 118 | + * @param string $key |
|
| 119 | + * @return mixed |
|
| 120 | + */ |
|
| 121 | + public function remove($key); |
|
| 122 | + |
|
| 123 | + /** |
|
| 124 | + * Remove one or many items from the session. |
|
| 125 | + * |
|
| 126 | + * @param string|array $keys |
|
| 127 | + * @return void |
|
| 128 | + */ |
|
| 129 | + public function forget($keys); |
|
| 130 | + |
|
| 131 | + /** |
|
| 132 | + * Remove all of the items from the session. |
|
| 133 | + * |
|
| 134 | + * @return void |
|
| 135 | + */ |
|
| 136 | + public function flush(); |
|
| 137 | + |
|
| 138 | + /** |
|
| 139 | + * Flush the session data and regenerate the ID. |
|
| 140 | + * |
|
| 141 | + * @return bool |
|
| 142 | + */ |
|
| 143 | + public function invalidate(); |
|
| 144 | + |
|
| 145 | + /** |
|
| 146 | + * Generate a new session identifier. |
|
| 147 | + * |
|
| 148 | + * @param bool $destroy |
|
| 149 | + * @return bool |
|
| 150 | + */ |
|
| 151 | + public function regenerate($destroy = false); |
|
| 152 | + |
|
| 153 | + /** |
|
| 154 | + * Generate a new session ID for the session. |
|
| 155 | + * |
|
| 156 | + * @param bool $destroy |
|
| 157 | + * @return bool |
|
| 158 | + */ |
|
| 159 | + public function migrate($destroy = false); |
|
| 160 | + |
|
| 161 | + /** |
|
| 162 | + * Determine if the session has been started. |
|
| 163 | + * |
|
| 164 | + * @return bool |
|
| 165 | + */ |
|
| 166 | + public function isStarted(); |
|
| 167 | + |
|
| 168 | + /** |
|
| 169 | + * Get the previous URL from the session. |
|
| 170 | + * |
|
| 171 | + * @return string|null |
|
| 172 | + */ |
|
| 173 | + public function previousUrl(); |
|
| 174 | + |
|
| 175 | + /** |
|
| 176 | + * Set the "previous" URL in the session. |
|
| 177 | + * |
|
| 178 | + * @param string $url |
|
| 179 | + * @return void |
|
| 180 | + */ |
|
| 181 | + public function setPreviousUrl($url); |
|
| 182 | + |
|
| 183 | + /** |
|
| 184 | + * Get the session handler instance. |
|
| 185 | + * |
|
| 186 | + * @return \SessionHandlerInterface |
|
| 187 | + */ |
|
| 188 | + public function getHandler(); |
|
| 189 | + |
|
| 190 | + /** |
|
| 191 | + * Determine if the session handler needs a request. |
|
| 192 | + * |
|
| 193 | + * @return bool |
|
| 194 | + */ |
|
| 195 | + public function handlerNeedsRequest(); |
|
| 196 | + |
|
| 197 | + /** |
|
| 198 | + * Set the request on the handler instance. |
|
| 199 | + * |
|
| 200 | + * @param \Illuminate\Http\Request $request |
|
| 201 | + * @return void |
|
| 202 | + */ |
|
| 203 | + public function setRequestOnHandler($request); |
|
| 204 | 204 | } |
@@ -6,30 +6,30 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface Connection |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Subscribe to a set of given channels for messages. |
|
| 11 | - * |
|
| 12 | - * @param array|string $channels |
|
| 13 | - * @param \Closure $callback |
|
| 14 | - * @return void |
|
| 15 | - */ |
|
| 16 | - public function subscribe($channels, Closure $callback); |
|
| 9 | + /** |
|
| 10 | + * Subscribe to a set of given channels for messages. |
|
| 11 | + * |
|
| 12 | + * @param array|string $channels |
|
| 13 | + * @param \Closure $callback |
|
| 14 | + * @return void |
|
| 15 | + */ |
|
| 16 | + public function subscribe($channels, Closure $callback); |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Subscribe to a set of given channels with wildcards. |
|
| 20 | - * |
|
| 21 | - * @param array|string $channels |
|
| 22 | - * @param \Closure $callback |
|
| 23 | - * @return void |
|
| 24 | - */ |
|
| 25 | - public function psubscribe($channels, Closure $callback); |
|
| 18 | + /** |
|
| 19 | + * Subscribe to a set of given channels with wildcards. |
|
| 20 | + * |
|
| 21 | + * @param array|string $channels |
|
| 22 | + * @param \Closure $callback |
|
| 23 | + * @return void |
|
| 24 | + */ |
|
| 25 | + public function psubscribe($channels, Closure $callback); |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Run a command against the Redis database. |
|
| 29 | - * |
|
| 30 | - * @param string $method |
|
| 31 | - * @param array $parameters |
|
| 32 | - * @return mixed |
|
| 33 | - */ |
|
| 34 | - public function command($method, array $parameters = []); |
|
| 27 | + /** |
|
| 28 | + * Run a command against the Redis database. |
|
| 29 | + * |
|
| 30 | + * @param string $method |
|
| 31 | + * @param array $parameters |
|
| 32 | + * @return mixed |
|
| 33 | + */ |
|
| 34 | + public function command($method, array $parameters = []); |
|
| 35 | 35 | } |
@@ -4,11 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface Factory |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * Get a Redis connection by name. |
|
| 9 | - * |
|
| 10 | - * @param string|null $name |
|
| 11 | - * @return \Illuminate\Redis\Connections\Connection |
|
| 12 | - */ |
|
| 13 | - public function connection($name = null); |
|
| 7 | + /** |
|
| 8 | + * Get a Redis connection by name. |
|
| 9 | + * |
|
| 10 | + * @param string|null $name |
|
| 11 | + * @return \Illuminate\Redis\Connections\Connection |
|
| 12 | + */ |
|
| 13 | + public function connection($name = null); |
|
| 14 | 14 | } |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | |
| 7 | 7 | class LimiterTimeoutException extends Exception |
| 8 | 8 | { |
| 9 | - // |
|
| 9 | + // |
|
| 10 | 10 | } |
@@ -4,22 +4,22 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface Connector |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * Create a connection to a Redis cluster. |
|
| 9 | - * |
|
| 10 | - * @param array $config |
|
| 11 | - * @param array $options |
|
| 12 | - * @return \Illuminate\Redis\Connections\Connection |
|
| 13 | - */ |
|
| 14 | - public function connect(array $config, array $options); |
|
| 7 | + /** |
|
| 8 | + * Create a connection to a Redis cluster. |
|
| 9 | + * |
|
| 10 | + * @param array $config |
|
| 11 | + * @param array $options |
|
| 12 | + * @return \Illuminate\Redis\Connections\Connection |
|
| 13 | + */ |
|
| 14 | + public function connect(array $config, array $options); |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * Create a connection to a Redis instance. |
|
| 18 | - * |
|
| 19 | - * @param array $config |
|
| 20 | - * @param array $clusterOptions |
|
| 21 | - * @param array $options |
|
| 22 | - * @return \Illuminate\Redis\Connections\Connection |
|
| 23 | - */ |
|
| 24 | - public function connectToCluster(array $config, array $clusterOptions, array $options); |
|
| 16 | + /** |
|
| 17 | + * Create a connection to a Redis instance. |
|
| 18 | + * |
|
| 19 | + * @param array $config |
|
| 20 | + * @param array $clusterOptions |
|
| 21 | + * @param array $options |
|
| 22 | + * @return \Illuminate\Redis\Connections\Connection |
|
| 23 | + */ |
|
| 24 | + public function connectToCluster(array $config, array $clusterOptions, array $options); |
|
| 25 | 25 | } |
@@ -6,41 +6,41 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface ExceptionHandler |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Report or log an exception. |
|
| 11 | - * |
|
| 12 | - * @param \Throwable $e |
|
| 13 | - * @return void |
|
| 14 | - * |
|
| 15 | - * @throws \Throwable |
|
| 16 | - */ |
|
| 17 | - public function report(Throwable $e); |
|
| 9 | + /** |
|
| 10 | + * Report or log an exception. |
|
| 11 | + * |
|
| 12 | + * @param \Throwable $e |
|
| 13 | + * @return void |
|
| 14 | + * |
|
| 15 | + * @throws \Throwable |
|
| 16 | + */ |
|
| 17 | + public function report(Throwable $e); |
|
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * Determine if the exception should be reported. |
|
| 21 | - * |
|
| 22 | - * @param \Throwable $e |
|
| 23 | - * @return bool |
|
| 24 | - */ |
|
| 25 | - public function shouldReport(Throwable $e); |
|
| 19 | + /** |
|
| 20 | + * Determine if the exception should be reported. |
|
| 21 | + * |
|
| 22 | + * @param \Throwable $e |
|
| 23 | + * @return bool |
|
| 24 | + */ |
|
| 25 | + public function shouldReport(Throwable $e); |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Render an exception into an HTTP response. |
|
| 29 | - * |
|
| 30 | - * @param \Illuminate\Http\Request $request |
|
| 31 | - * @param \Throwable $e |
|
| 32 | - * @return \Symfony\Component\HttpFoundation\Response |
|
| 33 | - * |
|
| 34 | - * @throws \Throwable |
|
| 35 | - */ |
|
| 36 | - public function render($request, Throwable $e); |
|
| 27 | + /** |
|
| 28 | + * Render an exception into an HTTP response. |
|
| 29 | + * |
|
| 30 | + * @param \Illuminate\Http\Request $request |
|
| 31 | + * @param \Throwable $e |
|
| 32 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 33 | + * |
|
| 34 | + * @throws \Throwable |
|
| 35 | + */ |
|
| 36 | + public function render($request, Throwable $e); |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Render an exception to the console. |
|
| 40 | - * |
|
| 41 | - * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
| 42 | - * @param \Throwable $e |
|
| 43 | - * @return void |
|
| 44 | - */ |
|
| 45 | - public function renderForConsole($output, Throwable $e); |
|
| 38 | + /** |
|
| 39 | + * Render an exception to the console. |
|
| 40 | + * |
|
| 41 | + * @param \Symfony\Component\Console\Output\OutputInterface $output |
|
| 42 | + * @param \Throwable $e |
|
| 43 | + * @return void |
|
| 44 | + */ |
|
| 45 | + public function renderForConsole($output, Throwable $e); |
|
| 46 | 46 | } |
@@ -4,41 +4,41 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface Lock |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * Attempt to acquire the lock. |
|
| 9 | - * |
|
| 10 | - * @param callable|null $callback |
|
| 11 | - * @return mixed |
|
| 12 | - */ |
|
| 13 | - public function get($callback = null); |
|
| 7 | + /** |
|
| 8 | + * Attempt to acquire the lock. |
|
| 9 | + * |
|
| 10 | + * @param callable|null $callback |
|
| 11 | + * @return mixed |
|
| 12 | + */ |
|
| 13 | + public function get($callback = null); |
|
| 14 | 14 | |
| 15 | - /** |
|
| 16 | - * Attempt to acquire the lock for the given number of seconds. |
|
| 17 | - * |
|
| 18 | - * @param int $seconds |
|
| 19 | - * @param callable|null $callback |
|
| 20 | - * @return mixed |
|
| 21 | - */ |
|
| 22 | - public function block($seconds, $callback = null); |
|
| 15 | + /** |
|
| 16 | + * Attempt to acquire the lock for the given number of seconds. |
|
| 17 | + * |
|
| 18 | + * @param int $seconds |
|
| 19 | + * @param callable|null $callback |
|
| 20 | + * @return mixed |
|
| 21 | + */ |
|
| 22 | + public function block($seconds, $callback = null); |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Release the lock. |
|
| 26 | - * |
|
| 27 | - * @return bool |
|
| 28 | - */ |
|
| 29 | - public function release(); |
|
| 24 | + /** |
|
| 25 | + * Release the lock. |
|
| 26 | + * |
|
| 27 | + * @return bool |
|
| 28 | + */ |
|
| 29 | + public function release(); |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * Returns the current owner of the lock. |
|
| 33 | - * |
|
| 34 | - * @return string |
|
| 35 | - */ |
|
| 36 | - public function owner(); |
|
| 31 | + /** |
|
| 32 | + * Returns the current owner of the lock. |
|
| 33 | + * |
|
| 34 | + * @return string |
|
| 35 | + */ |
|
| 36 | + public function owner(); |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Releases this lock in disregard of ownership. |
|
| 40 | - * |
|
| 41 | - * @return void |
|
| 42 | - */ |
|
| 43 | - public function forceRelease(); |
|
| 38 | + /** |
|
| 39 | + * Releases this lock in disregard of ownership. |
|
| 40 | + * |
|
| 41 | + * @return void |
|
| 42 | + */ |
|
| 43 | + public function forceRelease(); |
|
| 44 | 44 | } |
@@ -7,102 +7,102 @@ |
||
| 7 | 7 | |
| 8 | 8 | interface Repository extends CacheInterface |
| 9 | 9 | { |
| 10 | - /** |
|
| 11 | - * Retrieve an item from the cache and delete it. |
|
| 12 | - * |
|
| 13 | - * @param string $key |
|
| 14 | - * @param mixed $default |
|
| 15 | - * @return mixed |
|
| 16 | - */ |
|
| 17 | - public function pull($key, $default = null); |
|
| 10 | + /** |
|
| 11 | + * Retrieve an item from the cache and delete it. |
|
| 12 | + * |
|
| 13 | + * @param string $key |
|
| 14 | + * @param mixed $default |
|
| 15 | + * @return mixed |
|
| 16 | + */ |
|
| 17 | + public function pull($key, $default = null); |
|
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * Store an item in the cache. |
|
| 21 | - * |
|
| 22 | - * @param string $key |
|
| 23 | - * @param mixed $value |
|
| 24 | - * @param \DateTimeInterface|\DateInterval|int|null $ttl |
|
| 25 | - * @return bool |
|
| 26 | - */ |
|
| 27 | - public function put($key, $value, $ttl = null); |
|
| 19 | + /** |
|
| 20 | + * Store an item in the cache. |
|
| 21 | + * |
|
| 22 | + * @param string $key |
|
| 23 | + * @param mixed $value |
|
| 24 | + * @param \DateTimeInterface|\DateInterval|int|null $ttl |
|
| 25 | + * @return bool |
|
| 26 | + */ |
|
| 27 | + public function put($key, $value, $ttl = null); |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Store an item in the cache if the key does not exist. |
|
| 31 | - * |
|
| 32 | - * @param string $key |
|
| 33 | - * @param mixed $value |
|
| 34 | - * @param \DateTimeInterface|\DateInterval|int|null $ttl |
|
| 35 | - * @return bool |
|
| 36 | - */ |
|
| 37 | - public function add($key, $value, $ttl = null); |
|
| 29 | + /** |
|
| 30 | + * Store an item in the cache if the key does not exist. |
|
| 31 | + * |
|
| 32 | + * @param string $key |
|
| 33 | + * @param mixed $value |
|
| 34 | + * @param \DateTimeInterface|\DateInterval|int|null $ttl |
|
| 35 | + * @return bool |
|
| 36 | + */ |
|
| 37 | + public function add($key, $value, $ttl = null); |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * Increment the value of an item in the cache. |
|
| 41 | - * |
|
| 42 | - * @param string $key |
|
| 43 | - * @param mixed $value |
|
| 44 | - * @return int|bool |
|
| 45 | - */ |
|
| 46 | - public function increment($key, $value = 1); |
|
| 39 | + /** |
|
| 40 | + * Increment the value of an item in the cache. |
|
| 41 | + * |
|
| 42 | + * @param string $key |
|
| 43 | + * @param mixed $value |
|
| 44 | + * @return int|bool |
|
| 45 | + */ |
|
| 46 | + public function increment($key, $value = 1); |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * Decrement the value of an item in the cache. |
|
| 50 | - * |
|
| 51 | - * @param string $key |
|
| 52 | - * @param mixed $value |
|
| 53 | - * @return int|bool |
|
| 54 | - */ |
|
| 55 | - public function decrement($key, $value = 1); |
|
| 48 | + /** |
|
| 49 | + * Decrement the value of an item in the cache. |
|
| 50 | + * |
|
| 51 | + * @param string $key |
|
| 52 | + * @param mixed $value |
|
| 53 | + * @return int|bool |
|
| 54 | + */ |
|
| 55 | + public function decrement($key, $value = 1); |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Store an item in the cache indefinitely. |
|
| 59 | - * |
|
| 60 | - * @param string $key |
|
| 61 | - * @param mixed $value |
|
| 62 | - * @return bool |
|
| 63 | - */ |
|
| 64 | - public function forever($key, $value); |
|
| 57 | + /** |
|
| 58 | + * Store an item in the cache indefinitely. |
|
| 59 | + * |
|
| 60 | + * @param string $key |
|
| 61 | + * @param mixed $value |
|
| 62 | + * @return bool |
|
| 63 | + */ |
|
| 64 | + public function forever($key, $value); |
|
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * Get an item from the cache, or execute the given Closure and store the result. |
|
| 68 | - * |
|
| 69 | - * @param string $key |
|
| 70 | - * @param \DateTimeInterface|\DateInterval|int|null $ttl |
|
| 71 | - * @param \Closure $callback |
|
| 72 | - * @return mixed |
|
| 73 | - */ |
|
| 74 | - public function remember($key, $ttl, Closure $callback); |
|
| 66 | + /** |
|
| 67 | + * Get an item from the cache, or execute the given Closure and store the result. |
|
| 68 | + * |
|
| 69 | + * @param string $key |
|
| 70 | + * @param \DateTimeInterface|\DateInterval|int|null $ttl |
|
| 71 | + * @param \Closure $callback |
|
| 72 | + * @return mixed |
|
| 73 | + */ |
|
| 74 | + public function remember($key, $ttl, Closure $callback); |
|
| 75 | 75 | |
| 76 | - /** |
|
| 77 | - * Get an item from the cache, or execute the given Closure and store the result forever. |
|
| 78 | - * |
|
| 79 | - * @param string $key |
|
| 80 | - * @param \Closure $callback |
|
| 81 | - * @return mixed |
|
| 82 | - */ |
|
| 83 | - public function sear($key, Closure $callback); |
|
| 76 | + /** |
|
| 77 | + * Get an item from the cache, or execute the given Closure and store the result forever. |
|
| 78 | + * |
|
| 79 | + * @param string $key |
|
| 80 | + * @param \Closure $callback |
|
| 81 | + * @return mixed |
|
| 82 | + */ |
|
| 83 | + public function sear($key, Closure $callback); |
|
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * Get an item from the cache, or execute the given Closure and store the result forever. |
|
| 87 | - * |
|
| 88 | - * @param string $key |
|
| 89 | - * @param \Closure $callback |
|
| 90 | - * @return mixed |
|
| 91 | - */ |
|
| 92 | - public function rememberForever($key, Closure $callback); |
|
| 85 | + /** |
|
| 86 | + * Get an item from the cache, or execute the given Closure and store the result forever. |
|
| 87 | + * |
|
| 88 | + * @param string $key |
|
| 89 | + * @param \Closure $callback |
|
| 90 | + * @return mixed |
|
| 91 | + */ |
|
| 92 | + public function rememberForever($key, Closure $callback); |
|
| 93 | 93 | |
| 94 | - /** |
|
| 95 | - * Remove an item from the cache. |
|
| 96 | - * |
|
| 97 | - * @param string $key |
|
| 98 | - * @return bool |
|
| 99 | - */ |
|
| 100 | - public function forget($key); |
|
| 94 | + /** |
|
| 95 | + * Remove an item from the cache. |
|
| 96 | + * |
|
| 97 | + * @param string $key |
|
| 98 | + * @return bool |
|
| 99 | + */ |
|
| 100 | + public function forget($key); |
|
| 101 | 101 | |
| 102 | - /** |
|
| 103 | - * Get the cache store implementation. |
|
| 104 | - * |
|
| 105 | - * @return \Illuminate\Contracts\Cache\Store |
|
| 106 | - */ |
|
| 107 | - public function getStore(); |
|
| 102 | + /** |
|
| 103 | + * Get the cache store implementation. |
|
| 104 | + * |
|
| 105 | + * @return \Illuminate\Contracts\Cache\Store |
|
| 106 | + */ |
|
| 107 | + public function getStore(); |
|
| 108 | 108 | } |
@@ -4,22 +4,22 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface LockProvider |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * Get a lock instance. |
|
| 9 | - * |
|
| 10 | - * @param string $name |
|
| 11 | - * @param int $seconds |
|
| 12 | - * @param string|null $owner |
|
| 13 | - * @return \Illuminate\Contracts\Cache\Lock |
|
| 14 | - */ |
|
| 15 | - public function lock($name, $seconds = 0, $owner = null); |
|
| 7 | + /** |
|
| 8 | + * Get a lock instance. |
|
| 9 | + * |
|
| 10 | + * @param string $name |
|
| 11 | + * @param int $seconds |
|
| 12 | + * @param string|null $owner |
|
| 13 | + * @return \Illuminate\Contracts\Cache\Lock |
|
| 14 | + */ |
|
| 15 | + public function lock($name, $seconds = 0, $owner = null); |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * Restore a lock instance using the owner identifier. |
|
| 19 | - * |
|
| 20 | - * @param string $name |
|
| 21 | - * @param string $owner |
|
| 22 | - * @return \Illuminate\Contracts\Cache\Lock |
|
| 23 | - */ |
|
| 24 | - public function restoreLock($name, $owner); |
|
| 17 | + /** |
|
| 18 | + * Restore a lock instance using the owner identifier. |
|
| 19 | + * |
|
| 20 | + * @param string $name |
|
| 21 | + * @param string $owner |
|
| 22 | + * @return \Illuminate\Contracts\Cache\Lock |
|
| 23 | + */ |
|
| 24 | + public function restoreLock($name, $owner); |
|
| 25 | 25 | } |