| @@ 246-254 (lines=9) @@ | ||
| 243 | */ |
|
| 244 | public function getMultiple($keys, $default = null) |
|
| 245 | { |
|
| 246 | if (!is_array($keys)) |
|
| 247 | { |
|
| 248 | if (!($keys instanceof \Traversable)) |
|
| 249 | { |
|
| 250 | throw new InvalidArgumentException('$keys is neither an array nor Traversable'); |
|
| 251 | } |
|
| 252 | ||
| 253 | $keys = iterator_to_array($keys, false); |
|
| 254 | } |
|
| 255 | ||
| 256 | $items = $this->getItems($keys); |
|
| 257 | ||
| @@ 325-333 (lines=9) @@ | ||
| 322 | */ |
|
| 323 | public function deleteMultiple($keys) |
|
| 324 | { |
|
| 325 | if (!is_array($keys)) |
|
| 326 | { |
|
| 327 | if (!$keys instanceof \Traversable) |
|
| 328 | { |
|
| 329 | throw new InvalidArgumentException('$keys is neither an array nor Traversable'); |
|
| 330 | } |
|
| 331 | ||
| 332 | $keys = iterator_to_array($keys, false); |
|
| 333 | } |
|
| 334 | ||
| 335 | return $this->deleteItems($keys); |
|
| 336 | } |
|