static/ext/src/class/Base.js
function(fromClass, members) {
            //<debug>
            Ext.classSystemMonitor && Ext.classSystemMonitor(this, 'Ext.Base#borrow', arguments);
            //</debug>
            
            var prototype = this.prototype,
                fromPrototype = fromClass.prototype,
                //<debug>
                className = Ext.getClassName(this),
                //</debug>
                i, ln, name, fn, toBorrow;

            members = Ext.Array.from(members);

            for (i = 0,ln = members.length; i < ln; i++) {
                name = members[i];

                toBorrow = fromPrototype[name];

                if (typeof toBorrow == 'function') {
                    fn = Ext.Function.clone(toBorrow);

                    //<debug>
                    if (className) {
                        fn.displayName = className + '#' + name;
                    }
                    //</debug>

                    fn.$owner = this;
                    fn.$name = name;

                    prototype[name] = fn;
                }
                else {
                    prototype[name] = toBorrow;
                }
            }

            return this;
        }
function(fromClass, members) {
            //<debug>
            Ext.classSystemMonitor && Ext.classSystemMonitor(this, 'Ext.Base#borrow', arguments);
            //</debug>
            
            var prototype = this.prototype,
                fromPrototype = fromClass.prototype,
                //<debug>
                className = Ext.getClassName(this),
                //</debug>
                i, ln, name, fn, toBorrow;

            members = Ext.Array.from(members);

            for (i = 0,ln = members.length; i < ln; i++) {
                name = members[i];

                toBorrow = fromPrototype[name];

                if (typeof toBorrow == 'function') {
                    fn = Ext.Function.clone(toBorrow);

                    //<debug>
                    if (className) {
                        fn.displayName = className + '#' + name;
                    }
                    //</debug>

                    fn.$owner = this;
                    fn.$name = name;

                    prototype[name] = fn;
                }
                else {
                    prototype[name] = toBorrow;
                }
            }

            return this;
        }
function ( fromClass , members ) { //<debug> Ext . classSystemMonitor && Ext . classSystemMonitor ( this , 'Ext.Base#borrow' , arguments ) ; //</debug> var prototype = this . prototype , fromPrototype = fromClass . prototype , //<debug> className = Ext . getClassName ( this ) , //</debug> i , ln , name , fn , toBorrow ; members = Ext . Array . from ( members ) ; for ( i = 0 , ln = members . length ; i < ln ; i ++ ) { name = members [ i ] ; toBorrow = fromPrototype [ name ] ; if ( typeof toBorrow == 'function' ) { fn = Ext . Function . clone ( toBorrow ) ; //<debug> if ( className ) { fn . displayName = className + '#' + name ; } //</debug> fn . $owner = this ; fn . $name = name ; prototype [ name ] = fn ; } else { prototype [ name ] = toBorrow ; } } return this ; }
Borrow another class' members to the prototype of this class.

Ext.define('Bank', {
money: '$$$',
printMoney: function() {
alert('$$$$$$$');
}
});

Ext.define('Thief', {
...
});

Thief.borrow(Bank, ['money', 'printMoney']);

var steve = new Thief();

alert(steve.money); // alerts '$$$'
steve.printMoney(); // alerts '$$$$$$$'

@param {Ext.Base} fromClass The class to borrow members from
@param {Array/String} members The names of the members to borrow
@return {Ext.Base} this
@static
@inheritable
@private
Borrow another class members to the prototype of this class .