PHP Class Prado\Data\SqlMap\Statements\TSqlMapObjectCollectionTree

Maps object collection graphs as trees. Nodes in the collection can be {@link add} using parent relationships. The object collections can be build using the {@link collect} method.
Since: 3.1
Inheritance: extends Prado\TComponent
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
__sleep ( )
add ( $parent, $node, $object = '' ) Add a new node to the object tree graph.
collect ( ) : array
isEmpty ( ) : boolean

Méthodes protégées

Méthode Description
addNode ( &$childs, $parent, $node ) : boolean Find the parent node and add the new node as its child.
collectChildren ( $parent, &$nodes ) Visit all the child nodes and collect them by removing.
getCollection ( ) : array
hasChildren ( &$nodes ) : boolean
onChildNodesVisited ( $parent, $nodes ) Set the object properties for all the child nodes visited.

Method Details

__sleep() public méthode

public __sleep ( )

add() public méthode

Add a new node to the object tree graph.
public add ( $parent, $node, $object = '' )

addNode() protected méthode

Find the parent node and add the new node as its child.
protected addNode ( &$childs, $parent, $node ) : boolean
Résultat boolean true if parent node is found.

collect() public méthode

public collect ( ) : array
Résultat array object collection

collectChildren() protected méthode

Visit all the child nodes and collect them by removing.
protected collectChildren ( $parent, &$nodes )

getCollection() protected méthode

protected getCollection ( ) : array
Résultat array object collection.

hasChildren() protected méthode

protected hasChildren ( &$nodes ) : boolean
Résultat boolean true if all nodes are leaf nodes, false otherwise

isEmpty() public méthode

public isEmpty ( ) : boolean
Résultat boolean true if the graph is empty

onChildNodesVisited() protected méthode

Set the object properties for all the child nodes visited.
protected onChildNodesVisited ( $parent, $nodes )