kDEFAULT_DOMAIN
kDEFAULT_DOMAIN
Default domain.
This constant holds the default domain of the object.
Collecting mission object
This class is derived from the {@link UnitObject} class, it implements a collecting mission which contains summary data regarding a series of collecting events.
The inherited attributes have the following function:
The object can be considered initialised when it has all the above properties.
$mDictionary : \OntologyWrapper\Dictionary
Dictionary.
This protected data member holds the data dictionary reference.
DefaultOffsets() : array
Return default offsets
This method will return the list of default offsets for the current class, these are the properties known to be part of the current class: since objects may feature any defined tag, this selection provides an indication of which properties one could expect.
This selection can also be used as the minimum set of properties which an object may feature.
In this class we return an empty array.
List of default offsets.
getName(string $theLanguage) : string
Get object name
This method should return the object name, this value represents a name or label that characterises the current object.
Derived classes must overload this method.
string | $theLanguage | Name language. |
Object name.
__construct(mixed $theContainer, mixed $theIdentifier, boolean $doAssert)
Instantiate class.
Objects derived from this class share the same constructor prototype and should not overload this method.
The method accepts three parameters:
The workflow is as follows:
Any other combination will raise an exception.
This constructor sets the {@link isCommitted()} flag, derived classes should first call the parent constructor, then they should set the {@link isInited()} flag.
mixed | $theContainer | Data wrapper or properties. |
mixed | $theIdentifier | Object identifier or properties. |
boolean | $doAssert | Raise exception if not resolved. |
setAlias(boolean $doSet)
Signal object as alias
This method can be used to set or reset the object {@link isAlias()} flag, this signals that the current object is an alias of the object referenced by the {@link kTAG_MASTER} offset value: to set the status pass TRUE in the parameter and FALSE to reset it.
This method should only be called on non committed objects, once set, this status is immutable, so in that case the method will raise an exception.
When resetting the status, the method will also remove the eventual {@link kTAG_MASTER} attribute.
Note that not any object can be set as alias: objects that can take this state must feature a method that selects their master object, so you should shadow this method in derived classes that do not implement the concept of master and alias.
boolean | $doSet | TRUE to set. |
ResolveDatabase(\OntologyWrapper\Wrapper $theWrapper, boolean $doAssert, boolean $doOpen) : \OntologyWrapper\DatabaseObject
Resolve the database
This method should return a {@link DatabaseObject} instance corresponding to the default database of the current class extracted from the provided {@link Wrapper} instance.
Since we cannot declare this method abstract, we raise an exception.
\OntologyWrapper\Wrapper | $theWrapper | Wrapper. |
boolean | $doAssert | Raise exception if unable. |
boolean | $doOpen | TRUE open connection. |
Database or NULL.
GetClimateData(\OntologyWrapper\Wrapper $theWrapper, mixed $theShape, array $theRange, int $theDistance) : array
<h4>Retrieve climatic data</h4>
This method will retrieve the climatic data for the provided parameters:
The method will return an array containing the list of all climate variables, no elements are nested.
The provided shape format is expected to follow the GeoJson standard.
If the climate data was not found, the method will return an empty array.
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
mixed | $theShape | Site shape. |
array | $theRange | Elevation range. |
int | $theDistance | Coordinate uncertainty. |
CreateIndexes(\OntologyWrapper\DatabaseObject $theDatabase) : \OntologyWrapper\CollectionObject
Create indexes
This method will create the default indexes for the current class.
In this class we index the following offsets:
\OntologyWrapper\DatabaseObject | $theDatabase | Database reference. |
The collection.
UnmanagedOffsets() : array
Return unmanaged offsets
This method will return the list of offsets which should be excluded from the offset management framework.
By default we include offsets returned by:
Note that internal offsets, {@link InternalOffsets()}, are also not managed, but since those offsets do not have a sequence number, we need to treat them separately.
Derived classes may overload this method to add custom offsets.
List of unmanaged offsets.
insert(\OntologyWrapper\Wrapper $theWrapper, \OntologyWrapper\bitfield $theOptions) : mixed
Insert the object
This method will insert the current object into the provided persistent store only if it doesn't exist already:
The $theOptions field can be used to enable or disable related objects updates.
The method will return the inserted object native identifier or NULL if the the object was not inserted.
Do not overload this method, you should overload the methods called in this method.
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
\OntologyWrapper\bitfield | $theOptions | Operation options. |
The object's native identifier or NULL.
commit(\OntologyWrapper\Wrapper $theWrapper, \OntologyWrapper\bitfield $theOptions) : mixed
Commit the object
This method will insert or update the current object into the provided persistent store, the method expects a single parameter representing the wrapper, this can be omitted if the object was instantiated with a wrapper.
The method will call the {@link commitObject()} method if the object was not committed and the {@link updateObject()} method if it was.
The $doRelated parameter can be used to prevent the object from updating related objects. This can be useful when adding objects as batches: in that case it may be much faster to first add the objects and then at a later stage update them.
Do not overload this method, you should overload the methods called in this method.
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
\OntologyWrapper\bitfield | $theOptions | Operation options. |
The object's native identifier.
export(string $theFormat, mixed $theContainer, \OntologyWrapper\Wrapper $theWrapper) : mixed
Export the object
This method will export the object in the provided format using the provided options.
The method expects the following parameters:
The exported object is to be assumed a new object, this means that you should only use this method if the exported objects are to be inserted.
string | $theFormat | Dump format. |
mixed | $theContainer | Dump container. |
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
The exported object.
getMaster(\OntologyWrapper\Wrapper $theWrapper) : \OntologyWrapper\PersistentObject
Get master object
This method will return the master object, if the current object is already a master, the method will return it; if the master cannot be located, the method will raise an exception.
The first parameter is the wrapper in which the current object is, or will be, stored: if the current object has the {@link dictionary()}, this parameter may be omitted; if the wrapper cannot be resolved, the method will raise an exception.
This method assumes that the {@link kTAG_MASTER} property is correctly set, if that is not the case, the method will return the current object, which may not be what you want.
Note that this method should only be called on objects that are {@link isCommitted()}, if that is not the case, the method will raise an exception.
\OntologyWrapper\Wrapper | $theWrapper | Wrapper. |
Master node.
validate(boolean $doText)
Validate object
This method will validate the object by:
The object is expected to have its dictionary set.
If any error occurs, the method will raise an exception.
boolean | $doText | TRUE load full text tags. |
Delete(\OntologyWrapper\Wrapper $theWrapper, mixed $theIdentifier) : mixed
Delete an object
This method will delete the object corresponding to the provided native identifier.
Deleting objects is a static matter, since, in order to ensure referential integrity, it is necessary to traverse an object which is a mirror of the persistent image. The methods which actually delete the object are declared protected, so that it should not be easy to delete an incomplete object.
This method should be called using the base class of the object one wants to delete, this means that either you know the class, or you may call this method from the object that you want to delete.
The method expects the following parameters:
The method will first load the object from the persistent store and then it will call its protected {@link deleteObject()} method, returning:
When loading the object only the {@link kTAG_NID}, {@link kTAG_OBJECT_OFFSETS} and {@link kTAG_OBJECT_REFERENCES} will be loaded, since these are the offsets that contain the necessary information for maintaining referential integrity, if you need to handle other object offsets, you should overload the static {@link DeleteFieldsSelection()} method.
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
mixed | $theIdentifier | Object native identifier. |
Identifier, NULL or FALSE.
Import(\OntologyWrapper\Wrapper $theWrapper, mixed $theContainer) : \OntologyWrapper\PersistentObject
Import
This method can be used to instantiate an object from an export container, the method expects the data wrapper and the export container.
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
mixed | $theContainer | Export container. |
The imported object.
ImportXML(\OntologyWrapper\Wrapper $theWrapper, \OntologyWrapper\SimpleXMLElement $theContainer) : array
Import
This method will instantiate an object from the provided XML container.
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
\OntologyWrapper\SimpleXMLElement | $theContainer | Export container. |
List of imported objects.
CreateIndex(\OntologyWrapper\Wrapper $theWrapper, string $theOffset, boolean $doBackground) : array
Create index
This method will create an index, for the provided tag, on all used offsets in the current object's collection.
This method should be used when a tag is to be indexed in a collection: call this static method using the desired class.
The method expects as paraneters the database and the tag's sequence number or native identifier.
If the method is unable to resolve the provided tag, it will raise an exception.
The method will return the list of indexed offsets.
\OntologyWrapper\Wrapper | $theWrapper | Wrapper. |
string | $theOffset | Tag offset. |
boolean | $doBackground | Background creation. |
List of indexed offsets.
DeleteFieldsSelection() : array
Return delete fields selection
This method should return the fields selection used to load the object to be deleted. By default we load the {@link kTAG_NID}, {@link kTAG_OBJECT_OFFSETS} and {@link kTAG_OBJECT_REFERENCES} properties, derived classes may overload this method to add other offsets.
Delete object fields selection.
ResolveCollection(\OntologyWrapper\DatabaseObject $theDatabase, boolean $doOpen) : \OntologyWrapper\CollectionObject
Resolve the collection
This method should return a {@link CollectionObject} instance corresponding to the persistent store in which the current object was either read or will be inserted.
The method expects the object to feature a constant, {@link kSEQ_NAME}, which serves the double purpose of providing the default collection name and the eventual sequence number index: the method will use this constant and the provided database reference to return the default {@link CollectionObject} instance.
\OntologyWrapper\DatabaseObject | $theDatabase | Database reference. |
boolean | $doOpen | TRUE open connection. |
Collection or NULL.
ResolveCollectionByName(\OntologyWrapper\Wrapper $theWrapper, string $theCollection) : \OntologyWrapper\CollectionObject
Resolve collection by name
Given a wrapper and a collection name, this method will return a collection reference.
If the wrapper is not connected, or if the collection could not be resolved, the method will raise an exception.
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
string | $theCollection | Collection name. |
The collection reference.
ResolveRefCountTag(string $theCollection) : integer
Resolve reference count tag
Given a collection name, this method will return the tag sequence number corresponding to the offset holding the number of objects, stored in the provided collection reference, that reference the current object.
If the tag could not be resolved, the method will raise an exception.
string | $theCollection | Collection name. |
Tag sequence number.
ResolveOffsetsTag(string $theCollection) : integer
Resolve offsets tag
Given a collection name, this method will return the tag sequence number corresponding to the tag object offset holding the set of offsets in which the tag was used by objects stored in the provided collection.
If the tag could not be resolved, the method will raise an exception.
string | $theCollection | Collection name. |
Tag sequence number.
ExternalOffsets() : array
Return external offsets
This method will return the list of external offsets for the current class. These are offsets which are managed neither by clients nor by the object itself, these will generally be managed by events triggered by other objects.
These offsets:
In this class we return an empty array.
List of external offsets.
DynamicOffsets() : array
Return dynamic offsets
This method will return the list of dynamic offsets for the current class. These are offsets which are managed by the object itself, and should not be modified by clients.
These offsets:
In this class we return an empty array.
List of dynamic offsets.
OffsetTypes(\OntologyWrapper\DictionaryObject $theDictionary, mixed $theOffset, string $theType, array $theKind, mixed $theMin, mixed $theMax, string $thePattern, boolean $doAssert) : mixed
Resolve offset types
This method will resolve the provided offset into a {@link Tag} object and return in the provided reference parameters the data type, kind, range and pattern; this is done by using the provided {@link Dictionary} object.
The method expects the following parameters:
If the provided offset is numeric, the method will assume it is a tag sequence number, if not, the method will resolve it into a tag sequence number; if this fails and the last paraneter is TRUE, the method will raise an exception.
The method will return TRUE if the types were resolved and NULL if not.
\OntologyWrapper\DictionaryObject | $theDictionary | Data dictionary. |
mixed | $theOffset | Offset. |
string | $theType | Receives data type. |
array | $theKind | Receives data kind. |
mixed | $theMin | Receives minimum data range. |
mixed | $theMax | Receives maximum data range. |
string | $thePattern | Receives data pattern. |
boolean | $doAssert | If TRUE assert offset. |
TRUE if the tag was resolved, or NULL.
GetReferenceKey() : string
Return reference key
The reference key is the offset that will be used when storing a set of objects into a multi class matrix. By default we use the native identifier, but in some cases other required and unique identifiers may be used for this purpose.
In this class we use {@link kTAG_NID}.
Key offset.
loadTagInformation(array $theTags, array $theKind, string $theType, mixed $theMin, mixed $theMax, string $thePattern, string $thePath, string $theTag)
Load tag information
The duty of this method is to load the provided tag information into the provided array reference, the method expects the following parameters:
array | $theTags | Receives tag information. |
array | $theKind | Data kind. |
string | $theType | Data type. |
mixed | $theMin | Receives minimum data range. |
mixed | $theMax | Receives maximum data range. |
string | $thePattern | Receives data pattern. |
string | $thePath | Offset path. |
string | $theTag | Tag sequence number. |
loadReferenceInformation(mixed $theProperty, array $theRefs, string $theType, string $thePath)
Load reference information
The duty of this method is to load the provided array reference with the eventual object references, the method expects the following parameters:
mixed | $theProperty | Property. |
array | $theRefs | Receives object references. |
string | $theType | Data type. |
string | $thePath | Offset path. |
getReferenceTypeClass(string $theType) : string
Resolve object reference data type class
Given a data type, this method will return the base class name corresponding to the referenced object, or NULL if the data type is not an object reference.
If provided the {@link kTYPE_REF_SELF} data type, the method will return the base class name of the current object.
string | $theType | Data type. |
Base class name.
getReferenceTypeCollection(string $theType) : string
Retun the collection name for a reference data type
Given a data type, this method will return the collection name corresponding to the referenced object, or NULL if the data type is not an object reference.
If provided the {@link kTYPE_REF_SELF} data type, the method will return the current object's collection name.
string | $theType | Data type. |
Base class name.
getFullTextReference() : string
Retun the object full text reference
In order to generate a static URL which points to a selection it is necessary to have a value which can be selected via a full-text search: this method should return this value, which should be set just befor the object is committed.
In this class we do not use this feature, so the method will return NULL.
Full text search reference.
dictionary(mixed $theDictionary, boolean $getOld) : \OntologyWrapper\Dictionary
Set or return data dictionary
This method can be used to set or retrieve the object's data dictionary, which is required by all derived objects to resolve offsets.
You should set this data member as soon as the object has been instantiated, before adding offsets to it.
The method expects the following parameters:
The method will raise an exception if the dictionary holds any other type except the above.
mixed | $theDictionary | New dictionary or NULL. |
boolean | $getOld | TRUE get old value. |
Object data dictionary.
reference() : mixed
Return object reference
This method will return the current object's reference. This value should uniquely identify the referenced object, making it easy to retrieve the object given this reference.
In this class, and generally in all classes, the reference of an object is its native identifier, {@link kTAG_NID}.
The method must raise an exception if the reference cannot be provided.
Object reference.
resolveOffset(string $theOffset, boolean $doAssert) : string
Resolve offset
This method will resolve the provided offset into a {@link Tag} serial number, this is done by using a {@link Dictionary} object stored in the current object's {@link $mDictionary} data member.
If you provide a string prefixed by the {@link kTOKEN_TAG_PREFIX} token, the method will simply return it.
All other types of offsets, except those returned by the {@link InternalOffsets()} method, will be used to locate the tag native identifier using a {@link Dictionary} object stored in the current object's {@link $mDictionary} data member; if the provided offset cannot be resolved, the method will raise an exception if the second parameter is TRUE, or NULL if the second parameter is FALSE.
The method will raise an exception if the tag cache is not set.
string | $theOffset | Data offset. |
boolean | $doAssert | Assert offset tag reference. |
Resolved offset.
offsetGet(mixed $theOffset) : mixed
Return a value at a given offset
We overload this method to call the preflight method: if it returns NULL we call the parent method; if not, we return the received value.
We also overload this method to handle unmatched offsets: we prevent warnings from being issued and return NULL.
mixed | $theOffset | Offset. |
Offset value or NULL.
offsetSet(string $theOffset, mixed $theValue)
Set a value at a given offset
We overload this method to call the preflight and postflight methods: if the preflight method returns NULL we call the parent method; if not, we stop.
We also overload this method to handle NULL values: in that case we delete the offset.
string | $theOffset | Offset. |
mixed | $theValue | Value to set at offset. |
offsetUnset(string $theOffset)
Reset a value at a given offset
We overload this method to call the preflight and postflight methods: if the preflight method returns NULL we call the parent method; if not, we stop.
We also overload this method to prevent warnings on unmatched offsets.
string | $theOffset | Offset. |
InternalOffsets() : array
Return internal offsets
This method will return the list of internal offsets for the current class, these offsets are not defined in the data dictionary and are private to the object. This method is used to exclude these offsets from the default offset resolution workflow.
These offsets:
In this class we return:
List of internal offsets.
SelectLanguageString(array $theStrings, string $theLanguage) : string
Return language string
This method expects the value from a property of type {@link kTYPE_LANGUAGE_STRING} or {@link kTYPE_LANGUAGE_STRINGS} and a language code, its duty is to return the string matching the language code, or the default string.
The method will perform the following steps:
array | $theStrings | Language strings property. |
string | $theLanguage | Selected language code. |
The string in the provided language.
CastShapeGeometry(\OntologyWrapper\reference $theShape)
Cast shape geometry
The duty of this method is to verify and cast the geometry of the provided shape. The method expects the shape to have a correct root structure, that is, it must have the shape type and geometry array, this method will traverse the geometry and its structure.
\OntologyWrapper\reference | $theShape | Shape. |
nestedOffsetGet(mixed $theOffset, array $theValue, mixed $theFound) : mixed
Return a value at a given nested offset
This method is the equivalent of {@link offsetGet()} for nested offsets, the method will traverse the current value until it finds the offset, if at any level an offset is not resolved, the method will return NULL.
It is assumed that all offsets except the last one must be arrays, if that is not the case, the method will return NULL.
The provided offset must be a valid nested offset, which is a sequence of numerics separated by a period; this check must have been performed by the caller.
If at any stage of the path there is a list of structures, the result will be an array of all found values.
Note that this method will only be called if the offset exists, so it must find it.
mixed | $theOffset | Offset. |
array | $theValue | Current value. |
mixed | $theFound | Found value. |
Offset value or NULL.
nestedOffsetSet(string $theOffset, mixed $theValue, string $theRootOffset, array $theRootValue, string $theCurrentOffset, array $theCurrentValue) : array
Set a value at a given offset
This method is the equivalent of {@link offsetSet()} for nested offsets, the method will traverse the current value setting eventual missing intermediate offsets as arrays; note that if the method finds another kind of value, it will overwrite it with an empty array: it is assumed that setting an offset replaces the previous contents.
The method expects the following parameters:
The method will take care of setting the the object's offset.
It is assumed that all offsets except the last one must be arrays, if that is not the case, the method will return NULL.
The provided offset must be a valid nested offset, which is a sequence of numerics separated by a period; this check must have been performed by the caller.
string | $theOffset | Offset. |
mixed | $theValue | Value to set at offset. |
string | $theRootOffset | Receives root offset. |
array | $theRootValue | Receives root value. |
string | $theCurrentOffset | Receives current offset. |
array | $theCurrentValue | Current level value. |
The updated nested structure.
nestedOffsetUnset(string $theOffset, string $theRootOffset, array $theCurrentValue)
Reset a value at a given offset
This method is the equivalent of {@link offsetUnset()} for nested offsets, the method will traverse the current value until it reaches the requested offset and it will delete it, if any offset is not matched, or if any intermediate offset is not an array, the method will do nothing.
The method expects the following parameters:
The method will take care of deleting the the object's offset. If any intermediate offset holds an empry array, the method will delete it.
It is assumed that all offsets except the last one must be arrays, if that is not the case, the method will return NULL.
The provided offset must be a valid nested offset, which is a sequence of numerics separated by a period; this check must have been performed by the caller.
string | $theOffset | Offset. |
string | $theRootOffset | Receives root offset. |
array | $theCurrentValue | Current level value. |
Object2Array(\OntologyWrapper\reference $theSource, \OntologyWrapper\reference $theDestination)
<h4>Convert object to array</h4>
This method can be used to obtain an array of arrays from a nested structure.
The method expects as the first parameter a reference to an {@link ArrayObject} or to an array, it will convert the provided parameter to an array and traverse it, converting recursively any {@link ArrayObject} instance into an array.
The method accepts the following parameters:
\OntologyWrapper\reference | $theSource | Reference to the source structure. |
\OntologyWrapper\reference | $theDestination | Reference to the destination array. |
attributesList() : array
Return object list attributes
This method should return an array with the significant attributes of the current object, this information will be used by other objects when referencing the current object.
If the object wishes not to provide information, the method should return an empty array.
In this class the method does nothing.
The list of properties.
preCommitPrepare(\OntologyWrapper\reference $theTags, \OntologyWrapper\reference $theRefs)
Prepare object before commit
This method is called by the {@link preCommit()} method, it should perform preliminary checks to ensure that the object is fit to be committed.
In this class we check if the object is {@link isInited()}, in derived classes you can overload this method to perform custom checks.
The method features the caller parameters, see the {@link preCommit()} method for a description of those parameters.
\OntologyWrapper\reference | $theTags | Object tags. |
\OntologyWrapper\reference | $theRefs | Object references. |
updateManyToOne(\OntologyWrapper\bitfield $theOptions)
Update many to one relationships
The duty of this method is to load the current object reference in the object that keeps track of it, this is the counterpart of the {@link updateOneToMany()} method.
This usually happens whan the related object holds the list of objects which point to it. This method should add or update the entry relating to the current object in the related object.
The method wxpects the wrapper of the current object to be set and expects a single parameter which holds the commit or delete operation options: the method should be called only if the {@link kFLAG_OPT_REL_ONE} flag is set, will this method perform its duty.
This method will be called after the object was committed.
By default only this method is called, since it ensures referential integrity: the relations are recursed up to the root element.
By default this method does nothing.
\OntologyWrapper\bitfield | $theOptions | Operation options. |
updateOneToMany(\OntologyWrapper\bitfield $theOptions)
Update one to many relationships
The duty of this method is to load the references of objects pointing to the current object, this is the counterpart of the {@link updateOneToMany()} method.
This usually happens whan the current object holds a list of objects, this method should select all the objects to which it points to and load them in the appropriate property.
The method wxpects the wrapper of the current object to be set and expects a single parameter which holds the commit or delete operation options: the method should be called only if the {@link kFLAG_OPT_REL_MANY} flag is set, will this method perform its duty.
This method will be called before the object's commit phase.
By default this method does nothing.
\OntologyWrapper\bitfield | $theOptions | Operation options. |
setObjectActualShape() : boolean
Set object actual shape
This method can be used to the the object {@link kTAG_GEO_SHAPE} which represents the object's real shape.
The method will return TRUE if the shape was set or found and FALSE if not.
In this class we assume the object does not have a shape, in derived classes you should only need to overload this method if the object features a shape.
TRUE if the shape was set or found.
postOffsetSet(\OntologyWrapper\reference $theOffset, \OntologyWrapper\reference $theValue)
Handle offset and value after setting it
This method can be used to manage the object after calling the {@link ArrayObject::OffsetSet()} method.
In this class we do nothing.
\OntologyWrapper\reference | $theOffset | Offset reference. |
\OntologyWrapper\reference | $theValue | Offset value reference. |
postOffsetUnset(\OntologyWrapper\reference $theOffset)
Handle offset after deleting it
This method can be used to manage the object after calling the {@link ArrayObject::OffsetUnset()} method.
In this class we do nothing.
\OntologyWrapper\reference | $theOffset | Offset reference. |
preCommitFinalise(\OntologyWrapper\reference $theTags, \OntologyWrapper\reference $theRefs)
Finalise object before commit
This method is called by the {@link preCommit()} method, it will be executed before checking if the object is ready, {@link isReady()}, its duty is to make the last preparations before the object is to be committed.
The method calls three methods:
For a description of the parameters to this method, please consult the {@link preCommit()} method documentation.
\OntologyWrapper\reference | $theTags | Object tags. |
\OntologyWrapper\reference | $theRefs | Object references. |
preCommitObjectIdentifiers()
Load object identifiers
This method is called by the {@link preCommitFinalise()} method, its duty is to compute eventual object identifiers.
In this class we do not handle identifiers, derived classes should overload this method if they need to compute identifiers.
This method should only be called if the object is not committed, since it is here that all immutable identifiers are set: in derived classes be sure to make this check.
lockedOffsets() : array
Return list of locked offsets
This method should return the list of locked offsets, that is, the offsets which cannot be modified once the object has been committed.
In this class we return the list of internal tags plus the {@link kTAG_MASTER}.
List of locked offsets.
xmlUnitElement(\OntologyWrapper\SimpleXMLElement $theRoot) : \OntologyWrapper\SimpleXMLElement
Return XML unit element
This method should return the default XML unit element as a SimpleXMLElement object.
The method expects the root element, it will add the unit element to it and return the newly created child element.
Derived concrete classes must implement this method.
\OntologyWrapper\SimpleXMLElement | $theRoot | Root container. |
XML export unit element.
setGraphProperties(array $theLabels, array $theProperties) : mixed
Compute graph labels and properties
This method should compute the current object's graph labels and properties, these should be set in the reference parameters.
The method returns the following values:
In this class we reset the labels, the default properties are set as:
Derived classes can call the parent method, then set the labels and eventual other properties.
array | $theLabels | Labels. |
array | $theProperties | Properties. |
Node identifier, TRUE or FALSE.
exportXMLObject(\OntologyWrapper\SimpleXMLElement $theContainer, \OntologyWrapper\Wrapper $theWrapper, array $theUntracked)
Export the current object in XML format
The method will return the XML representation of the object as a SimpleXMLElement object.
The method expects the following parameters:
The provided parameter represents dynamic and run-time offsets that are managed by the object's persistent framework.
The method will generate a single XML element containing the object.
\OntologyWrapper\SimpleXMLElement | $theContainer | Dump container. |
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
array | $theUntracked | List of untracked offsets. |
ClusterObjectOffsets(array $theOffsets) : array
Cluster object offsets
This method expects a list of offsets and will return the list clustered by tag: the resulting array will be indexed by tag and the value will hold all offsets featuring that tag as the leaf node.
The method will raise an exception if iot founds a nested array.
array | $theOffsets | Offsets to normalise. |
Clustered offsets
preOffsetSet(\OntologyWrapper\reference $theOffset, \OntologyWrapper\reference $theValue) : mixed
Handle offset and value before setting it
This method can be used to manage the offset before passing it to the inherited {@link ArrayObject::OffsetSet()} method.
The method provides the offset and value as references, if the method returns NULL it means that the offset and value must be passed to the inherited {@link ArrayObject::OffsetSet()}; if the method returns any other value, this means that the inherited {@link ArrayObject::OffsetSet()} should be skipped.
In this class we do nothing.
\OntologyWrapper\reference | $theOffset | Offset reference. |
\OntologyWrapper\reference | $theValue | Offset value reference. |
NULL set offset value, other, return.
preOffsetUnset(\OntologyWrapper\reference $theOffset) : mixed
Handle offset and value before deleting it
This method can be used to manage the offset before passing it to the inherited {@link ArrayObject::OffsetUnset()} method.
The method provides the offset as reference, if the method returns NULL it means that the offset and value must be passed to the inherited {@link ArrayObject::OffsetUnset()}; if the method returns any other value, this means that the inherited {@link ArrayObject::OffsetUnset()} should be skipped.
In this class we do nothing.
\OntologyWrapper\reference | $theOffset | Offset reference. |
NULL delete offset value, other, return.
insertObject(\OntologyWrapper\CollectionObject $theCollection, \OntologyWrapper\bitfield $theOptions) : mixed
Insert the object
This method will insert the current object into the provided persistent store only if not yet committed, the method will perform the following steps:
If any of the above steps fail the method must raise an exception.
Note that this method can only be called with objects that do not have native identifiers assigned by the database, oin that case all objects will appear to be new and will be inserted.
The $doRelated parameter can be used to prevent the object from updating related objects. This can be useful when adding objects as batches: in that case it may be much faster to first add the objects and then at a later stage update them.
Do not overload this method, you should overload the methods called in this method.
\OntologyWrapper\CollectionObject | $theCollection | Data collection. |
\OntologyWrapper\bitfield | $theOptions | Operation options. |
The object's native identifie or NULL.
commitObject(\OntologyWrapper\CollectionObject $theCollection, \OntologyWrapper\bitfield $theOptions) : mixed
Commit the object
This method will insert the current object into the provided persistent store, the method will perform the following steps:
If any of the above steps fail the method must raise an exception.
The $doRelated parameter can be used to prevent updating related objects.
Do not overload this method, you should overload the methods called in this method.
\OntologyWrapper\CollectionObject | $theCollection | Data collection. |
\OntologyWrapper\bitfield | $theOptions | Operation options. |
The object's native identifier.
updateObject(\OntologyWrapper\CollectionObject $theCollection, \OntologyWrapper\bitfield $theOptions) : mixed
Update the object
This method will update the current object in the provided persistent store, the method will perform the following steps:
\OntologyWrapper\CollectionObject | $theCollection | Data collection. |
\OntologyWrapper\bitfield | $theOptions | Operation options. |
The object's native identifier.
deleteObject() : mixed
Delete the object
This method will delete the current object from its persistent store, the method is declared protected, because it should not be called by clients: rather, the static {@link Delete()} method should be used for this purpose.
Deleting an object involves much more than simply removing the object from its container: all reference counts and tag offsets must be updated to maintain referential integrity, for this reason, this method should be called by an object which is {@link isCommitted()} and not {@link isDirty()}; if that is not the case, an exception will be raised.
The object only needs the {@link kTAG_NID}, {@link kTAG_OBJECT_OFFSETS} and {@link kTAG_OBJECT_REFERENCES} properties, these are the offsets loaded by the static {@link Delete()} method which calls this one; if derived classes need other properties, they should also modify the static {@link Delete()} method accordingly.
This method follows a workflow similar to the {@link commit()} method:
The method will return the object's native identifier if it was deleted; if the object is referenced, the method will return FALSE; if the object was not found in the container, the method will return NULL.
The $doRelated parameter can be used to prevent updating related objects.
You should overload the methods called in this method, not this method.
Native identifier, NULL or FALSE.
preCommit(\OntologyWrapper\reference $theTags, \OntologyWrapper\reference $theRefs)
Prepare object for commit
This method should prepare the object for being committed, the method will perform the following steps:
The method accepts two array reference parameters which will be initialised in this method, these will be filled by the {@link preCommitTraverse()} method and will be used to set the {@link kTAG_OBJECT_TAGS}, {@link kTAG_OBJECT_OFFSETS} and {@link kTAG_OBJECT_REFERENCES} properties. These arrays are structured as follows:
These parameter will be initialised in this method.
Derived classes should overload the called methods rather than the current one.
\OntologyWrapper\reference | $theTags | Object tags. |
\OntologyWrapper\reference | $theRefs | Object references. |
preCommitTraverse(\OntologyWrapper\reference $theTags, \OntologyWrapper\reference $theRefs, boolean $doValidate)
Traverse object before commit
This method is called by the {@link preCommit()} method, it will traverse the current object, fill the provided parameters and validate property values. For a description of the parameters to this method, please consult the {@link preCommit()} method documentation.
In this class we perform the following actions:
The last parameter of this method is a flag which if set will activate the validation, reference check and casting of the offsets; if not set, the method will only collect tag and reference information.
\OntologyWrapper\reference | $theTags | Object tags. |
\OntologyWrapper\reference | $theRefs | Object references. |
boolean | $doValidate | TRUE validate. |
preCommitObjectTags(array $theTags)
Load object tags
This method is called by the {@link preCommitFinalise()} method, it will collect the offset tags from the provided parameter and populate the {@link kTAG_OBJECT_TAGS} and {@link kTAG_OBJECT_OFFSETS} properties of the current object.
Note that the provided list of tags should only include leaf offset references, in other words, only properties which are not of the {@link kTYPE_STRUCT} type.
For a description of the parameters to this method, please consult the {@link preCommit()} method documentation.
array | $theTags | Object tags. |
preCommitObjectReferences(\OntologyWrapper\reference $theRefs)
Load object references
This method is called by the {@link preCommitFinalise()} method, it will collect the object references from the provided parameter and populate the {@link kTAG_OBJECT_REFERENCES} property of the current object.
For a description of the parameters to this method, please consult the {@link preCommit()} method documentation.
In this class we simply copy the parameter to the property, derived classes may overload this method to perform custom modifications and call the parent method that will set the property.
\OntologyWrapper\reference | $theRefs | Object references. |
preCommitGraphReferences(\OntologyWrapper\DatabaseGraph $theGraph) : mixed
Load object in graph
This method is called by the {@link preCommitFinalise()} method, its duty is to load the object into the eventual graph
The method will be called only if the object is not committed and if the current object's wrapper features a graph.
Derived classes should not overload this method, but rather the methods it calls; the only exception is if the object should not be stored in the graph: in that case overload the method to return FALSE.
If the method returns an integer, it means that the value represents the graph node identifier; if the method returns FALSE, it means that there will be no graph node.
\OntologyWrapper\DatabaseGraph | $theGraph | Graph connection. |
The node identifier or FALSE.
postInsert(array $theOffsets, array $theReferences, \OntologyWrapper\bitfield $theOptions)
Handle object after insert
This method is called immediately after the object was inserted, its duty is to update object and tag reference counts and tag offset paths, the method will perform the following steps:
The method expects the following parameters:
This method is identical to the {@link postDelete()} method, except that in this case offsets will be added and reference counts will be incremented.
array | $theOffsets | Tag offsets to be added. |
array | $theReferences | Object references to be incremented. |
\OntologyWrapper\bitfield | $theOptions | Operation options. |
postUpdate(array $theOffsets, array $theReferences, \OntologyWrapper\bitfield $theOptions)
Handle object after update
This method is called immediately after the object was updated, its duty is to update object and tag reference counts and tag offset paths, the method will perform the following steps:
The method expects the following parameters:
The provided array references are read-only.
array | $theOffsets | Original tag offsets. |
array | $theReferences | Original object references. |
\OntologyWrapper\bitfield | $theOptions | Operation options. |
preDelete() : boolean
Prepare object for delete
This method should prepare the object for being deleted, it mirrors the counterpart {@link preCommit()} method, except that it is intended for deleting objects. The following steps will be performed:
Unlike the {@link preCommit()} method, this one doesn't need to compute tag and references information, since that information is already contained in the {@link kTAG_OBJECT_OFFSETS} and {@link kTAG_OBJECT_REFERENCES} properties of the current object.
The method will return TRUE if the object can be deleted, if any of the called methods do not return TRUE, the operation will be aborted.
Derived classes should overload the called methods rather than the current one.
TRUE the object can be deleted.
preDeletePrepare() : boolean
Prepare object before delete
This method should perform a preliminary check to ensure whether the object can be deleted, the method returns a boolean value which if TRUE it indicates that it is safe to delete the object.
In this class we check whether the object is referenced, in that case the method will return FALSE.
TRUE the object can be deleted.
preDeleteTraverse() : boolean
Traverse object before delete
This method is called by the {@link preDelete()} method, in this class it does nothing; derived classes may overload it to modify the {@link kTAG_OBJECT_OFFSETS} and {@link kTAG_OBJECT_REFERENCES} properties of the current object that will be used in the post-delete phase to update referential integrity.
In this class we return by default TRUE.
TRUE the object can be deleted.
preDeleteFinalise() : boolean
Finalise object before delete
This method will be called before the object will be deleted, it is the last chance to perform custom checks or modify the parameters passed to the post-delete phase.
In this class we do nothing.
TRUE the object can be deleted.
postDelete(array $theOffsets, array $theReferences)
Handle object after delete
This method is called immediately after the object was deleted, its duty is to update object and tag reference counts and tag offset paths, the method will perform the following steps:
The method expects the following parameters:
This method is identical to the {@link postInsert()} method, except that in this case offsets will be removed and reference counts will be decremented.
In this method we call be default the {@link updateManyToOne() } method to ensure referential integrity.
array | $theOffsets | Tag offsets to be removed. |
array | $theReferences | Object references to be decremented. |
parseObject(array $theTags, array $theRefs, boolean $doValidate, boolean $doText)
Parse object
The duty of this method is to traverse the current object structure, collect tag, offset and reference information and eventually validate the object properties.
The method expects the following parameters:
array | $theTags | Receives tag information. |
array | $theRefs | Receives references information. |
boolean | $doValidate | TRUE validate. |
boolean | $doText | TRUE load full text search. |
parseStructure(array $theStructure, array $thePath, array $theTags, array $theRefs, boolean $doValidate, boolean $doText)
Parse structure
This method will parse the provided structure collecting tag, offset and object reference information in the provided reference parameters, the method will perform the following actions:
The above actions will only be applied to offsets not belonging to the list of internal offsets, {@link InternalOffsets()}, and the method will recursively be applied to all nested structures.
The method expects the following parameters:
array | $theStructure | Structure. |
array | $thePath | Receives the offset path. |
array | $theTags | Receives the tag information. |
array | $theRefs | Receives the object references. |
boolean | $doValidate | TRUE validate. |
boolean | $doText | TRUE load full text search. |
parseProperty(mixed $theProperty, string $theType, array $theKind, mixed $theMin, mixed $theMax, string $thePattern, string $thePath, boolean $doValidate, boolean $doText) : string
Parse property
The duty of this method is to parse the provided scalar property and perform the following actions:
The method expects the following parameters:
mixed | $theProperty | Property. |
string | $theType | Data type. |
array | $theKind | Data kind. |
mixed | $theMin | Minimum data range. |
mixed | $theMax | Maximum data range. |
string | $thePattern | Data pattern. |
string | $thePath | Offset path. |
boolean | $doValidate | TRUE validate. |
boolean | $doText | TRUE load full text search. |
Eventual property class name.
parseReference(mixed $theProperty, string $theClass, string $thePath)
Parse reference
The duty of this method is to parse the provided reference expressed as an object, the method will perform the following actions:
mixed | $theProperty | Property. |
string | $theClass | Object class name. |
string | $thePath | Offset path. |
validateProperty(mixed $theProperty, string $theType, array $theKind, mixed $theMin, mixed $theMax, string $thePattern, string $thePath)
Validate property
The duty of this method is to validate the provided scalar property. In this class we check whether the structure of the property is correct, we assert the following properties:
mixed | $theProperty | Property. |
string | $theType | Data type. |
array | $theKind | Data kind. |
mixed | $theMin | Receives minimum data range. |
mixed | $theMax | Receives maximum data range. |
string | $thePattern | Receives data pattern. |
string | $thePath | Offset path. |
validateReference(mixed $theProperty, string $theType, string $theClass, string $thePath)
Validate reference
The duty of this method is to validate the provided object reference, the method will perform the following actions:
This method expects an object reference, not an object, the latter case must have been handled by the {@link parseReference()} method.
mixed | $theProperty | Property. |
string | $theType | Data type. |
string | $theClass | Object class name. |
string | $thePath | Offset path. |
castProperty(mixed $theProperty, string $theType, string $thePath, boolean $doValidate, boolean $doText)
Cast scalar
The duty of this method is to cast the provided scalar property to the provided data type.
mixed | $theProperty | Property. |
string | $theType | Data type. |
string | $thePath | Offset path. |
boolean | $doValidate | TRUE validate. |
boolean | $doText | TRUE load full text search. |
filterExistingOffsets(\OntologyWrapper\CollectionObject $theCollection, array $theTags)
Filter existing offsets
The duty of this method is to remove from the provided offset paths list all those elements which exist in the provided collection. This method should be called after deleting or modifying an object, the processed list can then be used to update the tag offset paths.
The provided offsets list should have the same structure as the {@link kTAG_OBJECT_OFFSETS} property.
for each offset, the method will check whether it exists in the provided collection, if that is the case, the method will remove it from the array item, removing tag elements if there are no offsets left.
The method expects the tags parameter to be an array.
\OntologyWrapper\CollectionObject | $theCollection | Collection. |
array | $theTags | Object tags. |
updateObjectReferenceCount(string $theCollection, mixed $theIdent, string $theIdentOffset, integer $theCount)
Update object reference count
This method expects the collection, identifiers and identifier offsets of the objects in which the reference count property referred to this object will be updated by the count provided in the last parameter.
The method accepts the following parameters:
The method will first resolve the reference count property tag corresponding to the current object using the static {@link ResolveRefCountTag()} method; it will then select all objects in the provided collection whose provided identifier offset matches the provided identifiers list; it will then update the reference count property, resolved in the first step, of all the selected objects by the count provided in the last parameter.
The method assumes the current object has its {@link dictionary()} set.
string | $theCollection | Collection name. |
mixed | $theIdent | Object identifier or identifiers. |
string | $theIdentOffset | Identifier offset. |
integer | $theCount | Reference count. |
updateTagRanges()
Update tag ranges
This method will update all tag objects range values according to the current object tag values which are recorded in the {@link kTAG_OBJECT_OFFSETS} property.
The method will cycle all object's tag offsets and with all those of kind continuous, {@link kTYPE_QUANTITATIVE}, it will collect the minimum and maximum values and update the related tag object's minimum, {@link kTAG_MIN_VAL},and maximum {@link kTAG_MAX_VAL}, properties.
The method assumes the current object has its {@link dictionary()} set.
createGraphNode(\OntologyWrapper\DatabaseGraph $theGraph) : mixed
Create graph node
The responsibiliuty of this method is to create the current object's graph node and to return its identifier. If the object already has a related node, the method will only return its identifier.
If the object should not be stored in the graph, the method should return FALSE.
This method is called by the {@link preCommitGraphReferences()} method which will only call it if the current object is not committed and if the current object's wrapper features a graph connection.
\OntologyWrapper\DatabaseGraph | $theGraph | Graph connection. |
Node identifier, TRUE or FALSE.
createRelatedGraphNodes(\OntologyWrapper\DatabaseGraph $theGraph)
Create related graph nodes
The responsibility of this method is to create eventual related graph nodes, the method expects the graph connection and the current object's graph node reference must have been set in the {@link kTAG_ID_GRAPH} property.
If In thyis class we do nothing.
\OntologyWrapper\DatabaseGraph | $theGraph | Graph connection. |
matchGraphNode(\OntologyWrapper\DatabaseGraph $theGraph) : integer
Match graph node
The responsibility of this method is to check whether a node already exists in the graph, in that case the method should return its identifier, if not, it should return FALSE.
The caller determines a match if the returned falue is an integer.
In this class we return FALSE by default.
\OntologyWrapper\DatabaseGraph | $theGraph | Graph connection. |
Graph node identifier, or FALSE.
exportXMLStructure(mixed $theStructure, \OntologyWrapper\SimpleXMLElement $theContainer, \OntologyWrapper\Wrapper $theWrapper, array $theUntracked)
Export the provided structure to XML
The method will load the provided structure into the provided XML container.
mixed | $theStructure | Structure to export. |
\OntologyWrapper\SimpleXMLElement | $theContainer | XML container (parent). |
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
array | $theUntracked | List of untracked offsets. |
exportXMLProperty(mixed $theProperty, \OntologyWrapper\SimpleXMLElement $theContainer, \OntologyWrapper\Wrapper $theWrapper, array $theUntracked, array $theTag)
Export the provided property to XML
The method will load the provided property into the provided XML container.
mixed | $theProperty | Property to export. |
\OntologyWrapper\SimpleXMLElement | $theContainer | XML container (parent). |
\OntologyWrapper\Wrapper | $theWrapper | Data wrapper. |
array | $theUntracked | List of untracked offsets. |
array | $theTag | Property tag. |
exportXMLArray(mixed $theProperty, \OntologyWrapper\SimpleXMLElement $theContainer)
Export the provided array to XML
The method will load the provided array into the provided XML container, the method expects an array or a series of nested arrays.
mixed | $theProperty | Property to export. |
\OntologyWrapper\SimpleXMLElement | $theContainer | XML container (parent). |
loadXML(\OntologyWrapper\SimpleXMLElement $theElement)
Load from XML
This method will load the object with the data contained in the provided XML container, the container must be pointing to the unit node.
In this class the method will process all the {@link kIO_XML_DATA} element of the root node, derived classes should overload this method to handle root level attributes.
The object is expected to have its wrapper set.
\OntologyWrapper\SimpleXMLElement | $theElement | XML element. |
parseXMLElement(\OntologyWrapper\SimpleXMLElement $theElement, mixed $theValue) : string
Parse XML element
The duty of this method is to parse the provided XML element and return the element value in the provided container reference and the element offset as the result.
\OntologyWrapper\SimpleXMLElement | $theElement | XML element. |
mixed | $theValue | Value container. |
Offset.
parseXMLElementOffset(\OntologyWrapper\SimpleXMLElement $theElement) : mixed
Parse XML element offset
The duty of this method is to parse the provided XML element and return the element offset.
The method will return:
\OntologyWrapper\SimpleXMLElement | $theElement | XML element. |
Offset or NULL for array elements.
setObjectShapes(boolean $doUpdate) : boolean
Set object shapes
This method can be used to set the object {@link kTAG_GEO_SHAPE} and {@link kTAG_GEO_SHAPE_DISP} properties, the method will first set the actual shape, if this was performed, it will set the display shape.
The method will return TRUE if the shapes were set or found and FALSE if not.
boolean | $doUpdate | TRUE means force update. |
TRUE if the shapes were set or found.
resetObjectShapes()
Reset object shapes
This method can be used to reset the object {@link kTAG_GEO_SHAPE} and {@link kTAG_GEO_SHAPE_DISP} properties, by default, the method will assume the shapes to be at the root level of the object, derived classes should overload the method to handle shapes embedded in sub-structures.
resolveWrapper(\OntologyWrapper\reference $theWrapper)
Resolve wrapper
This method can be used to resolve the wrapper, it expects a reference to a wrapper which will either set the current object's {@link dictionary()}, or will be set by the current object's {@link dictionary()}.
The method assumes that the wrapper must be resolved, if that is not the case, the method will raise an exception.
\OntologyWrapper\reference | $theWrapper | Data wrapper. |
compareObjectOffsets(\OntologyWrapper\reference $theNew, \OntologyWrapper\reference $theOld, boolean $doDiff) : array
Compare object offsets
This method expects two parameters structured as the {@link kTAG_OBJECT_OFFSETS} property, it will return either the differences or the matches between the two parameters.
The difference is computed by selecting all elements featured by the first parameter not existing in the second parameter; the similarity is computed by selecting only those elements belonging to both parameters.
If the third parameter is TRUE, the method will compute the difference, if not, the similarity.
The method will return the computed array, no elements will be empty.
\OntologyWrapper\reference | $theNew | New parameter. |
\OntologyWrapper\reference | $theOld | Old parameter. |
boolean | $doDiff | TRUE compute difference. |
The difference or intersection.
compareObjectReferences(\OntologyWrapper\reference $theNew, \OntologyWrapper\reference $theOld, boolean $doDiff) : array
Compare object references
This method expects two parameters structured as the {@link kTAG_OBJECT_REFERENCES} property, it will return either the differences or the matches between the two parameters.
The difference is computed by selecting all elements featured by the first parameter not existing in the second parameter; the similarity is computed by selecting only those elements belonging to both parameters.
If the third parameter is TRUE, the method will compute the difference, if not, the similarity.
The method will return the computed array, no elements will be empty.
\OntologyWrapper\reference | $theNew | New parameter. |
\OntologyWrapper\reference | $theOld | Old parameter. |
boolean | $doDiff | TRUE compute difference. |
The difference or intersection.
addToFullText(mixed $theValue, string $theLanguage, string $theType, array $theKind)
Add value to full text
This method will add the label of the provided term to the {@link kTAG_FULL_TEXT_10}, {@link kTAG_FULL_TEXT_06} and {@link kTAG_FULL_TEXT_03} of the current object.
The method assumes the current object has its wrapper set and the default language definition is in the includes.
If the term is not resolved, the method will do nothing.
mixed | $theValue | Value to add. |
string | $theLanguage | Text language. |
string | $theType | Tag type. |
array | $theKind | Tag kind. |
preOffsetExists(\OntologyWrapper\reference $theOffset) : mixed
Handle offset before checking it
This method can be used to manage the offset before passing it to the inherited {@link ArrayObject::OffsetExists()} method.
The method provides the offset as a reference, if the method returns NULL it means that the offset must be passed to the inherited {@link ArrayObject::OffsetExists()}; if the method returns any other value, this will be returned and the inherited {@link ArrayObject::OffsetExists()} will be skipped.
In this class we do nothing.
\OntologyWrapper\reference | $theOffset | Offset reference. |
NULL check offset, other, return.
preOffsetGet(\OntologyWrapper\reference $theOffset) : mixed
Handle offset before getting it
This method can be used to manage the offset before passing it to the inherited {@link ArrayObject::OffsetGet()} method.
The method provides the offset as a reference, if the method returns NULL it means that the offset must be passed to the inherited {@link ArrayObject::OffsetGet()}; if the method returns any other value, this must be returned and the inherited {@link ArrayObject::OffsetGet()} skipped.
In this class we do nothing.
\OntologyWrapper\reference | $theOffset | Offset reference. |
NULL get offset value, other, return.
nestedOffsetExists(array $theOffset, mixed $theValue) : boolean
Check if an offset exists
This method is the equivalent of {@link offsetExists()} for nested offsets, the method will traverse the current value until it finds the offset, if at any level an offset is not resolved, the method will return FALSE.
It is assumed that all offsets except the last one must be structures, if that is not the case, the method will return FALSE.
The provided offset must be a valid nested offset, which is a sequence of numerics separated by a period; this check must have been performed by the caller.
array | $theOffset | Offsets path. |
mixed | $theValue | Parent offset value. |
TRUE the offset exists.
isOffsetListType(mixed $theOffset) : boolean
Check if offset is a list type
This method will check whether the provided offset is a list type, that is, if it has the {@link kTYPE_LIST} in its data kind, or if the root element is an array.
The method will return TRUE if the provided offset is an array.
If the offset is not a tag, the method will raise an exception.
mixed | $theOffset | Offset. |
TRUE if the offset is an array.