/** * Add a child node. This method will set the child's parent to this object. * @param SDNode $child the child node to add */ function addNode(SDNode $child) { $child->setParent($this); $this->children[] = $child; }
/** * Construct a PI node with specified target and data * * @param SDElement $parent the owning element * @param string $target the PI target * @param string $data the data of the PI */ function __construct($parent, $target, $data) { parent::__construct($parent); $this->setTarget($target); $this->setData($data); }