public function setVisibility($visibility)
    {
        switch ($visibility) {
            case Modifiers::VISIBILITY_PUBLIC:
                $this->removeModifier(Modifiers::MODIFIER_PRIVATE | Modifiers::MODIFIER_PROTECTED);
                $this->addModifier(Modifiers::MODIFIER_PUBLIC);
                break;
            case Modifiers::VISIBILITY_PROTECTED:
                $this->removeModifier(Modifiers::MODIFIER_PRIVATE | Modifiers::MODIFIER_PUBLIC);
                $this->addModifier(Modifiers::MODIFIER_PROTECTED);
                break;
            case Modifiers::VISIBILITY_PRIVATE:
                $this->removeModifier(Modifiers::MODIFIER_PUBLIC | Modifiers::MODIFIER_PROTECTED);
                $this->addModifier(Modifiers::MODIFIER_PRIVATE);
                break;
            default:
                throw new InvalidArgumentException('Unknown visibility to set.');
        }
    }
public function setVisibility($visibility)
    {
        switch ($visibility) {
            case Modifiers::VISIBILITY_PUBLIC:
                $this->removeModifier(Modifiers::MODIFIER_PRIVATE | Modifiers::MODIFIER_PROTECTED);
                $this->addModifier(Modifiers::MODIFIER_PUBLIC);
                break;
            case Modifiers::VISIBILITY_PROTECTED:
                $this->removeModifier(Modifiers::MODIFIER_PRIVATE | Modifiers::MODIFIER_PUBLIC);
                $this->addModifier(Modifiers::MODIFIER_PROTECTED);
                break;
            case Modifiers::VISIBILITY_PRIVATE:
                $this->removeModifier(Modifiers::MODIFIER_PUBLIC | Modifiers::MODIFIER_PROTECTED);
                $this->addModifier(Modifiers::MODIFIER_PRIVATE);
                break;
            default:
                throw new InvalidArgumentException('Unknown visibility to set.');
        }
    }
public function setVisibility ( $ visibility ) { switch ( $ visibility ) { case Modifiers :: VISIBILITY_PUBLIC : $ this -> removeModifier ( Modifiers :: MODIFIER_PRIVATE | Modifiers :: MODIFIER_PROTECTED ) ; $ this -> addModifier ( Modifiers :: MODIFIER_PUBLIC ) ; break ; case Modifiers :: VISIBILITY_PROTECTED : $ this -> removeModifier ( Modifiers :: MODIFIER_PRIVATE | Modifiers :: MODIFIER_PUBLIC ) ; $ this -> addModifier ( Modifiers :: MODIFIER_PROTECTED ) ; break ; case Modifiers :: VISIBILITY_PRIVATE : $ this -> removeModifier ( Modifiers :: MODIFIER_PUBLIC | Modifiers :: MODIFIER_PROTECTED ) ; $ this -> addModifier ( Modifiers :: MODIFIER_PRIVATE ) ; break ; default : throw new InvalidArgumentException ( 'Unknown visibility to set.' ) ; } }
Set the visibility of the entity.

@param string $visibility The visibility to set.
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the visibility is invalid.
Set the visibility of the entity .