PHP 클래스 Fragen\GitHub_Updater\Rest_Update

Updates a single plugin or theme, in a way suitable for rest requests. This class inherits from Base in order to be able to call the set_defaults function.
상속: extends Base
파일 보기 프로젝트 열기: afragen/github-updater

보호된 프로퍼티들

프로퍼티 타입 설명
$upgrader_skin Rest_Upgrader_Skin Holds REST Upgrader Skin.

공개 메소드들

메소드 설명
__construct ( ) Constructor.
get_messages ( ) Get messages during update.
is_error ( ) Is there an error?
process_request ( ) Process request.
show_updates ( $response ) : mixed Return listing of available updates.
update_plugin ( string $plugin_slug, string $tag = 'master' ) Update plugin.
update_theme ( string $theme_slug, string $tag = 'master' ) Update a single theme.

비공개 메소드들

메소드 설명
get_webhook_data ( ) : boolean | array Checks the headers of the request and sends webhook data to be parsed.
parse_bitbucket_webhook ( array $request_data ) : boolean | array Parses Bitbucket webhook data.
parse_github_webhook ( array $request_data ) : array Parses GitHub webhook data.
parse_gitlab_webhook ( array $request_data ) : array Parses GitLab webhook data.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

get_messages() 공개 메소드

Get messages during update.
public get_messages ( )

is_error() 공개 메소드

Is there an error?
public is_error ( )

process_request() 공개 메소드

Relies on data in $_REQUEST, prints out json and exits. If the request came through a webhook, and if the branch in the webhook matches the branch specified by the url, use the latest update available as specified in the webhook payload.
public process_request ( )

show_updates() 공개 메소드

Return listing of available updates.
public show_updates ( $response ) : mixed
$response
리턴 mixed

update_plugin() 공개 메소드

Update plugin.
public update_plugin ( string $plugin_slug, string $tag = 'master' )
$plugin_slug string
$tag string

update_theme() 공개 메소드

Update a single theme.
public update_theme ( string $theme_slug, string $tag = 'master' )
$theme_slug string
$tag string

프로퍼티 상세

$upgrader_skin 보호되어 있는 프로퍼티

Holds REST Upgrader Skin.
protected Rest_Upgrader_Skin,Fragen\GitHub_Updater $upgrader_skin
리턴 Rest_Upgrader_Skin