Constructor.
HarmoniHierarchy
HarmoniHierarchy
(object ID $id, string $displayName, string $description, boolean $cache, ref 4)
-
object ID
$id: The Id of this Hierarchy.
-
string
$displayName: The displayName of the Hierarchy.
-
string
$description: The description of the Hierarchy.
-
ref
4: object cache This is the HierarchyCache object. Must be the same one that all other nodes in the Hierarchy are using.
-
boolean
$cache: allowsMultipleParents This is true if the hierarchy will allow multiple parents.
Add a NodeType to this Hierarchy.
void
addNodeType
(mixed $type, object Type $type
)
Redefinition of:
- Hierarchy::addNodeType()
- Add a NodeType to this Hierarchy.
Returns true if multiple parents are allowed; false otherwise.
boolean
allowsMultipleParents
()
Redefinition of:
- Hierarchy::allowsMultipleParents()
- Returns true if multiple parents are allowed; false otherwise.
Returns true if recursion allowed; false otherwise.
boolean
allowsRecursion
()
Redefinition of:
- Hierarchy::allowsRecursion()
- Returns true if recursion allowed; false otherwise.
Clears the cache.
WARNING: NOT IN OSID
void
clearCache
()
Create a Node. The Node is created with the specified unique Id and initially has only the specified parent.
object Node
createNode
(object Id $nodeId, object Id $parentId, object Type $type, string $displayName, mixed $description, string $description
)
-
object Id
$nodeId
-
object Id
$parentId
-
object Type
$type
-
string
$displayName
-
string
$description
Redefinition of:
- Hierarchy::createNode()
- Create a Node. The Node is created with the specified unique Id and initially has only the specified parent.
Create a root Node. The Node is created with the specified unique Id, and, unlike Nodes created with createNode, initially has no parents or children.
object Node
createRootNode
(object Id $nodeId, object Type $nodeType, string $displayName, mixed $description, string $description
)
-
object Id
$nodeId
-
object Type
$nodeType
-
string
$displayName
-
string
$description
Redefinition of:
- Hierarchy::createRootNode()
- Create a root Node. The Node is created with the specified unique Id, and, unlike Nodes created with createNode, initially has no parents or children.
Delete a Node by Id. Only leaf Nodes can be deleted.
void
deleteNode
(mixed $nodeId, object Id $nodeId
)
Redefinition of:
- Hierarchy::deleteNode()
- Delete a Node by Id. Only leaf Nodes can be deleted.
Get all the Nodes in this Hierarchy.
object NodeIterator
getAllNodes
()
Redefinition of:
- Hierarchy::getAllNodes()
- Get all the Nodes in this Hierarchy.
Get the description for this Hierarchy.
string
getDescription
()
Redefinition of:
- Hierarchy::getDescription()
- Get the description for this Hierarchy.
Get the display name for this Hierarchy.
string
getDisplayName
()
Redefinition of:
- Hierarchy::getDisplayName()
- Get the display name for this Hierarchy.
Get the unique Id for this Hierarchy.
object Id
getId
()
Redefinition of:
- Hierarchy::getId()
- Get the unique Id for this Hierarchy.
Get a Node by unique Id.
object Node
getNode
(mixed $nodeId, object Id $nodeId
)
Redefinition of:
- Hierarchy::getNode()
- Get a Node by unique Id.
Get the Nodes of the specified Type in this Hierarchy.
WARNING: NOT IN OSID - This method is not in the OSIDs as of version 2.0.
object NodeIterator
getNodesByType
(object Type $nodeType)
Get all NodeTypes used in this Hierarchy.
object TypeIterator
getNodeTypes
()
Redefinition of:
- Hierarchy::getNodeTypes()
- Get all NodeTypes used in this Hierarchy.
Get the root Nodes in this Hierarchy.
object NodeIterator
getRootNodes
()
Redefinition of:
- Hierarchy::getRootNodes()
- Get the root Nodes in this Hierarchy.
Answer TRUE if the a node exists with the given Id
WARNING: NOT in OSID
boolean
nodeExists
(mixed $nodeId, object Id $nodeId
)
Remove a NodeType from this Hierarchy. Note that no Nodes can have this NodeType.
void
removeNodeType
(mixed $type, object Type $type
)
Redefinition of:
- Hierarchy::removeNodeType()
- Remove a NodeType from this Hierarchy. Note that no Nodes can have this NodeType.
Traverse a Hierarchy returning information about each Node encountered.
object TraversalInfoIterator
traverse
(object Id $startId, int $mode, int $direction, mixed $levels, int $levels
)
-
object Id
$startId
-
int
$mode
-
int
$direction
-
int
$levels
Redefinition of:
- Hierarchy::traverse()
- Traverse a Hierarchy returning information about each Node encountered.
Update the description for this Hierarchy.
void
updateDescription
(mixed $description, string $description
)
Redefinition of:
- Hierarchy::updateDescription()
- Update the description for this Hierarchy.
Update the display name for this Hierarchy.
void
updateDisplayName
(mixed $displayName, string $displayName
)
Redefinition of:
- Hierarchy::updateDisplayName()
- Update the display name for this Hierarchy.
Inherited Methods
Inherited From Hierarchy
Hierarchy::addNodeType()
Hierarchy::allowsMultipleParents()
Hierarchy::allowsRecursion()
Hierarchy::createNode()
Hierarchy::createRootNode()
Hierarchy::deleteNode()
Hierarchy::getAllNodes()
Hierarchy::getDescription()
Hierarchy::getDisplayName()
Hierarchy::getId()
Hierarchy::getNode()
Hierarchy::getNodeTypes()
Hierarchy::getRootNodes()
Hierarchy::removeNodeType()
Hierarchy::traverse()
Hierarchy::TRAVERSE_DIRECTION_DOWN()
Hierarchy::TRAVERSE_DIRECTION_UP()
Hierarchy::TRAVERSE_LEVELS_ALL()
Hierarchy::TRAVERSE_MODE_BREADTH_FIRST()
Hierarchy::TRAVERSE_MODE_DEPTH_FIRST()
Hierarchy::updateDescription()
Hierarchy::updateDisplayName()