1 | <?php |
||
16 | class TreeItem extends AbstractBranch implements Branch |
||
17 | { |
||
18 | /** |
||
19 | * An identifier for the tree item |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $id; |
||
23 | |||
24 | /** |
||
25 | * The identifier of the parent item - default to 0 for root node |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $parentId = 0; |
||
29 | |||
30 | /** |
||
31 | * Passed data for the tree item |
||
32 | * @var mixed |
||
33 | */ |
||
34 | protected $data; |
||
35 | |||
36 | /** |
||
37 | * Set the tree item id |
||
38 | * @param int $value |
||
39 | * @return \TreeBuilder\Base\Branch |
||
40 | */ |
||
41 | public function setId($value) |
||
46 | |||
47 | /** |
||
48 | * Get the tree item id |
||
49 | * @return int |
||
50 | */ |
||
51 | public function getId() |
||
55 | |||
56 | /** |
||
57 | * Set the parent's id |
||
58 | * @param int $value |
||
59 | * @return \TreeBuilder\Base\Branch |
||
60 | */ |
||
61 | public function setParentId($value) |
||
66 | |||
67 | /** |
||
68 | * Get the parent's id |
||
69 | * @return int |
||
70 | */ |
||
71 | public function getParentId() |
||
75 | |||
76 | /** |
||
77 | * Store data to be passed for the tree item |
||
78 | * @param mixed $value |
||
79 | * @return \TreeBuilder\Base\Branch |
||
80 | */ |
||
81 | public function setData($value) |
||
86 | |||
87 | /** |
||
88 | * Retrieve the tree item passed data |
||
89 | * @return mixed |
||
90 | */ |
||
91 | public function getData() |
||
95 | } |
||
96 |