MatthiasMullie\Scrapbook\Psr16\SimpleCache::getMultiple PHP Метод

getMultiple() публичный Метод

public getMultiple ( $keys, $default = null )
    public function getMultiple($keys, $default = null)
    {
        if ($keys instanceof Traversable) {
            $keys = iterator_to_array($keys);
        }
        if (!is_array($keys) || array_filter($keys, 'is_string') !== $keys) {
            throw new InvalidArgumentException('Invalid keys: ' . serialize($keys) . '. Must be array of strings.');
        }
        $results = $this->store->getMulti($keys);
        // KeyValueStore omits values that are not in cache, while PSR-16 will
        // have them with a default value
        $nulls = array_fill_keys($keys, $default);
        $results = array_merge($nulls, $results);
        return $results;
    }