Handymail_Template

Handymail - Template class.

Organises filtered and validated form inputs into an email template ready for sending.

package

HandyMail

author

I.G Laghidze developer@firewind.co.uk

Methods

Assigns values to the $title and $inputs properties upon instantiation of the Handymail_Template object.

__construct(string $title, array $inputs) : null

Arguments

$title

string

The form title.

$inputs

array

The processed form submissions, organised into their respective fieldsets.

Response

null

Creates a plain text version of the email body which is made from Handymail_Template->render()

altbody() : string

Response

string

Plain text structure of the field submissions with linebreaks.

Inserts the processed form submissions into an email template.

render(string $template_name = "default.php") : string

Arguments

$template_name

string

The filename for the template to use. Must exist within the /templates directory. By default, it is set to default.php

Response

string

Either the parsed template HTML or an error message.

Properties

The email title, used in the template.

title : string
var
access

private

Type(s)

string

The processed field submissions.

inputs : array
var
access

private

Type(s)

array