PHP Class WP_Async_Request, wp-background-processing

Afficher le fichier Open project: A5hleyRich/wp-background-processing Class Usage Examples

Protected Properties

Свойство Type Description
$action string (default value: 'async_request')
$data array (default value: array())
$identifier mixed Identifier
$prefix string (default value: 'wp')

Méthodes publiques

Méthode Description
__construct ( ) Initiate new async request
data ( array $data ) Set data used during the request
dispatch ( ) : array | WP_Error Dispatch the async request
maybe_handle ( ) Maybe handle

Méthodes protégées

Méthode Description
get_post_args ( ) : array Get post args
get_query_args ( ) : array Get query args
get_query_url ( ) : string Get query URL
handle ( ) Handle

Method Details

__construct() public méthode

Initiate new async request
public __construct ( )

data() public méthode

Set data used during the request
public data ( array $data )
$data array Data.

dispatch() public méthode

Dispatch the async request
public dispatch ( ) : array | WP_Error
Résultat array | WP_Error

get_post_args() protected méthode

Get post args
protected get_post_args ( ) : array
Résultat array

get_query_args() protected méthode

Get query args
protected get_query_args ( ) : array
Résultat array

get_query_url() protected méthode

Get query URL
protected get_query_url ( ) : string
Résultat string

handle() abstract protected méthode

Override this method to perform any actions required during the async request.
abstract protected handle ( )

maybe_handle() public méthode

Check for correct nonce and pass to handler.
public maybe_handle ( )

Property Details

$action protected_oe property

(default value: 'async_request')
protected string $action
Résultat string

$data protected_oe property

(default value: array())
protected array $data
Résultat array

$identifier protected_oe property

Identifier
protected mixed $identifier
Résultat mixed

$prefix protected_oe property

(default value: 'wp')
protected string $prefix
Résultat string