Documentation

RequiredFields extends AutoService uses IsActiveTrait

Class RequiredFields

Table of Contents

Properties

$active  : bool
$fields  : array<string|int, mixed>

Methods

__construct()  : mixed
RequiredFields constructor.
factory()  : RequiredFields
getFields()  : array<string|int, mixed>
Get the list of required fields.
isActive()  : bool
onCheckSendable()  : mixed
Check for required fields.
setActive()  : $this
setFields()  : RequiredFields
Set the list of required fields.
hasAny()  : bool
Determine if $object has any of the given properties.

Properties

$fields

private array<string|int, mixed> $fields

Ex: array('subject', 'from_name', '(body_html|body_text)').

Methods

__construct()

RequiredFields constructor.

public __construct(array<string|int, mixed> $fields) : mixed
Parameters
$fields : array<string|int, mixed>

getFields()

Get the list of required fields.

public getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

Ex: array('subject', 'from_name', '(body_html|body_text)').

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setFields()

Set the list of required fields.

public setFields(array<string|int, mixed> $fields) : RequiredFields
Parameters
$fields : array<string|int, mixed>

Ex: array('subject', 'from_name', '(body_html|body_text)').

Return values
RequiredFields

hasAny()

Determine if $object has any of the given properties.

protected hasAny(mixed $object, array<string|int, mixed> $alternatives) : bool
Parameters
$object : mixed
$alternatives : array<string|int, mixed>
Return values
bool

        
On this page

Search results