Abstract class describing Inbound Message Handlers.
Copyright: | 2014 Andrew Nicols |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 306 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
handler:: (12 methods):
__get()
set_id()
set_component()
can_change_validateaddress()
set_validateaddress()
can_change_defaultexpiration()
can_change_enabled()
set_enabled()
set_defaultexpiration()
get_classname()
get_success_message()
remove_quoted_text()
__get($key) X-Ref |
Magic getter to fetch the specified key. param: string $key The name of the key to retrieve |
set_id($id) X-Ref |
Set the id name. param: int $id The id to set return: int The newly set id |
set_component($component) X-Ref |
Set the component name. param: string $component The component to set return: string The newly set component |
can_change_validateaddress() X-Ref |
Whether the current handler allows changes to the address validation setting. By default this will return true, but for some handlers it may be necessary to disallow such changes. return: boolean |
set_validateaddress($validateaddress) X-Ref |
Set whether validation of the address is required. param: bool $validateaddress The new state of validateaddress return: bool |
can_change_defaultexpiration() X-Ref |
Whether the current handler allows changes to expiry of the generated email address. By default this will return true, but for some handlers it may be necessary to disallow such changes. return: boolean |
can_change_enabled() X-Ref |
Whether this handler can be disabled (or enabled). By default this will return true, but for some handlers it may be necessary to disallow such changes. For example, a core handler to handle rejected mail validation should not be disabled. return: boolean |
set_enabled($enabled) X-Ref |
Set the enabled name. param: bool $enabled The new state of enabled return: bool |
set_defaultexpiration($period) X-Ref |
Set the default validity for new keys. param: int $period The time in seconds before a key expires return: int |
get_classname() X-Ref |
Get the non-namespaced name of the current class. return: string The classname |
get_success_message(\stdClass $messagedata, $handlerresult) X-Ref |
Return the content of any success notification to be sent. Both an HTML and Plain Text variant must be provided. If this handler does not need to send a success notification, then it should return a falsey value. param: \stdClass $messagedata The message data. param: \stdClass $handlerresult The record for the newly created post. return: \stdClass with keys `html` and `plain`. |
remove_quoted_text($messagedata) X-Ref |
Remove quoted message string from the text (NOT HTML) message. param: \stdClass $messagedata The Inbound Message record return: array message and message format to use. |