public function setVisibility($type, $vvalue) { if (is_null($this->visibility)) { $this->visibility = new Visibility(); } $this->visibility->setType($type); $this->visibility->setValue($vvalue); return $this; }