PHP 클래스 WP_CLI\Dispatcher\CommandFactory

파일 보기 프로젝트 열기: wp-cli/wp-cli 1 사용 예제들

공개 메소드들

메소드 설명
create ( string $name, string $callable, mixed $parent ) Create a new CompositeCommand (or Subcommand if class has __invoke())

비공개 메소드들

메소드 설명
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.

메소드 상세

create() 공개 정적인 메소드

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