framework/console/CConsoleCommand.php
public function getOptionHelp()
	{
		$options=array();
		$class=new ReflectionClass(get_class($this));
		foreach($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method)
		{
			$name=$method->getName();
			if(!strncasecmp($name,'action',6) && strlen($name)>6)
			{
				$name=substr($name,6);
				$name[0]=strtolower($name[0]);
				$help=$name;

				foreach($method->getParameters() as $param)
				{
					$optional=$param->isDefaultValueAvailable();
					$defaultValue=$optional ? $param->getDefaultValue() : null;
					if(is_array($defaultValue)) {
						$defaultValue = str_replace(array("\r\n", "\n", "\r"), "", print_r($defaultValue, true));
					}
					$name=$param->getName();

					if($name==='args')
						continue;

					if($optional)
						$help.=" [--$name=$defaultValue]";
					else
						$help.=" --$name=value";
				}
				$options[]=$help;
			}
		}
		return $options;
	}
public function getOptionHelp()
	{
		$options=array();
		$class=new ReflectionClass(get_class($this));
		foreach($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method)
		{
			$name=$method->getName();
			if(!strncasecmp($name,'action',6) && strlen($name)>6)
			{
				$name=substr($name,6);
				$name[0]=strtolower($name[0]);
				$help=$name;

				foreach($method->getParameters() as $param)
				{
					$optional=$param->isDefaultValueAvailable();
					$defaultValue=$optional ? $param->getDefaultValue() : null;
					if(is_array($defaultValue)) {
						$defaultValue = str_replace(array("\r\n", "\n", "\r"), "", print_r($defaultValue, true));
					}
					$name=$param->getName();

					if($name==='args')
						continue;

					if($optional)
						$help.=" [--$name=$defaultValue]";
					else
						$help.=" --$name=value";
				}
				$options[]=$help;
			}
		}
		return $options;
	}
public function getOptionHelp ( ) { $ options = array ( ) ; $ class = new ReflectionClass ( get_class ( $ this ) ) ; foreach ( $ class -> getMethods ( ReflectionMethod :: IS_PUBLIC ) as $ method ) { $ name = $ method -> getName ( ) ; if ( ! strncasecmp ( $ name , 'action' , 6 ) && strlen ( $ name ) > 6 ) { $ name = substr ( $ name , 6 ) ; $ name [ 0 ] = strtolower ( $ name [ 0 ] ) ; $ help = $ name ; foreach ( $ method -> getParameters ( ) as $ param ) { $ optional = $ param -> isDefaultValueAvailable ( ) ; $ defaultValue = $ optional ? $ param -> getDefaultValue ( ) : null ; if ( is_array ( $ defaultValue ) ) { $ defaultValue = str_replace ( array ( "\r\n" , "\n" , "\r" ) , "" , print_r ( $ defaultValue , true ) ) ; } $ name = $ param -> getName ( ) ; if ( $ name === 'args' ) continue ; if ( $ optional ) $ help .= " [--$name=$defaultValue]" ; else $ help .= " --$name=value" ; } $ options [ ] = $ help ; } } return $ options ; }
Provides the command option help information.
The default implementation will return all available actions together with their
corresponding option information.
@return array the command option help information. Each array element describes
the help information for a single action.
@since 1.1.5
Provides the command option help information . The default implementation will return all available actions together with their corresponding option information .