1: <?php
2:
3:
4:
5: /**
6: * Class ArbitraryNode
7: *
8: * @version 1.0.2
9: * @author v.raskin
10: * @package vsword.node
11: */
12: class ArbitraryNode extends Node {
13: protected $name;
14:
15: public function __construct($name, $attributes = NULL) {
16: $this->name = $name;
17: if(!is_null($attributes)) {
18: $this->addAttributes($attributes);
19: }
20: }
21:
22: public function getName() {
23: return $this->name;
24: }
25:
26: public function getWord() {
27: return '<'.$this->name.$this->attributeToString().'/>';
28: }
29:
30: public function __toString() {
31: return get_class($this).':'.$this->name;
32: }
33: }
34: