public function copyTo($destination)
    {
        foreach ($this as $source_path => $asset_path) {
            if (!is_readable($source_path)) {
                if ($this->logger) {
                    $this->logger->error('Asset "' . $source_path . '" could not be found or is not readable');
                }

                continue;
            }

            $destination_path = $destination . '/' . $asset_path;
            if (!file_exists(dirname($destination_path))) {
                mkdir(dirname($destination_path), 0777, true);
            }

            copy($source_path, $destination_path);
        }
    }
public function copyTo($destination)
    {
        foreach ($this as $source_path => $asset_path) {
            if (!is_readable($source_path)) {
                if ($this->logger) {
                    $this->logger->error('Asset "' . $source_path . '" could not be found or is not readable');
                }

                continue;
            }

            $destination_path = $destination . '/' . $asset_path;
            if (!file_exists(dirname($destination_path))) {
                mkdir(dirname($destination_path), 0777, true);
            }

            copy($source_path, $destination_path);
        }
    }
public function copyTo ( $ destination ) { foreach ( $ this as $ source_path => $ asset_path ) { if ( ! is_readable ( $ source_path ) ) { if ( $ this -> logger ) { $ this -> logger -> error ( 'Asset "' . $ source_path . '" could not be found or is not readable' ) ; } continue ; } $ destination_path = $ destination . '/' . $ asset_path ; if ( ! file_exists ( dirname ( $ destination_path ) ) ) { mkdir ( dirname ( $ destination_path ) , 0777 , true ) ; } copy ( $ source_path , $ destination_path ) ; } }
Copies all assets in this collection to their given destination location.

@param string $destination
Copies all assets in this collection to their given destination location .