Mail extends AjaxAbstract Uses Delete, Inbox, Read, Send, Write
Use this class to add a basic function to your Jaxon request.
Check if user have a session.
Table of Contents
- TEXT_DOMAIN = 'jaxon_mail'
- $repositoryAcct : mixed
- $repositoryMail : mixed
- $templateMail : mixed
- deleteBulkMail() : Response
- Delete mail in bulk by ID.
- deleteMail() : Response
- Delete mail by ID.
- getTextDomain() : string
- Get text domain.
- inbox() : Response
- Inbox of character.
- read() : Response
- Read message.
- reply() : Response
- Reply to a message.
- send() : Response
- Send message.
- status() : Response
- Check status of inbox.
- unread() : Response
- Mark message as unread.
- write() : mixed
- Write message for a user.
- checkLoggedIn() : true|Response
- Return true or empty Jaxon\Response\Response.
- checkLoggedInRedirect() : true|Redirect
- Return true or redirect to home.php page.
- getAcctRepository() : AccountsRepository
- Get repository of Characters entity.
- getParams() : array<string|int, mixed>
- Get default params.
- getRepository() : MailRepository
- Get repository of Mail entity.
- getTemplate() : mixed
- Get template block for Mail.
- composer() : mixed
- sanitize() : string
- Filter a string.
Constants
TEXT_DOMAIN
public
mixed
TEXT_DOMAIN
= 'jaxon_mail'
Properties
$repositoryAcct
protected
mixed
$repositoryAcct
$repositoryMail
protected
mixed
$repositoryMail
$templateMail
protected
mixed
$templateMail
Methods
deleteBulkMail()
Delete mail in bulk by ID.
public
deleteBulkMail(array<string|int, mixed> $post) : Response
Parameters
- $post : array<string|int, mixed>
Return values
Response —deleteMail()
Delete mail by ID.
public
deleteMail(int $mailId) : Response
Parameters
- $mailId : int
Return values
Response —getTextDomain()
Get text domain.
public
getTextDomain() : string
Return values
string —inbox()
Inbox of character.
public
inbox([string|null $sortOrder = 'date' ][, int|null $sortDirection = null ]) : Response
Parameters
- $sortOrder : string|null = 'date'
- $sortDirection : int|null = null
Return values
Response —read()
Read message.
public
read(int|null $id) : Response
Parameters
- $id : int|null
Return values
Response —reply()
Reply to a message.
public
reply(int|null $reply) : Response
Parameters
- $reply : int|null
Return values
Response —send()
Send message.
public
send(array<string|int, mixed> $post) : Response
Parameters
- $post : array<string|int, mixed>
Return values
Response —status()
Check status of inbox.
public
status() : Response
Return values
Response —unread()
Mark message as unread.
public
unread(int|null $id) : Response
Parameters
- $id : int|null
Return values
Response —write()
Write message for a user.
public
write([int|null $toPlayer = null ]) : mixed
Parameters
- $toPlayer : int|null = null
Return values
mixed —checkLoggedIn()
Return true or empty Jaxon\Response\Response.
protected
checkLoggedIn() : true|Response
Return values
true|Response —checkLoggedInRedirect()
Return true or redirect to home.php page.
protected
checkLoggedInRedirect() : true|Redirect
Return values
true|Redirect —getAcctRepository()
Get repository of Characters entity.
protected
getAcctRepository() : AccountsRepository
Return values
AccountsRepository —getParams()
Get default params.
protected
getParams() : array<string|int, mixed>
Return values
array<string|int, mixed> —getRepository()
Get repository of Mail entity.
protected
getRepository() : MailRepository
Return values
MailRepository —getTemplate()
Get template block for Mail.
protected
getTemplate() : mixed
Return values
mixed —composer()
private
composer(mixed &$params, mixed &$response) : mixed
Parameters
- $params : mixed
- $response : mixed
Return values
mixed —sanitize()
Filter a string.
private
sanitize(string $string, bool $isSubject) : string
Parameters
- $string : string
- $isSubject : bool