PHP Class WPDiscourse\ResponseValidator\ResponseValidator

ファイルを表示 Open project: discourse/wp-discourse

Protected Properties

Property Type Description
$instance ResponseValidator An instance of the ResponseValidator class.

Public Methods

Method 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

Method Description
__construct ( ) A private constructor, only called through get_instance().

Method Details

check_connection_status() public method

A function to check the connection status to Discourse.

get_instance() public static method

Returns a single instance of the ResponseValidator class.
public static get_instance ( ) : ResponseValidator
return ResponseValidator

validate() public method

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`.
return integer

Property Details

$instance protected_oe static_oe property

An instance of the ResponseValidator class.
protected static ResponseValidator,WPDiscourse\ResponseValidator $instance
return ResponseValidator