public function upload($files)
    {
        $exception = null;

        //for each client
        foreach ($this->children as $child) {
            $this->logger->info(sprintf('[dizda-backup] Uploading to %s', $child->getName()));

            try {
                //try to upload every file, one at a time
                foreach ($files as $file) {
                    $child->upload($file);
                }
            } catch (\Exception $e) {
                //save the exception for later, there might be other children that are working
                $exception = $e;
            }
        }

        if ($exception) {
            throw $exception;
        }
    }
public function upload($files)
    {
        $exception = null;

        //for each client
        foreach ($this->children as $child) {
            $this->logger->info(sprintf('[dizda-backup] Uploading to %s', $child->getName()));

            try {
                //try to upload every file, one at a time
                foreach ($files as $file) {
                    $child->upload($file);
                }
            } catch (\Exception $e) {
                //save the exception for later, there might be other children that are working
                $exception = $e;
            }
        }

        if ($exception) {
            throw $exception;
        }
    }
public function upload ( $ files ) { $ exception = null ; //for each client foreach ( $ this -> children as $ child ) { $ this -> logger -> info ( sprintf ( '[dizda-backup] Uploading to %s' , $ child -> getName ( ) ) ) ; try { //try to upload every file, one at a time foreach ( $ files as $ file ) { $ child -> upload ( $ file ) ; } } catch ( \ Exception $ e ) { //save the exception for later, there might be other children that are working $ exception = $ e ; } } if ( $ exception ) { throw $ exception ; } }
Upload to all active clients.

@param array $files is an array with file paths
Upload to all active clients .