public/ckeditor/4.4dev/core/resourcemanager.js
function( names, callback, scope ) {
		// Ensure that we have an array of names.
		if ( !CKEDITOR.tools.isArray( names ) )
			names = names ? [ names ] : [];

		var loaded = this.loaded,
			registered = this.registered,
			urls = [],
			urlsNames = {},
			resources = {};

		// Loop through all names.
		for ( var i = 0; i < names.length; i++ ) {
			var name = names[ i ];

			if ( !name )
				continue;

			// If not available yet.
			if ( !loaded[ name ] && !registered[ name ] ) {
				var url = this.getFilePath( name );
				urls.push( url );
				if ( !( url in urlsNames ) )
					urlsNames[ url ] = [];
				urlsNames[ url ].push( name );
			} else {
				resources[ name ] = this.get( name );
			}
		}

		CKEDITOR.scriptLoader.load( urls, function( completed, failed ) {
			if ( failed.length ) {
				throw '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames[ failed[ 0 ] ].join( ',' ) +
					'" was not found at "' + failed[ 0 ] + '".';
			}

			for ( var i = 0; i < completed.length; i++ ) {
				var nameList = urlsNames[ completed[ i ] ];
				for ( var j = 0; j < nameList.length; j++ ) {
					var name = nameList[ j ];
					resources[ name ] = this.get( name );

					loaded[ name ] = 1;
				}
			}

			callback.call( scope, resources );
		}, this );
	}
function( names, callback, scope ) {
		// Ensure that we have an array of names.
		if ( !CKEDITOR.tools.isArray( names ) )
			names = names ? [ names ] : [];

		var loaded = this.loaded,
			registered = this.registered,
			urls = [],
			urlsNames = {},
			resources = {};

		// Loop through all names.
		for ( var i = 0; i < names.length; i++ ) {
			var name = names[ i ];

			if ( !name )
				continue;

			// If not available yet.
			if ( !loaded[ name ] && !registered[ name ] ) {
				var url = this.getFilePath( name );
				urls.push( url );
				if ( !( url in urlsNames ) )
					urlsNames[ url ] = [];
				urlsNames[ url ].push( name );
			} else {
				resources[ name ] = this.get( name );
			}
		}

		CKEDITOR.scriptLoader.load( urls, function( completed, failed ) {
			if ( failed.length ) {
				throw '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames[ failed[ 0 ] ].join( ',' ) +
					'" was not found at "' + failed[ 0 ] + '".';
			}

			for ( var i = 0; i < completed.length; i++ ) {
				var nameList = urlsNames[ completed[ i ] ];
				for ( var j = 0; j < nameList.length; j++ ) {
					var name = nameList[ j ];
					resources[ name ] = this.get( name );

					loaded[ name ] = 1;
				}
			}

			callback.call( scope, resources );
		}, this );
	}
function ( names , callback , scope ) { // Ensure that we have an array of names. if ( ! CKEDITOR . tools . isArray ( names ) ) names = names ? [ names ] : [ ] ; var loaded = this . loaded , registered = this . registered , urls = [ ] , urlsNames = { } , resources = { } ; // Loop through all names. for ( var i = 0 ; i < names . length ; i ++ ) { var name = names [ i ] ; if ( ! name ) continue ; // If not available yet. if ( ! loaded [ name ] && ! registered [ name ] ) { var url = this . getFilePath ( name ) ; urls . push ( url ) ; if ( ! ( url in urlsNames ) ) urlsNames [ url ] = [ ] ; urlsNames [ url ] . push ( name ) ; } else { resources [ name ] = this . get ( name ) ; } } CKEDITOR . scriptLoader . load ( urls , function ( completed , failed ) { if ( failed . length ) { throw '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames [ failed [ 0 ] ] . join ( ',' ) + '" was not found at "' + failed [ 0 ] + '".' ; } for ( var i = 0 ; i < completed . length ; i ++ ) { var nameList = urlsNames [ completed [ i ] ] ; for ( var j = 0 ; j < nameList . length ; j ++ ) { var name = nameList [ j ] ; resources [ name ] = this . get ( name ) ; loaded [ name ] = 1 ; } } callback . call ( scope , resources ) ; } , this ) ; }
Loads one or more resources.

CKEDITOR.plugins.load( 'myplugin', function( plugins ) {
alert( plugins[ 'myplugin' ] ); // object
} );

@param {String/Array} name The name of the resource to load. It may be a
string with a single resource name, or an array with several names.
@param {Function} callback A function to be called when all resources
are loaded. The callback will receive an array containing all loaded names.
@param {Object} [scope] The scope object to be used for the callback call.
Loads one or more resources .