public function setProtocol($protocol)
    {
        $lowerProtocol = strtolower($protocol);

        // handle special cases where protocol is not
        // formatted as intended yet.

        if ("websocket" == $lowerProtocol)
            $lowerProtocol = "ws";

        if (in_array($lowerProtocol, ["https", "wss"])) {
            // provided secure type of protocol
            $this->setUseSsl(true);
            $lowerProtocol = substr($lowerProtocol, 0, -1);
        }

        $this->protocol = $lowerProtocol;
        return $this;
    }
public function setProtocol($protocol)
    {
        $lowerProtocol = strtolower($protocol);

        // handle special cases where protocol is not
        // formatted as intended yet.

        if ("websocket" == $lowerProtocol)
            $lowerProtocol = "ws";

        if (in_array($lowerProtocol, ["https", "wss"])) {
            // provided secure type of protocol
            $this->setUseSsl(true);
            $lowerProtocol = substr($lowerProtocol, 0, -1);
        }

        $this->protocol = $lowerProtocol;
        return $this;
    }
public function setProtocol ( $ protocol ) { $ lowerProtocol = strtolower ( $ protocol ) ; // handle special cases where protocol is not // formatted as intended yet. if ( "websocket" == $ lowerProtocol ) $ lowerProtocol = "ws" ; if ( in_array ( $ lowerProtocol , [ "https" , "wss" ] ) ) { // provided secure type of protocol $ this -> setUseSsl ( true ) ; $ lowerProtocol = substr ( $ lowerProtocol , 0 , - 1 ) ; } $ this -> protocol = $ lowerProtocol ; return $ this ; }
This method should implement a protocol
setter which will be used to determine
which Protocol is used in the Base URL.

@param  string $protocol
@return \NEM\Contracts\HttpHandler
This method should implement a protocol setter which will be used to determine which Protocol is used in the Base URL .