public function attachFiles($id, $table, $files)
    {
        foreach ($files as $file) {
            if (!empty($file)) {
                $this->attachFile($id, $table, $file);
            }
        }
    }
public function attachFiles($id, $table, $files)
    {
        foreach ($files as $file) {
            if (!empty($file)) {
                $this->attachFile($id, $table, $file);
            }
        }
    }
public function attachFiles ( $ id , $ table , $ files ) { foreach ( $ files as $ file ) { if ( ! empty ( $ file ) ) { $ this -> attachFile ( $ id , $ table , $ file ) ; } } }
It will attach the array of files to the entity.

@param $id
@param $table
@param $files
It will attach the array of files to the entity .