. */ /** * Doctrine_Cli_Task_GenerateSql * * @package Doctrine * @subpackage Cli * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 2761 $ * @author Jonathan H. Wage */ class Doctrine_Cli_Task_GenerateSql extends Doctrine_Cli_Task { public $description = 'Generate sql for all existing database connections.', $requiredArguments = array('models_path' => 'Specify complete path to your Doctrine_Record definitions.', 'sql_path' => 'Path to write the generated sql.'), $optionalArguments = array(); public function execute() { $sql = Doctrine::generateSqlFromModels($this->getArgument('models_path')); file_put_contents($this->getArgument('sql_path'), implode("\n", $sql)); } }