EntityMail()
EntityMail(string $theType, mixed $theValue, boolean $getOld) : mixed
Manage mailing address
This method can be used to add, retrieve and delete individual mailing addresses by type, while managing all the mails as a whole can be done using the {@link kTAG_ENTITY_MAIL} offset.
The method expects the following parameters:
- $theType: This parameter holds the type of the mailing 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 mailing 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 mailing 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 address text, or NULL if the type was not matched.
Parameters
string | $theType | Mailing address type. |
mixed | $theValue | Mailing address or operation. |
boolean | $getOld | TRUE get old value. |
Returns
mixed —Old or new value.