public function __construct($index, $type, $id, $parent = null) { $this->index = $index; $this->type = $type; $this->id = $id; $this->parent = $parent; }