framework/console/CConsoleCommandRunner.php
public function addCommands($path)
	{
		if(($commands=$this->findCommands($path))!==array())
		{
			foreach($commands as $name=>$file)
			{
				if(!isset($this->commands[$name]))
					$this->commands[$name]=$file;
			}
		}
	}
public function addCommands($path)
	{
		if(($commands=$this->findCommands($path))!==array())
		{
			foreach($commands as $name=>$file)
			{
				if(!isset($this->commands[$name]))
					$this->commands[$name]=$file;
			}
		}
	}
public function addCommands ( $ path ) { if ( ( $ commands = $ this -> findCommands ( $ path ) ) !== array ( ) ) { foreach ( $ commands as $ name => $ file ) { if ( ! isset ( $ this -> commands [ $ name ] ) ) $ this -> commands [ $ name ] = $ file ; } } }
Adds commands from the specified command path.
If a command already exists, the new one will be ignored.
@param string $path the alias of the directory containing the command class files.
Adds commands from the specified command path . If a command already exists the new one will be ignored .