Return's the visibility key for the passed visibility string.

@param string $visibility The visibility string to return the key for

@return integer The requested visibility key
@throws \Exception Is thrown, if the requested visibility is not available
495763
public function getVisibilityIdByValue($visibility)
    {

        // query whether or not, the requested visibility is available
        if (isset($this->availableVisibilities[$visibility])) {
            // load the visibility ID, add the mapping and return the ID
            return $this->availableVisibilities[$visibility];
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Found invalid visibility %s', $visibility)
            )
        );
    }
1049638
public function get($key)
    {
        if (!$this->has($key)) {
            throw new Exception(sprintf(Exception::SETTING_KEY_NOT_EXISTS, $key));
        }

        return $this->getCachedSettings()->offsetGet($key);
    }
499620
public function setMutatorVisibility($visibility)
    {
        $visibility = strtolower($visibility);
        if (!in_array($visibility, self::$validVisibilities)) {
            $visibility = self::DEFAULT_VISIBILITY;
        }

        $this->mutatorVisibility = $visibility;
    }
452605
static function findValue(string $key)
    {
        return self::hasKey($key)
            ? self::$keyToValueMap[static::class][$key]
            : null;
    }
556377
public function limitMaximumAddVisibility(string $visibility): self
    {
        $this->generate_add = Generate::getMostLimitedVisibility($this->generate_add, $visibility);

        return $this;
    }
1176841
public function setFieldVisibility($visibility)
    {
        if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) {
            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility);
        }

        $this->fieldVisibility = $visibility;
    }
446197
public function getOrFail($key)
    {
        $value = $this->get($key, new None());
        if (!$value instanceof None) {
            return $value;
        }
        throw new KeyNotFoundException("Key '$key' not found'");
    }
1125673
public function setVisibility($path, $visibility)
    {
        $command = $this->s3Client->getCommand(
            'putObjectAcl',
            [
                'Bucket' => $this->bucket,
                'Key'    => $this->applyPathPrefix($path),
                'ACL'    => $visibility === AdapterInterface::VISIBILITY_PUBLIC ? 'public-read' : 'private',
            ]
        );

        try {
            $this->s3Client->execute($command);
        } catch (S3Exception $exception) {
            return false;
        }

        return compact('path', 'visibility');
    }
586561
public function getCacheKeyForView($view, $key = null)
    {
        $parts = [$this->cacheKey, $view];

        if ($key !== null) {
            $parts[] = $key;
        }

        return implode('.', $parts);
    }
807264
public function setVisibility($path, $visibility)
    {
        [$prefix, $path] = $this->getPrefixAndPath($path);

        return $this->getFilesystem($prefix)->setVisibility($path, $visibility);
    }
262077
public function getAccessibility(string $property)
    {
        return isset($this->propertyAccessibilityMap[$property])
                ? $this->propertyAccessibilityMap[$property]
                : null;
    }
734375
public function getVisibility(string $path): string
    {
        $location = $this->applyBasePath($path);
        clearstatcache(false, $location);
        $permission = octdec(substr(sprintf('%o', fileperms($location)), -4));

        return $permission & 0044 ? self::VIS_PUB : self::VIS_PRI;
    }
104701
public function getKey($key)
    {
        $key = strtolower($key);
        if (!isset($this->keys[$key])) {
            return null;
        }
        return (string)$this->keys[$key];
    }
477251
public function getKeyById(string $id = null)
    {
        if ($id) {
            if (!isset($this->keys[$id])) {
                throw new AuthenticationException("Unknown 'kid' $id");
            }

            return $this->keys[$id];
        }
        if (count($this->keys) > 1) {
            throw new AuthenticationException("Missing 'kid'");
        }

        return current($this->keys);
    }
733497
protected function parseVisibility($visibility)
    {
        if (is_null($visibility)) {
            return;
        }
        switch ($visibility) {
            case Filesystem::VISIBILITY_PUBLIC:
                return AdapterInterface::VISIBILITY_PUBLIC;
            case Filesystem::VISIBILITY_PRIVATE:
                return AdapterInterface::VISIBILITY_PRIVATE;
        }

        throw new InvalidArgumentException('Unknown visibility: ' . $visibility);
    }
525743
public function get($key)
    {
        if (!$this->has($key)) {
            throw new Exception(sprintf(Exception::STATS_KEY_NOT_EXISTS, $key));
        }

        return $this->getCachedStats()->offsetGet($key);
    }
99238
public function limitMaximumSetVisibility(string $visibility): self
    {
        $this->generate_set = Generate::getMostLimitedVisibility($this->generate_set, $visibility);

        return $this;
    }