1
0
Fork 0
mirror of synced 2025-03-30 03:30:13 +03:00

[2.0][DDC-82] Fixed CLI problems introduced by changeset 6582.

This commit is contained in:
romanb 2009-11-01 17:58:56 +00:00
parent 94569baa0b
commit 2fbc766de7
7 changed files with 3 additions and 27 deletions

View file

@ -167,7 +167,7 @@ class Cli
// Check if task exists
if (isset($this->_tasks[$taskName]) && class_exists($this->_tasks[$taskName], true)) {
// Initializing EntityManager
$em = $this->_initializeEntityManager($processedArgs);
$em = $this->_initializeEntityManager($processedArgs, $taskArguments);
// Instantiate and execute the task
$task = new $this->_tasks[$taskName]();
@ -322,7 +322,7 @@ class Cli
* @param array CLI Task arguments
* @return EntityManager
*/
private function _initializeEntityManager(& $args)
private function _initializeEntityManager(array $args, array &$taskArgs)
{
// Initialize EntityManager
$configFile = ( ! isset($args['config'])) ? './cli-config.php' : $args['config'];
@ -341,7 +341,7 @@ class Cli
// Check for gloal argument options here
if (isset($globalArguments)) {
// Merge arguments. Values specified via the CLI take preference.
$args = array_merge($globalArguments, $args);
$taskArgs = array_merge($globalArguments, $taskArgs);
}
return $em;

View file

@ -79,10 +79,6 @@ class ClearCacheTask extends AbstractTask
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$printer = $this->getPrinter();
$args = $this->getArguments();

View file

@ -90,10 +90,6 @@ class ConvertMappingTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();

View file

@ -52,10 +52,6 @@ class GenerateProxiesTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();

View file

@ -77,10 +77,6 @@ class RunDqlTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();

View file

@ -83,10 +83,6 @@ class RunSqlTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();

View file

@ -99,10 +99,6 @@ class SchemaToolTask extends AbstractTask
*/
public function validate()
{
if ( ! parent::validate()) {
return false;
}
$args = $this->getArguments();
$printer = $this->getPrinter();