| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* Name of the node we are searching for.
* @param array (ref) $parentNode which parent node should we search in ?
*
- * @return array(
- * ref) | false node if found else false
+ * @return array(ref) | false node if found else false
*/
- //public function &findNode(&$parentNode, $name)
public function &findNode($name, &$parentNode) {
// if no parent node specified, please start from root node
if (!$parentNode) {
* Check if node is a leaf node.
* Currently leaf nodes are strings and non-leaf nodes are arrays
*
- * @param array (
- * ref) $node node which needs to checked
+ * @param array $node node which needs to checked
*
- * @return boolean
+ * @return bool
*/
public function isLeafNode(&$node) {
return (count($node['children']) ? TRUE : FALSE);
*
* @param string $parentName
* Name of the parent ?.
- * @param array (ref) - node to be added
+ * @param array (ref) $node - node to be added
*
* @return void
*/
/**
* Add Data
*
- * @param string $parentName
- * Name of the parent ?.
- * @param mixed - data to be added
- * @param string - key to be used (optional)
+ * @param string $parentName Name of the parent ?.
+ * @param string $childName - key to be used (optional)
+ * @param mixed $data - data to be added
*
* @return void
*/
/**
* Get Tree
*
- * @param none
- *
* @return tree
*/
public function getTree() {
/**
* Print the tree
*
- * @param none
- *
* @return void
*/
public function display() {
print_r($this->tree);
}
+
}