MatthiasMullie\Scrapbook\Psr6\Repository::resolve PHP Метод

resolve() защищенный Метод

Resolve all unresolved keys at once.
protected resolve ( )
    protected function resolve()
    {
        $keys = array_unique(array_values($this->unresolved));
        $values = $this->store->getMulti($keys);
        foreach ($this->unresolved as $unique => $key) {
            if (!array_key_exists($key, $values)) {
                // key doesn't exist in cache
                continue;
            }
            /*
             * In theory, there could've been multiple unresolved requests for
             * the same cache key. In the case of objects, we'll clone them
             * to make sure that when the value for 1 item is manipulated, it
             * doesn't affect the value of the other item (because those objects
             * would be passed by-ref without the cloning)
             */
            $value = $values[$key];
            $value = is_object($value) ? clone $value : $value;
            $this->resolved[$unique] = $value;
        }
        $this->unresolved = array();
    }