1
0
mirror of synced 2025-02-20 14:13:15 +03:00

Added params argument to allow you to use tokens

This commit is contained in:
jwage 2008-01-23 23:27:02 +00:00
parent 8cc89beb41
commit eb04f52cd0

View File

@ -34,8 +34,8 @@ class Doctrine_Task_Dql extends Doctrine_Task
{
public $description = 'Execute dql query and display the results',
$requiredArguments = array('models_path' => 'Specify path to your Doctrine_Record definitions.',
'dql_query' => 'Specify the complete dql query to execute.'),
$optionalArguments = array();
'dql_query' => 'Specify the complete dql query to execute.'),
$optionalArguments = array('params' => 'Comma separated list of the params to replace the ? tokens in the dql');
public function execute()
{
@ -47,7 +47,7 @@ class Doctrine_Task_Dql extends Doctrine_Task
$this->notify('executing: "' . $dql . '"');
$results = $query->query($dql);
$results = $query->query($dql, explode(',', $this->getArgument('params')));
$this->printResults($results);
}