1 | <?php |
||
24 | class CacheBridge implements Cache |
||
25 | { |
||
26 | /** |
||
27 | * @var \Illuminate\Contracts\Cache\Repository |
||
28 | */ |
||
29 | protected $driver; |
||
30 | |||
31 | /** |
||
32 | * LaravelDoctrineCache constructor. |
||
33 | * @param CacheManager $cache |
||
34 | */ |
||
35 | public function __construct(CacheManager $cache) |
||
39 | |||
40 | /** |
||
41 | * Fetches an entry from the cache. |
||
42 | * |
||
43 | * @param string $id The id of the cache entry to fetch. |
||
44 | * |
||
45 | * @return mixed The cached data or FALSE, if no cache entry exists for the given id. |
||
46 | */ |
||
47 | public function fetch($id) |
||
51 | |||
52 | /** |
||
53 | * Tests if an entry exists in the cache. |
||
54 | * |
||
55 | * @param string $id The cache id of the entry to check for. |
||
56 | * |
||
57 | * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise. |
||
58 | */ |
||
59 | public function contains($id) |
||
63 | |||
64 | /** |
||
65 | * Puts data into the cache. |
||
66 | * |
||
67 | * @param string $id The cache id. |
||
68 | * @param mixed $data The cache entry/data. |
||
69 | * @param int $lifeTime The cache lifetime. |
||
70 | * If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime). |
||
71 | * |
||
72 | * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise. |
||
73 | */ |
||
74 | public function save($id, $data, $lifeTime = 0) |
||
82 | |||
83 | /** |
||
84 | * Deletes a cache entry. |
||
85 | * |
||
86 | * @param string $id The cache id. |
||
87 | * |
||
88 | * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. |
||
89 | */ |
||
90 | public function delete($id) |
||
94 | |||
95 | /** |
||
96 | * Retrieves cached information from the data store. |
||
97 | * |
||
98 | * The server's statistics array has the following values: |
||
99 | * |
||
100 | * - <b>hits</b> |
||
101 | * Number of keys that have been requested and found present. |
||
102 | * |
||
103 | * - <b>misses</b> |
||
104 | * Number of items that have been requested and not found. |
||
105 | * |
||
106 | * - <b>uptime</b> |
||
107 | * Time that the server is running. |
||
108 | * |
||
109 | * - <b>memory_usage</b> |
||
110 | * Memory used by this server to store items. |
||
111 | * |
||
112 | * - <b>memory_available</b> |
||
113 | * Memory allowed to use for storage. |
||
114 | * |
||
115 | * @since 2.2 |
||
116 | * |
||
117 | * @return array|null An associative array with server's statistics if available, NULL otherwise. |
||
118 | */ |
||
119 | public function getStats() |
||
123 | } |
||
124 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..