Lines Matching refs:key
43 public function getItem($key): CacheItemInterface argument
45 return current($this->getItems([$key])); // @phpstan-ignore-line
61 foreach ($keys as $key) {
62 $items[$key] = $this->hasItem($key) ? clone $this->items[$key] : new $itemClass($key);
74 public function hasItem($key): bool argument
76 $this->isValidKey($key);
78 return isset($this->items[$key]) && $this->items[$key]->isHit();
101 public function deleteItem($key): bool argument
103 return $this->deleteItems([$key]);
116 foreach ($keys as $key) {
117 unset($this->items[$key]);
169 * @param string $key
173 private function isValidKey($key) argument
177 if (!is_string($key) || preg_match("#[$invalidCharacters]#", $key)) {
178 … throw new InvalidArgumentException('The provided key is not valid: ' . var_export($key, true));