All pastes #765794 Raw Edit

Untitled

public php v1 · immutable
·published 2007-11-08 10:54 UTC
rendered paste body
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{...}