\OntologyWrapper\traitsEntityEmail

Entity e-mail trait

This trait implements a method for managing the entity electronic mail address offset, {@link kTAG_ENTITY_EMAIL}. The method manages the individual e-mail addresses by type.

Summary

Methods
Properties
Constants
EntityEmail()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

EntityEmail()

EntityEmail(string $theType, mixed $theValue, boolean $getOld) : mixed

Manage e-mail address

This method can be used to add, retrieve and delete individual e-mail addresses by type, while managing all the mails as a whole can be done using the {@link kTAG_ENTITY_EMAIL} offset.

The method expects the following parameters:

  • $theType: This parameter holds the type of the e-mail address we want to manage. If NULL, it means that there is an address without a type; this can occur if the address is the default one.
  • $theValue: This parameter identifies the e-mail address or operation:
    • NULL: Return the address of the provided type.
    • FALSE: Delete the address of the provided type.
    • other: Any other value is cast to string and interpreted as the e-mail address of provided type which will be inserted, or that will replace an existing entry.
  • $getOld: Determines what the method will return:
    • TRUE: Return the value before it was eventually modified.
    • FALSE: Return the value after it was eventually modified.

The method will return either the e-mail, or NULL if the type was not matched.

Parameters

string $theType

E-mail address type.

mixed $theValue

E-mail address or operation.

boolean $getOld

TRUE get old value.

Returns

mixed —

Old or new value.