private function cleanHost($host)
    {
        // communicate via http by default if none is assigned
        if (strpos($host, 'http://') === false || strpos($host, 'https://')) {
            $host = 'http://' . $host;
        }

        // remove / at the end
        $host = rtrim($host, '/');

        return $host;
    }
private function cleanHost($host)
    {
        // communicate via http by default if none is assigned
        if (strpos($host, 'http://') === false || strpos($host, 'https://')) {
            $host = 'http://' . $host;
        }

        // remove / at the end
        $host = rtrim($host, '/');

        return $host;
    }
private function cleanHost ( $ host ) { // communicate via http by default if none is assigned if ( strpos ( $ host , 'http://' ) === false || strpos ( $ host , 'https://' ) ) { $ host = 'http://' . $ host ; } // remove / at the end $ host = rtrim ( $ host , '/' ) ; return $ host ; }
Helper method to clean the host url

@param string $host

@return string $host
Helper method to clean the host url