public function addProtocol($protocol)
{
if (!in_array($protocol, [self::PROTOCOL_HTTP, self::PROTOCOL_HTTPS])) {
throw new InvalidProtocolException(sprintf('"%s" is not a valid protocol', $protocol));
}
if (!in_array($protocol, $this->protocols)) {
$this->protocols[] = $protocol;
}
}