src/aria/pageEngine/SiteRootModule.js
function (args) {
            var modules = args.modules;
            for (var i = 0; i < modules.length; i += 1) {
                var services = modules[i].services, refpath = modules[i].refpath, moduleInstance = this._utils.resolvePath(refpath, this);
                if (services) {
                    for (var service in services) {
                        if (services.hasOwnProperty(service) && !this.json.isMetadata(service)) {
                            if (this.services[service]) {
                                this.$logWarn(this.SERVICE_ALREADY_DEFINED, service);
                            }
                            if (ariaUtilsType.isFunction(moduleInstance[services[service]])) {
                                this.services[service] = ariaUtilsFunction.bind(moduleInstance[services[service]], moduleInstance);
                                if (this._serviceList[refpath]) {
                                    this._serviceList[refpath].push(service);
                                } else {
                                    this._serviceList[refpath] = [service];
                                }
                            } else {
                                this.$logError(this.SERVICE_METHOD_NOT_FOUND, [services[service],
                                        moduleInstance.$classpath]);
                            }
                        }
                    }
                }
            }
            this.connectBindings(args);
        }
function (args) {
            var modules = args.modules;
            for (var i = 0; i < modules.length; i += 1) {
                var services = modules[i].services, refpath = modules[i].refpath, moduleInstance = this._utils.resolvePath(refpath, this);
                if (services) {
                    for (var service in services) {
                        if (services.hasOwnProperty(service) && !this.json.isMetadata(service)) {
                            if (this.services[service]) {
                                this.$logWarn(this.SERVICE_ALREADY_DEFINED, service);
                            }
                            if (ariaUtilsType.isFunction(moduleInstance[services[service]])) {
                                this.services[service] = ariaUtilsFunction.bind(moduleInstance[services[service]], moduleInstance);
                                if (this._serviceList[refpath]) {
                                    this._serviceList[refpath].push(service);
                                } else {
                                    this._serviceList[refpath] = [service];
                                }
                            } else {
                                this.$logError(this.SERVICE_METHOD_NOT_FOUND, [services[service],
                                        moduleInstance.$classpath]);
                            }
                        }
                    }
                }
            }
            this.connectBindings(args);
        }
function ( args ) { var modules = args . modules ; for ( var i = 0 ; i < modules . length ; i += 1 ) { var services = modules [ i ] . services , refpath = modules [ i ] . refpath , moduleInstance = this . _utils . resolvePath ( refpath , this ) ; if ( services ) { for ( var service in services ) { if ( services . hasOwnProperty ( service ) && ! this . json . isMetadata ( service ) ) { if ( this . services [ service ] ) { this . $logWarn ( this . SERVICE_ALREADY_DEFINED , service ) ; } if ( ariaUtilsType . isFunction ( moduleInstance [ services [ service ] ] ) ) { this . services [ service ] = ariaUtilsFunction . bind ( moduleInstance [ services [ service ] ] , moduleInstance ) ; if ( this . _serviceList [ refpath ] ) { this . _serviceList [ refpath ] . push ( service ) ; } else { this . _serviceList [ refpath ] = [ service ] ; } } else { this . $logError ( this . SERVICE_METHOD_NOT_FOUND , [ services [ service ] , moduleInstance . $classpath ] ) ; } } } } } this . connectBindings ( args ) ; }
Exposes methods of module controllers as services
@param {Object} args
Exposes methods of module controllers as services