public function add (array $assets, ?callable $progress) : void
    {
        $fileTypeRegistry = $this->locator->get(FileTypeRegistry::class);
        $deferred = [];

        foreach ($assets as $asset)
        {
            if ($fileTypeRegistry->importDeferred($asset))
            {
                $deferred[] = $asset;
                continue;
            }

            $this->addAsset($asset);

            if (null !== $progress)
            {
                $progress();
            }
        }

        foreach ($deferred as $asset)
        {
            $this->addAsset($asset);

            if (null !== $progress)
            {
                $progress();
            }
        }
    }
public function add (array $assets, ?callable $progress) : void
    {
        $fileTypeRegistry = $this->locator->get(FileTypeRegistry::class);
        $deferred = [];

        foreach ($assets as $asset)
        {
            if ($fileTypeRegistry->importDeferred($asset))
            {
                $deferred[] = $asset;
                continue;
            }

            $this->addAsset($asset);

            if (null !== $progress)
            {
                $progress();
            }
        }

        foreach ($deferred as $asset)
        {
            $this->addAsset($asset);

            if (null !== $progress)
            {
                $progress();
            }
        }
    }
public function add ( array $ assets , ? callable $ progress ) : void { $ fileTypeRegistry = $ this -> locator -> get ( FileTypeRegistry :: class ) ; $ deferred = [ ] ; foreach ( $ assets as $ asset ) { if ( $ fileTypeRegistry -> importDeferred ( $ asset ) ) { $ deferred [ ] = $ asset ; continue ; } $ this -> addAsset ( $ asset ) ; if ( null !== $ progress ) { $ progress ( ) ; } } foreach ( $ deferred as $ asset ) { $ this -> addAsset ( $ asset ) ; if ( null !== $ progress ) { $ progress ( ) ; } } }
Adds a list of asset paths

@param Asset[] $assets
@throws AssetsException
Adds a list of asset paths