\OntologyWrapper\traitsTerms

Terms trait

This trait implements a method for managing the terms list offset, {@link kTAG_TERMS}. The method allows the management of the elements of the list.

Summary

Methods
Properties
Constants
TermPush()
TermPop()
TermCount()
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

TermPush()

TermPush(mixed $theTerm) : integer

Add to terms path

This method can be used to append elements to the object's terms path, it will add the provided element to the end of the path.

If you provide a {@link Term} as the parameter, the method will {@link reference()} it.

The method will return the number of elements in the path.

Parameters

mixed $theTerm

Term reference or object.

Returns

integer —

Number of elements in path.

TermPop()

TermPop() : string

Pop terms from path

This method can be used to pop elements off the end of the object's terms path, it will remove the last element in the sequence.

When you remove the last element of the path, the method will also remove the offset.

The method will return the removed element; if the path is empty, the method will return NULL.

Returns

string —

Removed element or NULL.

TermCount()

TermCount() : integer

Count terms path elements

This method will return the number of elements in the object's terms path.

Returns

integer —

Number of elements in terms path.