SendMailService
in package
Uses
TArrayTools, TStringTools
Table of Contents
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $configService : ConfigService
- $defaults : Defaults
- $hasher : IHasher
- $l10n : IL10N
- $mailer : IMailer
- __construct() : mixed
- SendMailService constructor.
- generateMail() : void
- generateRandomSentence() : string
- generateRandomWord() : string
- getDateDiff() : string
- getPassword() : array<string|int, mixed>
- humanReadable() : string
- typeOf() : string
- validKey() : bool
- cleanArray() : mixed
- commonPart() : string
- cut() : string
- extractArray() : mixed
- feedStringWithParams() : string
- get() : string
- getArray() : array<string|int, mixed>
- getBool() : bool
- getFloat() : float
- getInt() : int
- getList() : array<string|int, mixed>
- getObj() : mixed
- isUuid() : bool
- mustContains() : mixed
- token() : string
- uuid() : string
- Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
- fillMailExistingShares() : mixed
- generateMailExitingShares() : IEMailTemplate
- sendMailExistingShares() : mixed
- sendMailPassword() : void
Properties
$TYPE_ARRAY
public
static mixed
$TYPE_ARRAY
= 'Array'
$TYPE_BOOLEAN
public
static mixed
$TYPE_BOOLEAN
= 'Boolean'
$TYPE_INTEGER
public
static mixed
$TYPE_INTEGER
= 'Integer'
$TYPE_NULL
public
static mixed
$TYPE_NULL
= 'Null'
$TYPE_SERIALIZABLE
public
static mixed
$TYPE_SERIALIZABLE
= 'Serializable'
$TYPE_STRING
public
static mixed
$TYPE_STRING
= 'String'
$configService
private
ConfigService
$configService
$defaults
private
Defaults
$defaults
$hasher
private
IHasher
$hasher
$l10n
private
IL10N
$l10n
$mailer
private
IMailer
$mailer
Methods
__construct()
SendMailService constructor.
public
__construct(IL10N $l10n, IHasher $hasher, IMailer $mailer, Defaults $defaults, ConfigService $configService) : mixed
Parameters
- $l10n : IL10N
- $hasher : IHasher
- $mailer : IMailer
- $defaults : Defaults
- $configService : ConfigService
Return values
mixed —generateMail()
public
generateMail(string $author, Circle $circle, Member $member, array<string|int, ShareWrapper> $shares, array<string|int, mixed> $mails[, string $password = '' ]) : void
Parameters
- $author : string
- $circle : Circle
- $member : Member
- $shares : array<string|int, ShareWrapper>
- $mails : array<string|int, mixed>
- $password : string = ''
Return values
void —generateRandomSentence()
public
generateRandomSentence([int $words = 5 ]) : string
Parameters
- $words : int = 5
Return values
string —generateRandomWord()
public
generateRandomWord([int $length = 8 ]) : string
Parameters
- $length : int = 8
Return values
string —getDateDiff()
public
getDateDiff(int $first, int $second[, bool $short = false ][, array<string|int, mixed> $words = [] ]) : string
Parameters
- $first : int
- $second : int
- $short : bool = false
- $words : array<string|int, mixed> = []
Tags
Return values
string —getPassword()
public
getPassword(Circle $circle) : array<string|int, mixed>
Parameters
- $circle : Circle
Return values
array<string|int, mixed> —humanReadable()
public
humanReadable(int $bytes) : string
Parameters
- $bytes : int
Return values
string —typeOf()
public
typeOf(string $key, array<string|int, mixed> $arr[, bool $root = true ]) : string
Parameters
- $key : string
- $arr : array<string|int, mixed>
- $root : bool = true
Tags
Return values
string —validKey()
public
validKey(string $k, array<string|int, mixed> $arr) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
Return values
bool —cleanArray()
protected
cleanArray(array<string|int, mixed> &$arr) : mixed
Parameters
- $arr : array<string|int, mixed>
Return values
mixed —commonPart()
protected
commonPart(string $str1, string $str2[, bool $cs = true ]) : string
Parameters
- $str1 : string
- $str2 : string
- $cs : bool = true
-
case sensitive ?
Return values
string —cut()
protected
cut(string $line, int $length) : string
Parameters
- $line : string
- $length : int
Return values
string —extractArray()
protected
extractArray(string $k, string $value, array<string|int, mixed> $list) : mixed
Parameters
- $k : string
- $value : string
- $list : array<string|int, mixed>
Tags
Return values
mixed —feedStringWithParams()
protected
feedStringWithParams(string $line, array<string|int, mixed> $params) : string
Parameters
- $line : string
- $params : array<string|int, mixed>
Return values
string —get()
protected
get(string $k, array<string|int, mixed> $arr[, string $default = '' ]) : string
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : string = ''
Return values
string —getArray()
protected
getArray(string $k, array<string|int, mixed> $arr[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getBool()
protected
getBool(string $k, array<string|int, mixed> $arr[, bool $default = false ]) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : bool = false
Return values
bool —getFloat()
protected
getFloat(string $k, array<string|int, mixed> $arr, float $default) : float
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : float
Return values
float —getInt()
protected
getInt(string $k, array<string|int, mixed> $arr, int $default) : int
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : int
Return values
int —getList()
protected
getList(string $k, array<string|int, mixed> $arr, array<string|int, mixed> $import[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $import : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getObj()
protected
getObj(string $k, array<string|int, mixed> $arr[, JsonSerializable|null $default = null ]) : mixed
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : JsonSerializable|null = null
Return values
mixed —isUuid()
protected
isUuid(string $uuid) : bool
Parameters
- $uuid : string
Return values
bool —mustContains()
protected
mustContains(array<string|int, mixed> $keys, array<string|int, mixed> $arr) : mixed
Parameters
- $keys : array<string|int, mixed>
- $arr : array<string|int, mixed>
Tags
Return values
mixed —token()
protected
token([int $length = 15 ]) : string
Parameters
- $length : int = 15
Return values
string —uuid()
Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
protected
uuid(int $length) : string
Parameters
- $length : int
Return values
string —fillMailExistingShares()
private
fillMailExistingShares(IEMailTemplate $emailTemplate, array<string|int, mixed> $links) : mixed
Parameters
- $emailTemplate : IEMailTemplate
- $links : array<string|int, mixed>
Return values
mixed —generateMailExitingShares()
private
generateMailExitingShares(string $author, string $circleName[, bool $multiple = false ]) : IEMailTemplate
Parameters
- $author : string
- $circleName : string
- $multiple : bool = false
Return values
IEMailTemplate —sendMailExistingShares()
private
sendMailExistingShares(IEMailTemplate $emailTemplate, string $author, string $recipient[, bool $multiple = false ]) : mixed
Parameters
- $emailTemplate : IEMailTemplate
- $author : string
- $recipient : string
- $multiple : bool = false
Tags
Return values
mixed —sendMailPassword()
private
sendMailPassword(Circle $circle, string $author, string $email, string $password) : void
Parameters
- $circle : Circle
- $author : string
- $email : string
- $password : string