Aerys\VhostContainer::getDefaultHost PHP Method

getDefaultHost() public method

Retrieve the group's default host
public getDefaultHost ( ) : Vhost
return Vhost
    public function getDefaultHost() : Vhost
    {
        if ($this->defaultHost) {
            return $this->defaultHost;
        } elseif ($this->cachedVhostCount) {
            return current($this->vhosts);
        } else {
            throw new \LogicException("Cannot retrieve default host; no Vhost instances added to the group");
        }
    }