List of handlers provided by this content instance.

@property handlers
@type Object
 Public {{{1
199609
function init(path, name) {  // {{{2
/**
 * Class constructor
 *
 * @param name {String} Name of HttpContent instance
 * @param path {String} Path to content
 *
 * @method init
 */

  this.modules = {};
  this.handlers = {};
  this.scripts = [];
  this.styles = [];

  this.path = path || Path.dirname(this.O.module.filename);
  this.name = name || this.O.packageName || this.O.package.packageName;

//  O.log.debug('Content', this.toString());

  Http.addContent(this);

  this.addFiles && this.addFiles();
}
396462
def handlers(self):
        """"""
        if getattr(self, '_http'):
            yield from self.http.handlers()
        if getattr(self, '_cli'):
            yield from self.cli.handlers()
449207
function (event, handler) {
        var _h = this._$handlers;

        if (!event) {
            this._$handlers = {};
            return this;
        }

        if (handler) {
            if (_h[event]) {
                var newList = [];
                for (var i = 0, l = _h[event].length; i < l; i++) {
                    if (_h[event][i].h !== handler) {
                        newList.push(_h[event][i]);
                    }
                }
                _h[event] = newList;
            }

            if (_h[event] && _h[event].length === 0) {
                delete _h[event];
            }
        }
        else {
            delete _h[event];
        }

        return this;
    }
596275
def get_handlers(self, event: str) -> T.List[T.Callable]:
        """"""

        return list(self._events.get(event, []))
1167272
def remove_handlers_bound_to_instance(self, obj):
        
        for handler in self.handlers:
            if handler.im_self == obj:
                self -= handler
488925
public function handlers()
    {
        if ($this->_handlers === null) {
            $this->_handlers = Yii::$app->cache->lazy(function () {
                $models = PropertyHandlers::find()
                    ->orderBy(['sort_order' => SORT_ASC])
                    ->all();

                $handlers = [];
                foreach ($models as $model) {
                    $className = $model->class_name;
                    $handlers[$model->id] = new $className($model->default_config);
                }

                return $handlers;
            }, 'AllPropertyHandlers', 86400, PropertyHandlers::commonTag());
        }
        return $this->_handlers;
    }
296284
def _visit_handlers(handlers, visitor, prefix, suffixes):
    

    results = []
    for handler in handlers:
        for suffix in suffixes:
            func = getattr(handler, '{}_{}'.format(prefix, suffix).lower(), None)
            if func:
                results.append(visitor(suffix, func))

    return results
1263122
def handlers(self):
        """"""
        used = []
        for base_url, mapping in self.routes.items():
            for url, methods in mapping.items():
                for method, versions in methods.items():
                    for version, handler in versions.items():
                        if not handler in used:
                            used.append(handler)
                            yield handler
964821
function mountHandlers() {
  var self = this;

  for (var id in this.handlers) {
    this.handlers[id].forEach(function(handler) {
      self.namespace.on(id, handler);
    });
  }
}
1064071
function processControllerHandlers() {
  var self = this;
  var jsFile = this.regex.jsFile;
  var handlersPath = this.mvcpath + 'handlers';
  var relPath = self.relPath(this.mvcpath) + 'handlers';
  
  if (fs.existsSync(handlersPath)) {
    
    fs.readdirSync(handlersPath).forEach(function(dirname) {
      var dir = handlersPath + '/' + dirname;
      var stat = fs.statSync(dir);
      
      if (stat.isDirectory(dir)) {
        
        var handlers = self.handlers[dirname] = {};
        
        fileModule.walkSync(dir, function(dirPath, dirs, files) {
          for (var path,hkey,callback,file,i=0; i < files.length; i++) {
            file = files[i];
            path = dirPath + '/' + file;
            hkey = self.relPath(path, pathModule.basename(self.mvcpath) + '/handlers/' + dirname);
            if (jsFile.test(file)) {
              callback = protos.require(path, true); // Don't use module cache (allow reloading)
              if (callback instanceof Function) {
                handlers[hkey] = callback;
              } else {
                throw new Error(util.format("Expected a function for handler: %s/%s", dirname, file));
              }
            }
          }
        });
        
      }
      
    });
    
  }
  
  this.emit('handlers_loaded', self.handlers); // Emit regardless
  
}
132395
function () {
            this._handler = $B.bind( function (e) {
                var evt = {target: this, img: this.img, data: this._data};
    
                switch (e.type) {
                    case 'load':
                        evt.type = 'complete';
                        this._isComplete = true;
                        this.dispatch( 'complete', evt );
                        break;
                    case 'error':
                        this.dispatch( 'error', evt );
                        break;
                }
    
                this._removeEvents();
            }, this);
        }
603270
function callEnterHandlers(context) {
    var i, n;
    for (i = 0, n = this.enters.length; i < n; i++) {
      this.enters[i].call(this, context);
    }
  }
275531
function registerHandlers(handlers, commandStack) {
  forEach(handlers, function(handler, id) {
    commandStack.registerHandler(id, handler);
  });
}
903157
function getHandlersFromArgs(args, start) {
  assert.ok(args);

  args = Array.prototype.slice.call(args, start);

  function process(handlers, acc) {
    if (handlers.length === 0) {
      return acc;
    }

    var head = handlers.shift();
    if (Array.isArray(head)) {
      return process(head.concat(handlers), acc);
    } else {
      assert.func(head, 'handler');
      acc.push(head);
      return process(handlers, acc);
    }
  }

  return process(args, []);
}
1103316
function(name) {
        var self = this, found = false;
        if (!name) { return found; }
        utils.each(this._handlers, function(i) {
            if (name === this.name) {
                self._handlers.splice(i, 1);
                return (found = true, false);
            }
        });
        if (!found) {
            utils.each(this._lastHandlers, function(i) {
                if (name === this.name) {
                    self._lastHandlers.splice(i, 1);
                    return (found = true, false);
                }
            });
        }
        return found;
    }
135073
def inject_event_handlers
      states = @stm.instance_variable_get(:@states)
      states.each { |k, st|
        prev = st.entry_action
        st.entry_action = proc { |*args|
          on_entry_state(st.id, *args)
        }
        prev = st.exit_action
        st.exit_action = proc { |*args|
          on_exit_state(st.id, *args)
        }
      }
    end
905956
function (obj, eventType, eventHandler) {
			if (!obj.eventHandlers) { obj.eventHandlers = {}; }
			if (!obj.eventHandlers[eventType]) {
				obj.eventHandlers[eventType] = [];
			}
			if (eventHandler) {
				obj.eventHandlers[eventType].push(eventHandler);
			}
			return obj.eventHandlers[eventType];
		}