Maybe I'm overlooking some details, but this method seems very similar, could there be setter methods for $this->type and $this->id and use the parent?