Returns a callable data from the handler array
@param array $handlers
@param string|null $handler_id
@param string $name
@return array|object
@throws OutOfRangeException
349353
protected static function getCallable($handlers, $handler_id, $name)
    {
        if (isset($handler_id)) {

            if (empty($handlers[$handler_id]['handlers'][$name])) {
                throw new OutOfRangeException("Unknown handler ID $handler_id and/or method name $name");
            }

            return $handlers[$handler_id]['handlers'][$name];
        }

        if (empty($handlers['handlers'][$name])) {
            throw new OutOfRangeException("Unknown handler method name $name");
        }

        return $handlers['handlers'][$name];
    }
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, []);
}
908663
public function getServers($org_id = null, $name = null)
    {
        list($response) = $this->getServersWithHttpInfo($org_id, $name);
        return $response;
    }
569362
public function one($name, $handler, $data=array())
	{
	    $this->ensureEvents();
	    
	    $this->_events[$name] = [];
	    
	    $this->_events[$name][] = $data ? [$handler, $data] : [$handler];
	}
254794
public function get($id)
    {
        try {
            $handler = $this->resolve($id);

            if ($handler instanceof RequestHandlerInterface) {
                return $handler;
            }

            return new CallableHandler($handler);
        } catch (NotFoundExceptionInterface $exception) {
            throw $exception;
        } catch (Exception $exception) {
            throw new class("Error getting the handler $id", 0, $exception) extends Exception implements
                ContainerExceptionInterface {
            };
        }
    }
759190
protected function & setHandler (array & $handlers, callable $handler, $priorityIndex = NULL) {
		// there is possible to call any `callable` as closure function in variable
		// except forms like `'ClassName::methodName'` and `['childClassName', 'parent::methodName']`
		// and `[$childInstance, 'parent::methodName']`.
		$closureCalling = (
			(is_string($handler) && strpos($handler, '::') !== FALSE) ||
			(is_array($handler) && strpos($handler[1], '::') !== FALSE)
		) ? FALSE : TRUE;
		if ($priorityIndex === NULL) {
			$handlers[] = [$closureCalling, $handler];
		} else {
			if (isset($handlers[$priorityIndex])) {
				array_splice($handlers, $priorityIndex, 0, [$closureCalling, $handler]);
			} else {
				$handlers[$priorityIndex] = [$closureCalling, $handler];
			}
		}
		/** @var $this \MvcCore\Application */
		return $this;
	}
743151
public function hasHandlers($name, $handler = null)
    {
        $args = new Args;
        $this->runByHandler($name, $handler, [$this, 'hasHandler'], $args);
        $result = $args->get('hasHandler');

        return $result;
    }
839183
public function run($handler_id, &$submitted, array $options = array())
    {
        $result = null;
        $this->hook->attach('validator.run.before', $submitted, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $result = $this->callHandler($handler_id, $submitted, $options);
        $this->hook->attach('validator.run.after', $submitted, $options, $result, $this);

        if ($result === true) {
            return true;
        }

        return empty($result) ? $this->translation->text('Failed validation') : $result;
    }
330412
def _get_handler(self, node_id):
        """"""
        handler = self._get_attrs(node_id).get(self.HANDLER, self._default_handler)

        # Here we make sure the handler is an instance of `BasicNodeHandler` or inherited
        # types. While generally being bad Python practice, we still need it here as an
        # invalid handler can cause IDA to crash.
        if not isinstance(handler, BasicNodeHandler):
            idaapi.msg(("Invalid handler for node {}: {}. All handlers must inherit from"
                        "`BasicNodeHandler`.").format(node_id, handler))
            handler = self._default_handler
        return handler
32023
public function getHandler($handler_id)
    {
        $handlers = $this->getHandlers();
        return empty($handlers[$handler_id]) ? array() : $handlers[$handler_id];
    }
77591
function findHandlers( arr, name, callback, context ) {
            return $.grep( arr, function( handler ) {
                return handler &&
                        (!name || handler.e === name) &&
                        (!callback || handler.cb === callback ||
                        handler.cb._cb === callback) &&
                        (!context || handler.ctx === context);
            });
        }
527144
public static function call($handlers, $handler_id, $method, $arguments = array())
    {
        $callback = static::get($handlers, $handler_id, $method);
        return call_user_func_array($callback, $arguments);
    }
1283513
public function getServersAsyncWithHttpInfo($org_id = null, $name = null)
    {
        $returnType = '\Wodby\Api\Model\Server[]';
        $request = $this->getServersRequest($org_id, $name);

        return $this->client
            ->sendAsync($request, $this->createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    $responseBody = $response->getBody();
                    if ($returnType === '\SplFileObject') {
                        $content = $responseBody; //stream goes to serializer
                    } else {
                        $content = $responseBody->getContents();
                        if ($returnType !== 'string') {
                            $content = json_decode($content);
                        }
                    }

                    return [
                        ObjectSerializer::deserialize($content, $returnType, []),
                        $response->getStatusCode(),
                        $response->getHeaders()
                    ];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
457867
public function getRequestHandler($handlerName)
    {
        if (!isset($this->handlers[$handlerName])) {
            throw new \OutOfBoundsException('Request handler not registered: ' . $handlerName);
        }
        return $this->handlers[$handlerName];
    }
952613
function getHandlers (name, callback, context) {
    var events = [];
    if (!callback && !context) {
        if (name) {
            return (this._events && this._events[name]) || [];
        } else {
            return this._events;
        }
    }
    _.each(this._events, function (value, key) {
        if (!name || key === name) {
            value.forEach(function (event) {
                if ((!callback || event.callback === callback) && (!context || event.context === context)) {
                    events.push(event);
                }
            });
        }
    });
    return events;
}
160354
public function find( $name ) {

		if ( ! is_array( $this->initialized ) ) {
			$this->initialized = [];

			/**
			 * Fires right before the first handler is to be registered.
			 *
			 * @param HandlersRegistry $handlers_registry
			 */
			do_action( self::ACTION_REGISTER, $this );
		}

		$name = $name instanceof HandlerInterface ? spl_object_hash( $name ) : (string) $name;

		if ( ! $this->has_handler( $name ) ) {
			return NULL;
		}

		$handler = $this->handlers[ $name ];

		if ( ! in_array( $name, $this->initialized, TRUE ) ) {
			$this->initialized[] = $name;

			/**
			 * Fires right after a handler has been registered.
			 *
			 * @param HandlerInterface   $handler
			 * @param string             $name
			 * @param ProcessorsRegistry $processors_registry
			 */
			do_action( self::ACTION_SETUP, $handler, $name, $this->processors_registry );
		}

		return $handler;
	}
818778
public function of($name, Closure $callback = null): Handler
    {
        if ($name instanceof Closure) {
            $callback = $name;
            $name = $this->getDefaultDriver();
        }

        $instance = $this->make($name);

        if ($instance instanceof Handler && ! \is_null($callback)) {
            $callback($instance);
        }

        return $instance;
    }