Redaxscript\Server\Protocol::getOutput PHP Method

getOutput() public method

get the output
Since: 2.4.0
public getOutput ( ) : string
return string
    public function getOutput()
    {
        $output = $this->_request->getServer('HTTPS') === 'off' || !$this->_request->getServer('HTTPS') ? 'http' : 'https';
        return $output;
    }

Usage Example

 /**
  * testProtocol
  *
  * @since 2.4.0
  */
 public function testProtocol()
 {
     /* setup */
     $protocol = new Server\Protocol($this->_request);
     /* actual */
     $actual = $protocol->getOutput();
     /* compare */
     $this->assertEquals('http', $actual);
 }
Protocol