Get the information from the $_SERVER array if the key exist.
If not exist, return an exception.

@param string $keyName The key's value in $_SERVER array

@return string

@throws \Exception If the key not exist into $_SERVER
196115
public static function getServerValue(string $keyName): string
    {
        if (!isset($_SERVER[$keyName])) {
            throw new \Exception(
                'The key '.$keyName.' not exist into $_SERVER array',
                self::ERR_KEY_NOT_EXIST
            );
        }

        return $_SERVER[$keyName];
    }
1173273
public function getVHostConfig($serverName, $vhostName)
    {
        list($response) = $this->getVHostConfigWithHttpInfo($serverName, $vhostName);
        return $response;
    }
192861
public function server(string $key): string
    {
        if (array_key_exists($key, $this->server)) {
            return $this->server[$key];
        }

        return '';
    }
881120
public static function assert($value, $varName) {
        if(!is_array($value)) return Exceptions::InvalidTypeException('HashMapEntry', $varName, $value);
        if(count($value) > 1) return Exceptions::InvalidTypeException('HashMapEntry', $varName, $value);

        $keys = array_keys($value);
        $key  = end($keys);

        Str::assert($key, 'HashMapEntry of "' . $varName . '": "' . $key . '"');

        return $value;
    }
725502
public function getKey($keyname = self::DEFAULT_KEY)
    {
        if (!isset($this->_keyCache[$keyname])) {
            if (isset($_COOKIE[$keyname . '_key'])) {
                $key = $_COOKIE[$keyname . '_key'];
            } else {
                $key = session_id();
                $this->_setCookie($keyname, $key);
            }

            $this->_keyCache[$keyname] = $key;
        }

        return $this->_keyCache[$keyname];
    }
335456
public function getColumnType($tableName, $columnName) {
        $columns = $this->getTableColumns($tableName);
        foreach ($columns as $column) {
            if ($column['Field'] != $columnName)
                continue;
            $type = explode('(', $column['Type'], 2);
            return $type[0];
        }
        throw new \Exception("Column `$columnName` not found in table `$tableName`!");
    }
409248
public function &__get($key)
    {
        if (array_key_exists($key, $this->_data)) {
            return $this->_data[$key];
        }
        if (array_key_exists($key, $this->_given)) {
            $scope = Suite::current()->scope();
            $scope->{$key} = $this->_given[$key]($scope);
            return $scope->__get($key);
        }
        if ($this->_parent !== null) {
            return $this->_parent->__get($key);
        }
        throw new Exception("Undefined variable `{$key}`.");
    }
637203
protected function postKeyToLaravelForgeServer($keyName=null)
    {
        $keyName ? $keyName : $this->getUniqueKeyNameFromEmail();
        return $this->http->post($this->url,
            [
                'form_params' => [
                    'name' => $keyName,
                    'key' => file_get_contents($_SERVER['HOME'] . self::SSH_ID_RSA_PUB)
                ],
                'headers' => [
                    'X-Requested-With' => 'XMLHttpRequest',
                    'Authorization' => 'Bearer ' . fp_env('ACACHA_FORGE_ACCESS_TOKEN')
                ]
            ]
        );
    }
525743
public function get($key)
    {
        if (!$this->has($key)) {
            throw new Exception(sprintf(Exception::STATS_KEY_NOT_EXISTS, $key));
        }

        return $this->getCachedStats()->offsetGet($key);
    }
1011102
public function get( $propertyName ) {
			
			if ( self::isProperty( $propertyName ) ) {
				
				return array_key_exists( $propertyName, $this->properties )
					? $this->properties[ $propertyName ]
					: null;

			} else {
			
				throw new \browserfs\Exception('Invalid argument: $propertyName: value cannot be a key!' );
			
			}
		}
434502
public function fetch(/* $key1, $key2, ... $keyN */)
    {
        $keys = func_get_args();

        $config = $this->config;
        foreach ($keys as $key) {
            if (isset($config[$key])) {
                $config = $config[$key];
            } else {
                throw new KeyNotFoundException("Key $key not found.");
            }
        }

        return $config;
    }
232817
public function getServer($key = null)
    {
        if ($key === null) {
            return $this->server;
        } else {
            return (isset($this->server[$key])) ? $this->server[$key] : null;
        }
    }
9869
public function serverGetByName($name)
  {
    foreach($this->serverList() as $server)
    {
      if($server["virtualserver_name"] == $name) return $server;
    }

    throw new Exception("invalid serverID", 0x400);
  }
1360627
private function getServerIdFromConfig($varName)
    {
        $constNameLength = strlen(self::CONFIG_NAME_FOR_SERVER_INFO);
        $id = substr($varName, $constNameLength);
        return $id;
    }
204111
public function getItem($key)
    {
        if (($find = $this->searchItem($key)) !== null) {
            return $find;
        }

        throw new \Exception(htmlspecialchars("The item $key was not found."));
    }
1056245
public function get($resourceName)
    {
        if (!$this->has($resourceName)) {
            throw new Exception('Resource with name "'.$resourceName.'" not found');
        }

        return $this->items[$resourceName];
    }
906857
private function get( $key )
	{
		if ( isset($this->serverData[ $key ]) )
		{
			return $this->serverData[ $key ];
		}
		else
		{
			return null;
		}
	}