Aerys\VhostContainer::preventCryptoSocketConflict PHP Method

preventCryptoSocketConflict() private method

private preventCryptoSocketConflict ( Vhost $new )
$new Vhost
    private function preventCryptoSocketConflict(Vhost $new)
    {
        foreach ($this->vhosts as $old) {
            // If both hosts are encrypted or both unencrypted there is no conflict
            if ($new->isEncrypted() == $old->isEncrypted()) {
                continue;
            }
            foreach ($old->getInterfaces() as list($address, $port)) {
                if (in_array($port, $new->getPorts($address))) {
                    throw new \LogicException(sprintf("Cannot register encrypted host `%s`; unencrypted " . "host `%s` registered on conflicting port `%s`", $new->IsEncrypted() ? $new->getName() : $old->getName() ?: "*", $new->IsEncrypted() ? $old->getName() : $new->getName() ?: "*", "{$address}:{$port}"));
                }
            }
        }
    }