docs: function (lstCfg, itfWrap) {
  
                  var defaultScope = (lstCfg.scope) ? lstCfg.scope : null;
                  var src = itfWrap ? itfWrap : this;
                  var lsn;
                  for (var evt in lstCfg) {
                      if (!lstCfg.hasOwnProperty(evt)) {
                          continue;
                      }
                      lsn = lstCfg[evt];
                      if (evt == 'scope') {
                          continue;
                      }
                      // The comparison with null below is important, as
                      // an empty string is a valid event description.
                      if (evt != '*' && src.$events[evt] == null) {
                          // invalid event
                          this.$logError(this.UNDECLARED_EVENT, evt, src.$classpath);
                          continue;
                      }
                      if (lsn.$Callback) {
                          lsn = {
                              fn : function (evt, cb) {
                                  cb.call(evt);
                              },
                              scope : this,
                              args : lsn
                          };
                      } else if (!lsn.fn) {
                          // shortcut as in 'error' sample
                          if (!defaultScope) {
                              this.$logError(this.MISSING_SCOPE, evt);
                              continue;
                          }
                          lsn = {
                              fn : lsn,
                              scope : defaultScope,
                              once : lstCfg[evt].listenOnce
                              // we keep track of listeners which are meant to be called just once
                          };
                      } else {
                          // make a copy of lsn before changing it
                          lsn = {
                              fn : lsn.fn,
                              scope : lsn.scope,
                              args : lsn.args,
                              once : lstCfg[evt].listenOnce,
                              apply : lsn.apply,
                              resIndex : lsn.resIndex
                              // we keep track of listeners which are meant to be called just once
                          };
                          // lsn is an object as in 'start' or 'end' samples set default scope
                          if (!lsn.scope) {
                              lsn.scope = defaultScope;
                          }
                          if (!lsn.scope) {
                              this.$logError(this.MISSING_SCOPE, evt);
                              continue;
                          }
                      }
  
                      // add listener to _listeners
                      if (this._listeners == null) {
                          this._listeners = {};
                          this._listeners[evt] = [];
                      } else {
                          if (this._listeners[evt] == null) {
                              this._listeners[evt] = [];
                          }
                      }
                      // keep the interface under which the listener was registered:
                      lsn.src = src;
                      this._listeners[evt].push(lsn);
                  }
                  defaultScope = lsn = evt = null;
              }