src/Beverage.php
public function destination($directory)
    {
        $filesystem = new Filesystem();

        foreach ($this->current_state as $filename => $file_content) {
            $filesystem->dumpFile($directory . '/' . $filename, $file_content);
        }

        unset($this->current_state);

        return $this;
    }
public function destination($directory)
    {
        $filesystem = new Filesystem();

        foreach ($this->current_state as $filename => $file_content) {
            $filesystem->dumpFile($directory . '/' . $filename, $file_content);
        }

        unset($this->current_state);

        return $this;
    }
public function destination ( $ directory ) { $ filesystem = new Filesystem ( ) ; foreach ( $ this -> current_state as $ filename => $ file_content ) { $ filesystem -> dumpFile ( $ directory . '/' . $ filename , $ file_content ) ; } unset ( $ this -> current_state ) ; return $ this ; }
Define the directory where the files will be saved.

Once the files have been saves, the current state of files is unset to
save memory

@param string $directory
Define the directory where the files will be saved .