\OntologyWrapper\traitsAccessorProperty

Property accessor trait

The main purpose of this trait is to provide a standard interface to set, retrieve and reset data members. The idea is to provide a common framework to member accessor methods by sharing standards.

This trait implements the following protected methods:

  • {@link manageProperty()}: This method provides a standard interface to set, retrieve and reset data members.

Summary

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

Methods

manageProperty()

manageProperty(\OntologyWrapper\traits\reference $theMember, mixed $theValue, boolean $getOld) : mixed

<h4>Manage a property</h4>

This library implements a standard interface for managing object properties using accessor methods, this method implements this interface:

  • &$theMember: Reference to the property being managed.
  • $theValue: The property value or operation:
    • NULL: Return the current property value.
    • FALSE: Reset the property to NULL, the default value.
    • other: Any other type represents the new value of the property.
  • $getOld: Determines what the method will return:
    • TRUE: Return the value of the property before it was eventually modified.
    • FALSE: Return the value of the property after it was eventually modified.

Parameters

\OntologyWrapper\traits\reference $theMember

Reference to the data member.

mixed $theValue

Value or operation.

boolean $getOld

TRUE get old value.

Returns

mixed —

Old or new property value.