final public static function mercurefile()
    {
        $env = FrameworkEnvironment::getFileEnv(FEnv::get("framework.env"));
        if (strpos($_SERVER['REQUEST_URI'], $env) == false) {
            $env = "";
        } else {
            $env = "/".$env;
        }

        $url = $env;

        $base = (isset($_SERVER['SCRIPT_NAME']) && $_SERVER['SCRIPT_NAME'] != "")? $_SERVER['SCRIPT_NAME'] : "";

        if (strpos(
            $_SERVER['REQUEST_URI'],
            FrameworkEnvironment::getFileEnv(FEnv::get("framework.env"))
        ) == false) {
            $rm = explode('/', $base);
            $rm = array_values(Routing::removeEmptyData($rm));
            $rm = array_values($rm);
            $key = array_search(FrameworkEnvironment::getFileEnv(FEnv::get("framework.env")), $rm);
            unset($rm[$key]);
            $rm = array_values($rm);
            $base = implode("/", $rm);
            if (isset($base[0]) && $base[0] != "/") {
                $base = "/".$base;
            }
        }

        return ("<script type='text/javascript' src='".FEnv::get("host.web.components")."libs/mercure/config_files/".
            ((FEnv::get("app.is_components"))?
                "map.merc.base.js" : "map.merc.js")."'></script>\n".
                "<script type='text/javascript' src='".
                FEnv::get("host.web.components")."libs/mercure/libs/js/Mercure.js' id='mercure_app_referer' 
                referer-app='".FEnv::get("app.call")."' base-url='".$base.$url."'></script>");
    }
final public static function mercurefile()
    {
        $env = FrameworkEnvironment::getFileEnv(FEnv::get("framework.env"));
        if (strpos($_SERVER['REQUEST_URI'], $env) == false) {
            $env = "";
        } else {
            $env = "/".$env;
        }

        $url = $env;

        $base = (isset($_SERVER['SCRIPT_NAME']) && $_SERVER['SCRIPT_NAME'] != "")? $_SERVER['SCRIPT_NAME'] : "";

        if (strpos(
            $_SERVER['REQUEST_URI'],
            FrameworkEnvironment::getFileEnv(FEnv::get("framework.env"))
        ) == false) {
            $rm = explode('/', $base);
            $rm = array_values(Routing::removeEmptyData($rm));
            $rm = array_values($rm);
            $key = array_search(FrameworkEnvironment::getFileEnv(FEnv::get("framework.env")), $rm);
            unset($rm[$key]);
            $rm = array_values($rm);
            $base = implode("/", $rm);
            if (isset($base[0]) && $base[0] != "/") {
                $base = "/".$base;
            }
        }

        return ("<script type='text/javascript' src='".FEnv::get("host.web.components")."libs/mercure/config_files/".
            ((FEnv::get("app.is_components"))?
                "map.merc.base.js" : "map.merc.js")."'></script>\n".
                "<script type='text/javascript' src='".
                FEnv::get("host.web.components")."libs/mercure/libs/js/Mercure.js' id='mercure_app_referer' 
                referer-app='".FEnv::get("app.call")."' base-url='".$base.$url."'></script>");
    }
final public static function mercurefile ( ) { $ env = FrameworkEnvironment :: getFileEnv ( FEnv :: get ( "framework.env" ) ) ; if ( strpos ( $ _SERVER [ 'REQUEST_URI' ] , $ env ) == false ) { $ env = "" ; } else { $ env = "/" . $ env ; } $ url = $ env ; $ base = ( isset ( $ _SERVER [ 'SCRIPT_NAME' ] ) && $ _SERVER [ 'SCRIPT_NAME' ] != "" ) ? $ _SERVER [ 'SCRIPT_NAME' ] : "" ; if ( strpos ( $ _SERVER [ 'REQUEST_URI' ] , FrameworkEnvironment :: getFileEnv ( FEnv :: get ( "framework.env" ) ) ) == false ) { $ rm = explode ( '/' , $ base ) ; $ rm = array_values ( Routing :: removeEmptyData ( $ rm ) ) ; $ rm = array_values ( $ rm ) ; $ key = array_search ( FrameworkEnvironment :: getFileEnv ( FEnv :: get ( "framework.env" ) ) , $ rm ) ; unset ( $ rm [ $ key ] ) ; $ rm = array_values ( $ rm ) ; $ base = implode ( "/" , $ rm ) ; if ( isset ( $ base [ 0 ] ) && $ base [ 0 ] != "/" ) { $ base = "/" . $ base ; } } return ( "<script type='text/javascript' src='" . FEnv :: get ( "host.web.components" ) . "libs/mercure/config_files/" . ( ( FEnv :: get ( "app.is_components" ) ) ? "map.merc.base.js" : "map.merc.js" ) . "'></script>\n" . "<script type='text/javascript' src='" . FEnv :: get ( "host.web.components" ) . "libs/mercure/libs/js/Mercure.js' id='mercure_app_referer' 
                referer-app='" . FEnv :: get ( "app.call" ) . "' base-url='" . $ base . $ url . "'></script>" ) ; }
Get js routing file
@return string return js routing file
@throws \Exception
Get js routing file