public function __construct($name, $parent = null) { $this->name = $name; $this->disabled = false; if ($parent != null) { $parent->addChild($this); } }