WP_CLI\Dispatcher

Subcommand::__construct()publicWP-CLI 1.0

Method of the class: Subcommand{}

No Hooks.

Return

null. Nothing.

Usage

$Subcommand = new Subcommand();
$Subcommand->__construct( $parent, $name, $docparser, $when_invoked );
$parent (required)
-
$name (required)
-
$docparser (required)
-
$when_invoked (required)
-

Subcommand::__construct() code WP-CLI 2.8.0-alpha

public function __construct( $parent, $name, $docparser, $when_invoked ) {
	parent::__construct( $parent, $name, $docparser );

	$this->when_invoked = $when_invoked;

	$this->alias = $docparser->get_tag( 'alias' );

	$this->synopsis = $docparser->get_synopsis();
	if ( ! $this->synopsis && $this->longdesc ) {
		$this->synopsis = self::extract_synopsis( $this->longdesc );
	}
}