src/Utilities/Uri.php
public static function getFullUri($withoutHost = false)
    {
        $requestedUrl = Miscellaneous::getSafelyGlobalVariable(INPUT_SERVER, 'REQUEST_URI');

        /*
         * Unknown requested url?
         * Nothing to do
         */
        if (empty($requestedUrl)) {
            return '';
        }

        /*
         * Without host / server name?
         * All is done
         */
        if ($withoutHost) {
            return $requestedUrl;
        }

        return self::getServerNameOrIp(true) . $requestedUrl;
    }
public static function getFullUri($withoutHost = false)
    {
        $requestedUrl = Miscellaneous::getSafelyGlobalVariable(INPUT_SERVER, 'REQUEST_URI');

        /*
         * Unknown requested url?
         * Nothing to do
         */
        if (empty($requestedUrl)) {
            return '';
        }

        /*
         * Without host / server name?
         * All is done
         */
        if ($withoutHost) {
            return $requestedUrl;
        }

        return self::getServerNameOrIp(true) . $requestedUrl;
    }
public static function getFullUri ( $ withoutHost = false ) { $ requestedUrl = Miscellaneous :: getSafelyGlobalVariable ( INPUT_SERVER , 'REQUEST_URI' ) ; /*
         * Unknown requested url?
         * Nothing to do
         */ if ( empty ( $ requestedUrl ) ) { return '' ; } /*
         * Without host / server name?
         * All is done
         */ if ( $ withoutHost ) { return $ requestedUrl ; } return self :: getServerNameOrIp ( true ) . $ requestedUrl ; }
Returns full uri string

@param bool $withoutHost (optional) If is set to true, means that host / server name is omitted
@return string
Returns full uri string