-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContainerInterface.php
25 lines (22 loc) · 1.09 KB
/
ContainerInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
namespace Dhii\Cache;
use Dhii\Util\String\StringableInterface as Stringable;
use Psr\Container\ContainerInterface as BaseContainerInterface;
interface ContainerInterface extends BaseContainerInterface
{
/**
* Retrieves the value for a key, falling back to default.
*
* @since [*next-version*]
*
* @param string|Stringable $key The key to retrieve the value for/
* @param mixed|callable|null $default What to return if the value for the specified key is not found.
* If callable is passed, it will be invoked and the result will be returned.
* @param null|int|string|Stringable $ttl The number of seconds, for which the cache remains valid.
* If null, the underlying implementation is free to determine the lifetime, and it becomes unpredictable -
* possibly infinite.
*
* @return mixed The data at the specified key.
*/
public function get($key, $default = null, $ttl = null);
}