src/Modules/Assets/AssetsCollection.php
public function dump($assets_dir, array $filters = [])
    {
        $assets        = [];
        $assets_pathes = [];

        foreach ($this->assets as $asset) {
            $assets[]        = $asset->getFileAsset($assets_dir);
            $assets_pathes[] = $asset->getTempPath();
        }

        $collection = new AssetCollection($assets, $filters);
        $collection_dump = $collection->dump();

        foreach ($assets_pathes as $asset_path) {
            @unlink($asset_path);
        }
        return $collection_dump;
    }
public function dump($assets_dir, array $filters = [])
    {
        $assets        = [];
        $assets_pathes = [];

        foreach ($this->assets as $asset) {
            $assets[]        = $asset->getFileAsset($assets_dir);
            $assets_pathes[] = $asset->getTempPath();
        }

        $collection = new AssetCollection($assets, $filters);
        $collection_dump = $collection->dump();

        foreach ($assets_pathes as $asset_path) {
            @unlink($asset_path);
        }
        return $collection_dump;
    }
@param string $assets_dir
@param array $filters

@return string