Returns the server with the given name.

@param string $serverName The server name.

@return Server The server.

@throws NoSuchServerException If the server does not exist.
436592
public function get($serverName)
    {
        if (!isset($this->servers[$serverName])) {
            throw NoSuchServerException::forServerName($serverName);
        }

        return $this->servers[$serverName];
    }
282352
public function getConnection($connectionName = null)
    {
        /** @var Configuration $configuration */
        $configuration = $this->get('configuration');
        $connectionName = null !== $connectionName ?: $configuration['connection_name'];
        
        return $this->getConnectionManager()->getConnection($connectionName);
    }
829407
public function getByServer($serverName)
    {
        if(isset($this->cache[$serverName]))
        {
            return $this->cache[$serverName];
        }
        $namespace = ServerManage::getServer($serverName)->getConfig()['namespace'];
        if('\\' !== substr($namespace, -1, 1))
        {
            $namespace .= '\\';
        }
        $result = [];
        foreach(AnnotationManager::getAnnotationPoints($this->controllerAnnotationClass, 'Class') as $className => $option)
        {
            if(Text::startwith($option['class'], $namespace))
            {
                $result[$option['class']] = $option;
            }
        }
        $this->cache[$serverName] = $result;
        return $result;
    }
375505
public function hostname(Hostname $hostname = null): ?Hostname
    {
        if ($hostname !== null) {
            $this->app->instance(CurrentHostname::class, $hostname);

            $this->emitEvent(new Events\Hostnames\Switched($hostname));

            return $hostname;
        }

        return $this->app->make(CurrentHostname::class);
    }
236897
final public static function getServerInfo(string $infoname):string
    {
        switch ($infoname) {
            case 'PHP_VERSION':
                $rs = phpversion();
                break;
            default:
                try {
                    $rs = $_SERVER[$infoname];
                } catch (\Exception $e) {
                    throw new Server500(new \ArrayObject(array("explain" =>
                        "Core Error: The server info $infoname does not exist", "solution" => "Check your keyword")));
                }
                break;
        }
        return ($rs);
    }
285649
public function get($serviceName) {
        $container = $this->serviceData[$serviceName] ?? NULL;
        if($container) {
            return $container->getInstance();
        }

        if(in_array($serviceName, $this->getSelfReferenceNames()))
            return $this;

        $e = new UnknownServiceException("Service $serviceName is not registered", E_USER_ERROR);
        $e->setServiceName($serviceName);
        throw $e;
    }
555739
public function execute($hostname)
    {
        $server = $this->getContext();

        $result = @file($this->location);

        $response = new Response\NetDnsResponse();
        $response->setHostname($hostname);
        $response->setServer($server);
        $response->setQuery($this->location);

        if ($result) {
            foreach ($result as $value) {
                if (trim($hostname) === trim($value)) {
                    $response->listed();
                }
            }
        }

        return $response;
    }
1334081
public function createServer($name)
    {
        $server = new Server();
        if (in_array($name, $this->getKnownServers())) {
            $server
                ->setChecker(new Checker())
                ->setStartMultiLine($this->servers[$name]['directives']['start_multiline'])
                ->setEndMultiLine($this->servers[$name]['directives']['end_multiline'])
                ->setSimpleDirective($this->servers[$name]['directives']['simple'])
                ->setBinaries($this->servers[$name]['controlers'])
                ->setDetectionParameter($this->servers[$name]['switch']['detect'])
                ->setBeforeMethods($this->servers[$name]['parser']['before'])
                ->setAfterMethods($this->servers[$name]['parser']['after'])
                ->setDumperSimpleDirective($this->servers[$name]['dumper']['simple'])
                ->setDumperStartDirective($this->servers[$name]['dumper']['start_multiline'])
                ->setDumperEndDirective($this->servers[$name]['dumper']['end_multiline'])
                ->setKnownDirectives($this->servers[$name]['known_directives'])
            ;
        }

        return $server;
    }
837345
private function _getServerOrFail($queueName, $serverTag) : RouterServer
    {
        $server = $this->registry->findServerForQueue($queueName, $serverTag);
        if (!$server) {
            throw new ServerNotConfigured('Server not found for queue: "' .$queueName. '" or tag: "'.$serverTag.'"');
        }
        
        return $server;
    }
625392
public function getParameter($parameterName)
    {
        if (!isset($this->parameters[$parameterName])) {
            throw NoSuchParameterException::forParameterName($parameterName, $this->name);
        }

        return $this->parameters[$parameterName];
    }
155302
public function getVHostConfigAdv($serverName, $vhostName)
    {
        list($response) = $this->getVHostConfigAdvWithHttpInfo($serverName, $vhostName);
        return $response;
    }
906857
private function get( $key )
	{
		if ( isset($this->serverData[ $key ]) )
		{
			return $this->serverData[ $key ];
		}
		else
		{
			return null;
		}
	}
284367
public function getCommand($serverName, $commandName)
    {
        $index = $serverName . '::' . $commandName;
        if (!array_key_exists($index, $this->commands)) {
            if (!in_array($serverName, $this->servers)) {
                throw new MissingServerException($serverName);
            }

            throw new MissingCommandException($serverName, $commandName);
        }

        return $this->commands[$index];
    }
922146
public function server(string $key, $default = null)
{
  return $this->server->has($key) ? $this->server->get($key) : $default;
}
739200
function getClient($clientName)
    {
        if (! isset($this->clients[$clientName]) )
            // if not client constructed look for lazy options:
            $this->clients[$clientName] = $this->_attainClient($clientName);


        return $this->clients[$clientName];
    }
1058243
public function server( $key, $default = null ) {
		if ( !isset( $this->SERVER[strtoupper( $key )] ) ) 
		{
			return $default;
		}
		return $this->SERVER[strtoupper( $key )];
	}
1006092
public function getServerValue($key)
    {
        $key    = strtolower($key);
        $server = $this->getServer();
        $return = null;
        if (isset($server[$key])) {
            $return = $server[$key];
        }
        unset($server);
        return $return;
    }