Public Member Functions | |
| __construct ($nodeData=array(), $keys) | |
| getData ($name) | |
| getLevel () | |
| getLeft () | |
| getRight () | |
| getPid () | |
| getId () | |
| isParent () | |
Public Attributes | |
| $hasChild = false | |
| $numChild = 0 | |
Definition at line 30 of file Node.php.
| __construct | ( | $ | nodeData = array(), |
|
| $ | keys | |||
| ) |
Definition at line 45 of file Node.php.
00045 { 00046 if (empty($nodeData)) { 00047 throw new Varien_Db_Tree_Node_Exception('Empty array of node information'); 00048 } 00049 if (empty($keys)) { 00050 throw new Varien_Db_Tree_Node_Exception('Empty keys array'); 00051 } 00052 00053 $this->id = $nodeData[$keys['id']]; 00054 $this->pid = $nodeData[$keys['pid']]; 00055 $this->left = $nodeData[$keys['left']]; 00056 $this->right = $nodeData[$keys['right']]; 00057 $this->level = $nodeData[$keys['level']]; 00058 00059 $this->data = $nodeData; 00060 $a = $this->right - $this->left; 00061 if ($a > 1) { 00062 $this->hasChild = true; 00063 $this->numChild = ($a - 1) / 2; 00064 } 00065 return $this; 00066 }
| getData | ( | $ | name | ) |
| isParent | ( | ) |
1.5.8