예제 #1
0
 /**
  * @see Console\Command\Command
  */
 protected function configure()
 {
     parent::configure();
     $this->addOption('--path', '-p', InputOption::VALUE_OPTIONAL, 'the project folder path', false);
     # mysql://root:vagrant@tcp(localhost:3306)/sakila
     # http://pear.php.net/manual/en/package.database.db.intro-dsn.php
     $this->addOption('--dsn', '', InputOption::VALUE_OPTIONAL, 'DSN to connect to db', false);
 }
예제 #2
0
    protected function configure()
    {
        parent::configure();
        $this->setName('doctrine:query:sql')->addOption('connection', null, InputOption::PARAMETER_OPTIONAL, 'The connection to use for this command.')->setHelp(<<<EOT
The <info>doctrine:query:sql</info> command executes the given DQL query and outputs the results:

  <info>./symfony doctrine:query:sql "SELECT * from user"</info>
EOT
);
    }
예제 #3
0
    /**
     * {@inheritDoc}
     */
    protected function configure()
    {
        parent::configure();
        $this->setName('doctrine:query:sql')->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command')->setHelp(<<<EOT
The <info>%command.name%</info> command executes the given SQL query and
outputs the results:

<info>php %command.full_name% "SELECT * from user"</info>
EOT
);
    }