-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNode.php
37 lines (32 loc) · 882 Bytes
/
Node.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* This class describes a node in the DAG of the delta-expertise content (which in turn is based on EMont).
* A node represents an entity which is a wiki-page with a name and a URL, and a breadcrumb value
* which is an object of this class (recursive definition).
*
* This is a helper class, created for use with the breadcrumb algorithm (see BreadCrumbBuilder.php)
*
* @author WME 201411
*/
class Node{
private $name;
private $url;
private $breadCrumb;
public function __construct($name, $url, $bcnode=null){
$this->name = $name;
$this->url = $url;
$this->breadCrumb = ($bcnode)? $bcnode : $this;
}
public function getName(){
return $this->name;
}
public function getUrl(){
return $this->url;
}
public function getBreadCrumb(){
return $this->breadCrumb;
}
public function setBreadCrumb($node){
$this->breadCrumb = $node;
}
}