public static function getAmdLoader($bundle = null, $controller = null, $params = null, $allowAnonymous = false){

        $bundleMode   = \tao_helpers_Mode::is('production');
        $configUrl    = get_data('client_config_url');
        $requireJsUrl = Template::js('lib/require.js', 'tao');
        $bootstrapUrl = Template::js('loader/bootstrap.js', 'tao');

        $loader = new AmdLoader($configUrl, $requireJsUrl, $bootstrapUrl);

        if(\common_session_SessionManager::isAnonymous() && !$allowAnonymous) {
            $controller = 'controller/login';
            $bundle = Template::js('loader/login.min.js', 'tao');
        }

        if($bundleMode){
            return "<script src='" . Template::js('loader/vendor.min.js', 'tao') . "'></script>\n" .
                    $loader->getBundleLoader($bundle, $controller, $params);
        }

        return $loader->getDynamicLoader($controller, $params);
    }
public static function getAmdLoader($bundle = null, $controller = null, $params = null, $allowAnonymous = false){

        $bundleMode   = \tao_helpers_Mode::is('production');
        $configUrl    = get_data('client_config_url');
        $requireJsUrl = Template::js('lib/require.js', 'tao');
        $bootstrapUrl = Template::js('loader/bootstrap.js', 'tao');

        $loader = new AmdLoader($configUrl, $requireJsUrl, $bootstrapUrl);

        if(\common_session_SessionManager::isAnonymous() && !$allowAnonymous) {
            $controller = 'controller/login';
            $bundle = Template::js('loader/login.min.js', 'tao');
        }

        if($bundleMode){
            return "<script src='" . Template::js('loader/vendor.min.js', 'tao') . "'></script>\n" .
                    $loader->getBundleLoader($bundle, $controller, $params);
        }

        return $loader->getDynamicLoader($controller, $params);
    }
public static function getAmdLoader ( $ bundle = null , $ controller = null , $ params = null , $ allowAnonymous = false ) { $ bundleMode = \ tao_helpers_Mode :: is ( 'production' ) ; $ configUrl = get_data ( 'client_config_url' ) ; $ requireJsUrl = Template :: js ( 'lib/require.js' , 'tao' ) ; $ bootstrapUrl = Template :: js ( 'loader/bootstrap.js' , 'tao' ) ; $ loader = new AmdLoader ( $ configUrl , $ requireJsUrl , $ bootstrapUrl ) ; if ( \ common_session_SessionManager :: isAnonymous ( ) && ! $ allowAnonymous ) { $ controller = 'controller/login' ; $ bundle = Template :: js ( 'loader/login.min.js' , 'tao' ) ; } if ( $ bundleMode ) { return "<script src='" . Template :: js ( 'loader/vendor.min.js' , 'tao' ) . "'></script>\n" . $ loader -> getBundleLoader ( $ bundle , $ controller , $ params ) ; } return $ loader -> getDynamicLoader ( $ controller , $ params ) ; }
Create the AMD loader for the current context.
It will load login's modules for anonymous session.
Loads the bundle mode in production and the dynamic mode in debug.

@param string $bundle the bundle URL
@param string $controller the controller module id
@param array  $params additional parameters
@return string the script tag
Create the AMD loader for the current context . It will load login s modules for anonymous session . Loads the bundle mode in production and the dynamic mode in debug .