public function setProtocol($protocol)
    {
        $allowedProtocols = array('http', 'https');

        $protocol = strtolower( $protocol );

        if ( !in_array( $protocol,$allowedProtocols ) ) {
            throw new Exception('Unsupported Protocol: ' . $protocol . '. Supported protocols are: ' . join($allowedProtocols, ', '));
        }

        $this->protocol = $protocol;
    }