Tom Drover
Tom Drover

Reputation: 59

Symfony Console - Create File?

very new to Symfony and using the command line interface:

Usage:
 command [options] [arguments]

Options:
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
etc...

I wanted to know if there was any way to create files straight from this interface? So something akin to "echo 'This Worked' > test.php" within the Symfony console, allowing me to push out code tests to new, or existing, files on my server.

I can already write to SQL using doctrine:query:sql and wondered if there was something for writing local files?

Upvotes: 5

Views: 2267

Answers (1)

Gerald Chablowski
Gerald Chablowski

Reputation: 472

You may simply create a console command that do it : http://symfony.com/doc/current/console.html

Upvotes: 1

Related Questions