PHP Class WP_CLI\Dispatcher\CommandFactory

ファイルを表示 Open project: wp-cli/wp-cli Class Usage Examples

Public Methods

Method Description
create ( string $name, string $callable, mixed $parent ) Create a new CompositeCommand (or Subcommand if class has __invoke())

Private Methods

Method Description
create_composite_command ( mixed $parent, string $name, mixed $callable ) Create a new Composite command instance.
create_subcommand ( mixed $parent, string $name, mixed $callable, object $reflection ) Create a new Subcommand instance.
is_good_method ( ReflectionMethod $method ) : boolean Check whether a method is actually callable.

Method Details

create() public static method

Create a new CompositeCommand (or Subcommand if class has __invoke())
public static create ( string $name, string $callable, mixed $parent )
$name string Represents how the command should be invoked
$callable string A subclass of WP_CLI_Command, a function, or a closure
$parent mixed The new command's parent Composite (or Root) command