Get the visibility modifier (one of MetaInfo::IS_PUBLIC, MetaInfo::IS_PRIVATE,
MetaInfo::IS_PROTECTED) from the given argument.

@param mixed $visibility
@return integer

@throws \InvalidArgumentException
764095
public static function getVisibilityModifier($visibility)
	{
		if(is_integer($visibility))
		{
			$visibility = self::getVisibilityString($visibility);
		}
		
		switch(strtolower($visibility))
		{
			case self::VISIBILITY_PRIVATE:
				return self::IS_PRIVATE;
			case self::VISIBILITY_PROTECTED:
				return self::IS_PROTECTED;
			case self::VISIBILITY_PUBLIC:
			case 'var':
				return self::IS_PUBLIC;
		}
		
		throw new \InvalidArgumentException('Unsupported visibility: "' . $visibility . '" must be one of "public", "var", "private", "protected"');
	}
651005
public function getVisible()
	{
		if($this->_visible===null)
			$this->_visible=$this->evaluateVisible();
		return $this->_visible;
	}
596237
public function setVisibility($path, $visibility)
    {
        $path = $this->applyPathPrefix($path);
        $object = $this->bucket->object($path);

        switch (true) {
            case $visibility === AdapterInterface::VISIBILITY_PUBLIC:
                $object->acl()->add('allUsers', Acl::ROLE_READER);
                break;
            case $visibility === AdapterInterface::VISIBILITY_PRIVATE:
                $object->acl()->delete('allUsers');
                break;
            default:
                // invalid value
                break;
        }

        $object->reload();

        return $this->convertObjectInfo($object);
    }
374997
public T visibility(int visibility) {

        if (view != null && view.getVisibility() != visibility) {
            view.setVisibility(visibility);
        }

        return self();
    }
686485
public function resolve($mask)
    {
        if (is_string($mask)) {
            if (!defined($name = sprintf(static::class . '::MASK_%s', strtoupper($mask)))) {
                throw new \InvalidArgumentException("Constant do not exists $name");
            }
            
            return constant($name);
        }
        
        if (!is_int($mask)) {
            throw new \InvalidArgumentException("Mask is invalid. Should be an integer");
        }
        
        return $mask;
    }
392718
protected static function getVisibility(\Reflector $reflector): string
    {
        if (
            !$reflector instanceof \ReflectionMethod &&
            !$reflector instanceof \ReflectionProperty
        ) {
            throw new InvalidArgumentException(
                sprintf(
                    'Reflector must be an instance of "%s" or "%s", "%s" given',
                    \ReflectionMethod::class,
                    \ReflectionProperty::class,
                    \get_class($reflector)
                )
            );
        }

        foreach (['Public', 'Protected', 'Private'] as $visibility) {
            if ($reflector->{'is' . $visibility}()) {
                return strtolower($visibility);
            }
        }

        throw new \RuntimeException('Witness me!');
    }
101351
public function setVisibility(string $path, string $visibility): bool
    {
        $location = $this->applyBasePath($path);
        $type     = is_dir($location) ? 'dir' : 'file';

        return chmod($location, $this->permissions[$type][$visibility]);
    }
134356
public function getPageByVisibility( $visibility, $config = [] ) {

		$modelTable	= static::$modelTable;

		$config[ 'conditions' ][ "$modelTable.visibility" ]	= $visibility;

		return $this->getPage( $config );
	}
52836
public function setVisible(bool $visible = false) : self
    {
        if ($this->hideable == false && $visible == false) {
            throw new \LogicException(sprintf("Can't set visibility hidden on cols '%s'", $this->getId()));
        }

        $this->visible = $visible;

        return $this;
    }
722320
public static function getVisibility(string $path)
    {
        clearstatcache(false, $path);
        $permissions = octdec(substr(sprintf('%o', fileperms($path)), -4));
        $visibility = $permissions & 0044 ? 'public' : 'private';

        return $visibility;
    }
751382
public function getConstant($constantName)
    {
        if (!\is_string($constantName)) {
            throw new InvalidArgumentException('$constantName must be string type');
        }

        if (empty($constantName)) {
            throw new InvalidArgumentException('$constantName must not be empty: '.$constantName);
        }

        if (isset($this->constants[$constantName])) {
            return $this->constants[$constantName];
        }

        $extendsClassDefinition = $this->getExtendsClassDefinition();
        if ($extendsClassDefinition) {
            if ($extendsClassDefinition->hasConstant($constantName)) {
                return $extendsClassDefinition->getConstant($constantName);
            }
        }

        /*
         * Gets constant from interfaces
         */
        return $this->getConstantFromInterfaces($constantName);
    }
280781
public static function getCode($mask)
    {
        if (!is_int($mask)) {
            throw new InvalidArgumentException('$mask must be an integer.');
        }

        $reflection = new \ReflectionClass(get_called_class());
        foreach ($reflection->getConstants() as $name => $cMask) {
            if (0 !== strpos($name, 'MASK_')) {
                continue;
            }

            if ($mask === $cMask) {
                if (!defined($cName = 'static::CODE_'.substr($name, 5))) {
                    throw new \RuntimeException('There was no code defined for this mask.');
                }

                return constant($cName);
            }
        }

        throw new InvalidArgumentException(sprintf('The mask "%d" is not supported.', $mask));
    }
409187
public function get_opacity($opacity = null)
    {
        if ($opacity !== null) {
            $this->set_opacity($opacity);
        }

        return $this->_opacity;
    }
1186662
public function setVisibility(string $visibility)
    {
        if (!in_array($visibility, VisibilityableInterface::VISIBILITY_ALLOWED)) {
            throw new \Exception(sprintf(VisibilityableInterface::ERROR_FORMAT_INVALID_VISIBILITY, $visibility));
        }
        $this->visibility = $visibility;

        return $this;
    }
811292
private function getVisibilityStyle(\ReflectionProperty $property)
    {
        if ($property->isPublic()) {
            return self::IS_PUBLIC;
        } elseif ($property->isProtected()) {
            return self::IS_PROTECTED;
        } else {
            return self::IS_PRIVATE;
        }
    }
818368
public function watermarkOpacity(int $opacity)
    {
        if ($opacity < 0 || $opacity > 100) {
            throw InvalidManipulation::valueNotInRange('opacity', $opacity, 0, 100);
        }

        return $this->addManipulation('watermarkOpacity', $opacity);
    }
1051991
public function modifiers($showPublic = TRUE)
    {
        $modifiers = '';
        if ($showPublic || $this->_access != 'public') {
            $modifiers .= $this->_access.' ';
        }
        if ($this->_final) {
            $modifiers .= 'final ';
        }
        if (isset($this->_abstract) && $this->_abstract) {
            $modifiers .= 'abstract ';
        }
        if ($this->_static) {
            $modifiers .= 'static ';
        }

        return $modifiers;
    }