\OntologyWrapper\traitsEntityLink

Entity link trait

This trait implements a method for managing the entity internet address offset, {@link kTAG_ENTITY_LINK}. The method manages the individual internet addresses by type.

Summary

Methods
Properties
Constants
EntityLink()
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

EntityLink()

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

Manage internet address

This method can be used to add, retrieve and delete individual internet addresses by type, while managing all the URLs as a whole can be done using the {@link kTAG_ENTITY_LINK} offset.

The method expects the following parameters:

  • $theType: This parameter holds the type of the internet 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 internet 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 internet 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 URL, or NULL if the type was not matched.

Parameters

string $theType

Internet address type.

mixed $theValue

Internet address or operation.

boolean $getOld

TRUE get old value.

Returns

mixed —

Old or new value.