Свойство | Тип | Описание | |
---|---|---|---|
$data | array | These variables are stored in a protected array that is magically updated using PHP 5.2+ methods. |
Метод | Описание | |
---|---|---|
__get ( string $key ) | Magic method for getting a certain data variable. | |
__isset ( string $key ) | Magic method for checking the existence of a certain data variable. | |
extend_activity_listener ( obj $listener, obj $item ) | RBE activity listener for your plugin. | |
extend_querystring ( string $querystring, obj $listener ) | Sets up the querystring used in the 'Reply-To' email address. | |
failure_message_to_sender ( mixed $message, string $type, array $headers, integer $i, resource $connection ) : mixed | Setup your extension's failure message to send back to the sender. | |
internal_rbe_log ( mixed $log, string $type, array $headers, integer $i, resource $connection ) : mixed | Log your extension's error messages during the post_by_email() method. | |
post ( boolean $retval, array $data, array $params ) : array | object | Detect your extension and do your post routine in this method. | |
register_params ( array $params ) : array | This method registers your 'item_id_param' / 'secondary_item_id_param' with RBE. |
Метод | Описание | |
---|---|---|
bootstrap ( array $data = [] ) | Extensions must use this method in their constructor. | |
setup_hooks ( ) | Hooks! We do the dirty work here, so you don't have to! :) |
public extend_activity_listener ( obj $listener, obj $item ) | ||
$listener | obj | Registers your component with RBE's activity listener |
$item | obj | The activity object generated by BP during save. |
public extend_querystring ( string $querystring, obj $listener ) | ||
$querystring | string | Querystring used to form the "Reply-To" email address. |
$listener | obj | The listener object registered in the extend_activity_listener() method. |
public failure_message_to_sender ( mixed $message, string $type, array $headers, integer $i, resource $connection ) : mixed | ||
$message | mixed | Should override to string in method. Defaults to boolean false. |
$type | string | Type of error message |
$headers | array | The email headers |
$i | integer | The message number from the inbox loop |
$connection | resource | The current IMAP connection. Chances are you probably don't have to do anything with this! |
Результат | mixed | $message |
public internal_rbe_log ( mixed $log, string $type, array $headers, integer $i, resource $connection ) : mixed | ||
$log | mixed | Should override to string in method. Defaults to boolean false. |
$type | string | Type of error message |
$headers | array | The email headers |
$i | integer | The message number from the inbox loop |
$connection | resource | The current IMAP connection. Chances are you probably don't have to do anything with this! |
Результат | mixed | $log |
abstract public post ( boolean $retval, array $data, array $params ) : array | object | ||
$retval | boolean | Defeults to boolean true. |
$data | array | The data from the parsing. Includes email content, user ID, subject. |
$params | array | Holds an array of params used by RBE. Also holds the params registered in the bootstrap() method. |
Результат | array | object | On success, return an array of the posted ID recommended. On failure, return a WP_Error object. |
public register_params ( array $params ) : array | ||
$params | array | Whitelisted parameters used by RBE for the querystring |
Результат | array | $params |
protected setup_hooks ( ) |
protected array $data | ||
Результат | array |