PHP Класс WP_CLI\Dispatcher\CommandFactory

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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