ScriptFUSION\Porter\Cache\MemoryCache::deleteItems PHP Méthode

deleteItems() public méthode

public deleteItems ( array $keys )
$keys array
    public function deleteItems(array $keys)
    {
        foreach ($keys as $key) {
            if (!$this->hasItem($key)) {
                throw new InvalidArgumentException("No such key in cache: \"{$key}\".");
            }
            $this->deleteItem($key);
        }
    }

Usage Example

 public function testDeleteInvalidItem()
 {
     $this->setExpectedException(InvalidArgumentException::class);
     $this->cache->deleteItems(['foo', 'bar']);
 }