framework/console/CConsoleCommandRunner.php
public function run($args)
	{
		$this->_scriptName=$args[0];
		array_shift($args);
		if(isset($args[0]))
		{
			$name=$args[0];
			array_shift($args);
		}
		else
			$name='help';

		$oldCommand=$this->_command;
		if(($command=$this->createCommand($name))===null)
			$command=$this->createCommand('help');
		$this->_command=$command;
		$command->init();
		$exitCode=$command->run($args);
		$this->_command=$oldCommand;
		return $exitCode;
	}
public function run($args)
	{
		$this->_scriptName=$args[0];
		array_shift($args);
		if(isset($args[0]))
		{
			$name=$args[0];
			array_shift($args);
		}
		else
			$name='help';

		$oldCommand=$this->_command;
		if(($command=$this->createCommand($name))===null)
			$command=$this->createCommand('help');
		$this->_command=$command;
		$command->init();
		$exitCode=$command->run($args);
		$this->_command=$oldCommand;
		return $exitCode;
	}
public function run ( $ args ) { $ this -> _scriptName = $ args [ 0 ] ; array_shift ( $ args ) ; if ( isset ( $ args [ 0 ] ) ) { $ name = $ args [ 0 ] ; array_shift ( $ args ) ; } else $ name = 'help' ; $ oldCommand = $ this -> _command ; if ( ( $ command = $ this -> createCommand ( $ name ) ) === null ) $ command = $ this -> createCommand ( 'help' ) ; $ this -> _command = $ command ; $ command -> init ( ) ; $ exitCode = $ command -> run ( $ args ) ; $ this -> _command = $ oldCommand ; return $ exitCode ; }
Executes the requested command.
@param array $args list of user supplied parameters (including the entry script name and the command name).
@return integer|null application exit code returned by the command.
if null is returned, application will not exit explicitly. See also {@link CConsoleApplication::processRequest()}.
(return value is available since version 1.1.11)
Executes the requested command .