PHP Class WPDiscourse\ResponseValidator\ResponseValidator

Afficher le fichier Open project: discourse/wp-discourse

Protected Properties

Свойство Type Description
$instance ResponseValidator An instance of the ResponseValidator class.

Méthodes publiques

Méthode Description
check_connection_status ( ) : integer A function to check the connection status to Discourse.
get_instance ( ) : ResponseValidator Returns a single instance of the ResponseValidator class.
validate ( array $response ) : integer Validates the response from wp_remote_get or wp_remote_post.

Private Methods

Méthode Description
__construct ( ) A private constructor, only called through get_instance().

Method Details

check_connection_status() public méthode

A function to check the connection status to Discourse.
public check_connection_status ( ) : integer
Résultat integer

get_instance() public static méthode

Returns a single instance of the ResponseValidator class.
public static get_instance ( ) : ResponseValidator
Résultat ResponseValidator

validate() public méthode

Validates the response from wp_remote_get or wp_remote_post.
public validate ( array $response ) : integer
$response array The response from `wp_remote_get` or `wp_remote_post`.
Résultat integer

Property Details

$instance protected_oe static_oe property

An instance of the ResponseValidator class.
protected static ResponseValidator,WPDiscourse\ResponseValidator $instance
Résultat ResponseValidator