PHP Class WP_CLI\Runner

Afficher le fichier Open project: wp-cli/wp-cli

Méthodes publiques

Méthode Description
__get ( $key )
action_setup_theme_wp_cli_skip_themes ( ) Set up the filters to skip the loaded theme
find_command_to_run ( array $args ) : array | string Given positional arguments, find the command to execute.
get_packages_dir_path ( ) : string Get the path to the packages directory
get_wp_config_code ( ) : string Returns wp-config.php code, skipping the loading of wp-settings.php
in_color ( ) : boolean Whether or not the output should be rendered in color
is_command_disabled ( $command ) : boolean Check whether a given command is disabled by the config
load_wordpress ( ) Load WordPress, if it hasn't already been loaded
register_early_invoke ( string $when, Subcommand $command ) Register a command for early invocation, generally before WordPress loads.
run_command ( array $args, array $assoc_args = [], array $options = [] ) Find the WP-CLI command to run given arguments, and invoke it.
start ( )

Private Methods

Méthode Description
_run_command ( )
auto_check_update ( ) Check whether there's a WP-CLI update available, and suggest update if so.
back_compat_conversions ( array $args, array $assoc_args ) : array Transparently convert deprecated syntaxes
check_root ( )
check_wp_version ( )
cmd_starts_with ( $prefix )
do_early_invoke ( string $when ) Perform the early invocation of a command.
extract_subdir_path ( string $index_path ) : string | false Attempts to find the path to the WP install inside index.php
fake_current_site_blog ( $url_parts )
find_wp_root ( ) : string Find the directory that contains the WordPress files.
get_global_config_path ( ) : string | false Get the path to the global configuration YAML file.
get_project_config_path ( ) : string | false Get the path to the project-specific configuration YAML file.
guess_url ( array $assoc_args ) : string | false Guess which URL context WP-CLI has been invoked under.
init_colorization ( )
init_config ( )
init_logger ( )
is_multisite ( ) Whether or not this WordPress install is multisite.
maybe_update_url_from_domain_constant ( ) Called after wp-config.php is eval'd, to potentially reset --url
run_alias_group ( $aliases )
run_ssh_command ( $ssh ) Perform a command against a remote server over SSH
set_alias ( $alias )
set_wp_root ( string $path ) Set WordPress root as a given path.
setup_bootstrap_hooks ( ) Set up hooks meant to run during the WordPress bootstrap process
setup_skip_plugins_filters ( ) Set up the filters to skip the loaded plugins
wp_exists ( ) : boolean Do WordPress core files exist?

Method Details

__get() public méthode

public __get ( $key )

action_setup_theme_wp_cli_skip_themes() public méthode

Set up the filters to skip the loaded theme

find_command_to_run() public méthode

Given positional arguments, find the command to execute.
public find_command_to_run ( array $args ) : array | string
$args array
Résultat array | string Command, args, and path on success; error message on failure

get_packages_dir_path() public méthode

Get the path to the packages directory
public get_packages_dir_path ( ) : string
Résultat string

get_wp_config_code() public méthode

Returns wp-config.php code, skipping the loading of wp-settings.php
public get_wp_config_code ( ) : string
Résultat string

in_color() public méthode

Whether or not the output should be rendered in color
public in_color ( ) : boolean
Résultat boolean

is_command_disabled() public méthode

Check whether a given command is disabled by the config
public is_command_disabled ( $command ) : boolean
Résultat boolean

load_wordpress() public méthode

Load WordPress, if it hasn't already been loaded
public load_wordpress ( )

register_early_invoke() public méthode

Register a command for early invocation, generally before WordPress loads.
public register_early_invoke ( string $when, Subcommand $command )
$when string Named execution hook
$command WP_CLI\Dispatcher\Subcommand

run_command() public méthode

Find the WP-CLI command to run given arguments, and invoke it.
public run_command ( array $args, array $assoc_args = [], array $options = [] )
$args array Positional arguments including command name
$assoc_args array Associative arguments for the command.
$options array Configuration options for the function.

start() public méthode

public start ( )