public function upload($id, array $files)
    {
        if (!empty($files)) {
            $uploader = new FileUploader();

            foreach ($files as $file) {
                if (!$uploader->upload($this->getPath($id), $files)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
public function upload($id, array $files)
    {
        if (!empty($files)) {
            $uploader = new FileUploader();

            foreach ($files as $file) {
                if (!$uploader->upload($this->getPath($id), $files)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
public function upload ( $ id , array $ files ) { if ( ! empty ( $ files ) ) { $ uploader = new FileUploader ( ) ; foreach ( $ files as $ file ) { if ( ! $ uploader -> upload ( $ this -> getPath ( $ id ) , $ files ) ) { return false ; } } return true ; } return false ; }
Uploads a file into a directory by its id

@param string $id Nested directory's id
@param array $files An array of file bags
@return boolean
Uploads a file into a directory by its id