Skip to content

Instantly share code, notes, and snippets.

@nqbao
Created July 25, 2011 10:58
Show Gist options
  • Save nqbao/1103906 to your computer and use it in GitHub Desktop.
Save nqbao/1103906 to your computer and use it in GitHub Desktop.
Run a command programmtically in Symfony 2
<?php
$drop = $this->getApplication()->get("doctrine:database:drop");
$dropInput = new ArrayInput(array('--force' => '1'), $drop->getDefinition());
$drop->execute($dropInput, $output);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment