Jinya CMS

FormMessageHandler
in package

The form message handler, handles the data from form posts and sends the mail to the configured to address

Tags

Table of Contents

$engine  : Engine
__construct()  : mixed
FormMessageHandler constructor.
handleFormPost()  : void
Handles the form post and creates
isSpam()  : bool
Checks if the provided value is inside the spam keyword list
renderTemplate()  : string
Renders the messaging template and returns the string

Properties

Methods

__construct()

FormMessageHandler constructor.

public __construct() : mixed
Tags
Return values
mixed

handleFormPost()

Handles the form post and creates

public handleFormPost(Form $form, array<int, string|bool> $body, ServerRequestInterface $request) : void
Parameters
$form : Form
$body : array<int, string|bool>
$request : ServerRequestInterface
Tags
throws
Exception
throws
Throwable
Return values
void

isSpam()

Checks if the provided value is inside the spam keyword list

public isSpam(string $value, array<string|int, string> $spamValues) : bool
Parameters
$value : string
$spamValues : array<string|int, string>
Tags
Return values
bool

renderTemplate()

Renders the messaging template and returns the string

public renderTemplate(array<string, mixed> $data, string $title) : string
Parameters
$data : array<string, mixed>
$title : string
Tags
throws
Throwable
Return values
string

Search results