PHP Класс Fragen\GitHub_Updater\API

Наследование: extends Base
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$response array Variable to hold all repository remote info.

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

Метод Описание
construct_download_link ( )
get_language_pack ( $headers )
get_remote_branches ( )
get_remote_changes ( $changes )
get_remote_info ( $file ) * The following functions must be in any repository API.
get_remote_readme ( )
get_remote_tag ( )
get_repo_meta ( )
http_request_args ( array $args, string $url ) : array Adds custom user agent for GitHub Updater.
wp_update_response ( mixed $response, array $args, string $url ) : mixed Shiny updates results in the update transient being reset with only the wp.org data.

Защищенные методы

Метод Описание
add_endpoints ( $git, $endpoint )
api ( string $url ) : boolean | object Call the API and return a json decoded body.
get_dot_org_data ( ) : array | boolean | mixed | string | WP_Error Query wp.org for plugin information.
get_transient ( ) : array | boolean Returns site_transient and checks/stores transient id in array.
make_release_asset_download_link ( ) : string Create release asset download link.
parse_changelog_response ( $response )
parse_meta_response ( $response )
parse_tag_response ( $response )
return_repo_type ( ) : array Return repo data for API calls.
set_transient ( string $id, mixed $response ) : boolean Used to set_site_transient and checks/stores transient id in array.
validate_response ( $response ) : boolean Validate wp_remote_get response.

Приватные методы

Метод Описание
get_api_url ( string $endpoint ) : string Return API url.

Описание методов

add_endpoints() абстрактный защищенный метод

abstract protected add_endpoints ( $git, $endpoint )

api() защищенный метод

Create error messages.
См. также: http://developer.github.com/v3/
protected api ( string $url ) : boolean | object
$url string
Результат boolean | object

get_dot_org_data() защищенный метод

Query wp.org for plugin information.
protected get_dot_org_data ( ) : array | boolean | mixed | string | WP_Error
Результат array | boolean | mixed | string | WP_Error

get_language_pack() абстрактный публичный метод

abstract public get_language_pack ( $headers )

get_remote_branches() абстрактный публичный метод

abstract public get_remote_branches ( )

get_remote_changes() абстрактный публичный метод

abstract public get_remote_changes ( $changes )

get_remote_info() абстрактный публичный метод

* The following functions must be in any repository API.
abstract public get_remote_info ( $file )

get_remote_readme() абстрактный публичный метод

abstract public get_remote_readme ( )

get_remote_tag() абстрактный публичный метод

abstract public get_remote_tag ( )

get_repo_meta() абстрактный публичный метод

abstract public get_repo_meta ( )

get_transient() защищенный метод

Returns site_transient and checks/stores transient id in array.
protected get_transient ( ) : array | boolean
Результат array | boolean

http_request_args() публичный статический метод

Adds custom user agent for GitHub Updater.
public static http_request_args ( array $args, string $url ) : array
$args array Existing HTTP Request arguments.
$url string URL being passed.
Результат array Amended HTTP Request arguments.

parse_changelog_response() абстрактный защищенный метод

abstract protected parse_changelog_response ( $response )

parse_meta_response() абстрактный защищенный метод

abstract protected parse_meta_response ( $response )

parse_tag_response() абстрактный защищенный метод

abstract protected parse_tag_response ( $response )

return_repo_type() защищенный метод

Return repo data for API calls.
protected return_repo_type ( ) : array
Результат array

set_transient() защищенный метод

Used to set_site_transient and checks/stores transient id in array.
protected set_transient ( string $id, mixed $response ) : boolean
$id string Transient ID.
$response mixed Data to be stored.
Результат boolean

validate_response() защищенный метод

Validate wp_remote_get response.
protected validate_response ( $response ) : boolean
$response
Результат boolean true if invalid

wp_update_response() публичный статический метод

This catches the response and reloads the transients.
public static wp_update_response ( mixed $response, array $args, string $url ) : mixed
$response mixed HTTP server response.
$args array HTTP response arguments.
$url string URL of HTTP response.
Результат mixed $response Just a pass through, no manipulation.

Описание свойств

$response защищенное свойство

Variable to hold all repository remote info.
protected array $response
Результат array