PHP Class WP_CLI\CommandWithUpgrade

Inheritance: extends WP_CLI_Command
显示文件 Open project: wp-cli/wp-cli Class Usage Examples

Protected Properties

Property Type Description
$chained_command
$item_type
$obj_fields
$upgrade_refresh
$upgrade_transient

Public Methods

Method Description
__construct ( )
install ( $args, $assoc_args )
status ( $args )

Protected Methods

Method Description
_list ( $_, $assoc_args )
_search ( array $args, array $assoc_args ) Search wordpress.org repo.
alter_api_response ( object $response, string $version ) Prepare an API response for downloading a particular version of an item.
filter_item_list ( $items, $args ) : array
format_status ( $status, $format )
get_all_items ( )
get_formatter ( &$assoc_args )
get_item_list ( )
get_status ( $file )
get_update_info ( string $slug ) : array | null Get the available update info
get_upgrader ( $assoc_args )
get_upgrader_class ( $force )
has_update ( string $slug ) : boolean Check whether an item has an update available or not.
install_from_repo ( $slug, $assoc_args )
status_single ( $args )
update_many ( $args, $assoc_args )

Private Methods

Method Description
get_color ( $status )
get_padding ( $items )
show_legend ( $items )
status_all ( )

Method Details

__construct() public method

public __construct ( )

_list() protected method

protected _list ( $_, $assoc_args )

alter_api_response() protected static method

Prepare an API response for downloading a particular version of an item.
protected static alter_api_response ( object $response, string $version )
$response object wordpress.org API response
$version string The desired version of the package

filter_item_list() abstract protected method

abstract protected filter_item_list ( $items, $args ) : array
return array List of update candidates

format_status() protected method

protected format_status ( $status, $format )

get_all_items() abstract protected method

abstract protected get_all_items ( )

get_formatter() protected method

protected get_formatter ( &$assoc_args )

get_item_list() abstract protected method

abstract protected get_item_list ( )

get_status() abstract protected method

abstract protected get_status ( $file )

get_update_info() protected method

Get the available update info
protected get_update_info ( string $slug ) : array | null
$slug string The plugin/theme slug
return array | null

get_upgrader() protected method

protected get_upgrader ( $assoc_args )

get_upgrader_class() abstract protected method

abstract protected get_upgrader_class ( $force )

has_update() protected method

Check whether an item has an update available or not.
protected has_update ( string $slug ) : boolean
$slug string The plugin/theme slug
return boolean

install() public method

public install ( $args, $assoc_args )

install_from_repo() abstract protected method

abstract protected install_from_repo ( $slug, $assoc_args )

status() public method

public status ( $args )

status_single() abstract protected method

abstract protected status_single ( $args )

update_many() protected method

protected update_many ( $args, $assoc_args )

Property Details

$chained_command protected_oe property

protected $chained_command

$item_type protected_oe property

protected $item_type

$obj_fields protected_oe property

protected $obj_fields

$upgrade_refresh protected_oe property

protected $upgrade_refresh

$upgrade_transient protected_oe property

protected $upgrade_transient