interface INodeTree { function getParent(); } class BaseNode implements INodeTree { private $children = array; function addChild(BaseNode $child) { $child = clone $child; $child->parent = $this; return $children[] = $child; } function getParent() { return $this->parent; } } class NodeType1 extends BaseNode implements INodeTree { ... }