EntityPhone()
EntityPhone(string $theType, mixed $theValue, boolean $getOld) : mixed
Manage telephone number
This method can be used to add, retrieve and delete individual telephone numbers by type, while managing all the telephones as a whole can be done using the {@link kTAG_ENTITY_PHONE} offset.
The method expects the following parameters:
- $theType: This parameter holds the type of the telephone number we want to manage. If NULL, it means that there is a phone without a type; this can occur if the telephone is the default one.
- $theValue: This parameter identifies the telephone number or operation:
- NULL: Return the phone of the provided type.
- FALSE: Delete the phone of the provided type.
- other: Any other value is cast to string and interpreted as the telephone number 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 phone number, or NULL if the type was not matched.
Parameters
string | $theType | Telephone number type. |
mixed | $theValue | Telephone number or operation. |
boolean | $getOld | TRUE get old value. |
Returns
mixed —Old or new value.