X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FTree.php;h=b07ad4f6e46fbc61bd05c0d11cbd16b9d7a58cf9;hb=bfc6355af6949ca1e4a7c39d0f54f0ec70b641bf;hp=72f8d5e1575cdc224d642cf7bf9ce3b953338689;hpb=39de6fd54b9843705d13cb9f70fbcc6296103670;p=civicrm-core.git diff --git a/CRM/Utils/Tree.php b/CRM/Utils/Tree.php index 72f8d5e157..b07ad4f6e4 100644 --- a/CRM/Utils/Tree.php +++ b/CRM/Utils/Tree.php @@ -93,7 +93,6 @@ class CRM_Utils_Tree { * @internal param string $rootNode * * @return CRM_Utils_Tree - * @access public */ public function __construct($nodeName) { // create the root node @@ -106,13 +105,12 @@ class CRM_Utils_Tree { /** * Find a node that matches the given string * - * @param string $name name of the node we are searching for. + * @param string $name + * 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 - * - * @access public + ref) | false node if found else false */ //public function &findNode(&$parentNode, $name) public function &findNode($name, &$parentNode) { @@ -149,11 +147,9 @@ class CRM_Utils_Tree { * Currently leaf nodes are strings and non-leaf nodes are arrays * * @param array( - ref) $node node which needs to checked + ref) $node node which needs to checked * * @return boolean - * - * @access public */ public function isLeafNode(&$node) { return (count($node['children']) ? TRUE : FALSE); @@ -164,9 +160,8 @@ class CRM_Utils_Tree { * * @param string $name * - * @return array (ref) - * - * @access public + * @return array + * (ref) */ public function &createNode($name) { $node['name'] = $name; @@ -179,12 +174,11 @@ class CRM_Utils_Tree { /** * Add node * - * @param string $parentName - name of the parent ? - * @param array (ref) - node to be added + * @param string $parentName + * Name of the parent ?. + * @param array (ref) - node to be added * * @return void - * - * @access public */ public function addNode($parentName, &$node) { $temp = ''; @@ -196,13 +190,12 @@ class CRM_Utils_Tree { /** * 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 mixed - data to be added + * @param string - key to be used (optional) * * @return void - * - * @access public */ public function addData($parentName, $childName, $data) { $temp = ''; @@ -222,8 +215,6 @@ class CRM_Utils_Tree { * @param none * * @return tree - * - * @access public */ public function getTree() { return $this->tree; @@ -235,11 +226,8 @@ class CRM_Utils_Tree { * @param none * * @return void - * - * @access public */ public function display() { print_r($this->tree); } } -