public function setDefaultObject(\stdClass $obj) { $this->defaultObject = (object) array_merge((array) $this->defaultObject, (array) $obj); }