\hhu\z\apisMailApi

MailApi-implementation.

This class runs and renders e‑mail text and subject.

Summary

Methods
Properties
Constants
__construct()
run()
render()
setLinker()
setHTML()
setMessage()
setParams()
getSubject()
No public properties found
No constants found
log()
$request
$response
$log
N/A
loadToplevelAgent()
addParams()
$toplevelAgent
N/A

Properties

Methods

__construct()

__construct() 

Construct a new MailApi.

run()

run() : \Exception

Run mailtext generation.

This method runs the generation of mailtext.

Returns

\Exception —

Occured exception or null

render()

render() : string

Render output.

Returns

string —

Rendered output

setLinker()

setLinker(\nre\core\Linker  $linker) 

Set linker instance for creating links.

Parameters

\nre\core\Linker $linker

Linker instance for creating links

setHTML()

setHTML(boolean  $html = true) 

Use a ToplevelAgent for HTML-mail

Parameters

boolean $html

Whether to use HTML or not

setMessage()

setMessage(string  $messageAgent) 

Set the Action for the message to render.

Parameters

string $messageAgent

Agent to handle the message

setParams()

setParams(array  $params) 

Set additional params to pass to the Action.

Parameters

array $params

Additional params to set

getSubject()

getSubject() : string

Return the subject set by the Controller.

Returns

string —

Subject set by Controller

log()

log(\Exception  $exception, integer  $logMode) 

Log an exception

Parameters

\Exception $exception

Occurred exception

integer $logMode

Log-mode

loadToplevelAgent()

loadToplevelAgent() 

Load the ToplevelAgent specified by the request.

Throws

\nre\exceptions\ServiceUnavailableException
\nre\exceptions\AgentNotValidException
\nre\exceptions\AgentNotFoundException

addParams()

addParams(array  $params) 

Add multiple request params.

Parameters

array $params

Request params to add