ResourceLocator/src/UniformResourceLocator.php
public function fillCache($uri)
    {
        $cacheKey = $uri . '@cache';

        if (!isset($this->cache[$cacheKey])) {
            $this->cache[$cacheKey] = true;

            $iterator = new \RecursiveIteratorIterator($this->getRecursiveIterator($uri), \RecursiveIteratorIterator::SELF_FIRST);

            /** @var UniformResourceIterator $uri */
            foreach ($iterator as $item) {
                $key = $item->getUrl() . '@010';
                $this->cache[$key] = $item->getPathname();
            }
        }

        return $this;
    }
public function fillCache($uri)
    {
        $cacheKey = $uri . '@cache';

        if (!isset($this->cache[$cacheKey])) {
            $this->cache[$cacheKey] = true;

            $iterator = new \RecursiveIteratorIterator($this->getRecursiveIterator($uri), \RecursiveIteratorIterator::SELF_FIRST);

            /** @var UniformResourceIterator $uri */
            foreach ($iterator as $item) {
                $key = $item->getUrl() . '@010';
                $this->cache[$key] = $item->getPathname();
            }
        }

        return $this;
    }
public function fillCache ( $ uri ) { $ cacheKey = $ uri . '@cache' ; if ( ! isset ( $ this -> cache [ $ cacheKey ] ) ) { $ this -> cache [ $ cacheKey ] = true ; $ iterator = new \ RecursiveIteratorIterator ( $ this -> getRecursiveIterator ( $ uri ) , \ RecursiveIteratorIterator :: SELF_FIRST ) ; /** @var UniformResourceIterator $uri */ foreach ( $ iterator as $ item ) { $ key = $ item -> getUrl ( ) . '@010' ; $ this -> cache [ $ key ] = $ item -> getPathname ( ) ; } } return $ this ; }
Pre-fill cache by a stream.

@param string $uri
@return $this
Pre - fill cache by a stream .