PHP Class Fragen\GitHub_Updater\Messages

Inheritance: extends Base
显示文件 Open project: afragen/github-updater

Public Properties

Property Type Description
$error_message string Holds WP_Error message.

Public Methods

Method Description
create_error_message ( $type = '' ) : boolean Display message when API returns other than 200 or 404.
gitlab_error ( ) Generate error message for missing GitLab Private Token.
instance ( ) : object Singleton
show_401_error_message ( ) Create error message or 401 (Authentication Error) error.
show_403_error_message ( ) Create error message for 403 error.
show_wp_error ( ) Generate error message for WP_Error.

Method Details

create_error_message() public method

Display message when API returns other than 200 or 404.
public create_error_message ( $type = '' ) : boolean
return boolean

gitlab_error() public method

Generate error message for missing GitLab Private Token.
public gitlab_error ( )

instance() public static method

Singleton
public static instance ( ) : object
return object $instance Messages

show_401_error_message() public method

Usually 401 as private repo with no token set or incorrect user/pass.

show_403_error_message() public method

Usually 403 as API rate limit max out.

show_wp_error() public method

Generate error message for WP_Error.
public show_wp_error ( )

Property Details

$error_message public_oe static_oe property

Holds WP_Error message.
public static string $error_message
return string