@param ActionInterface $action
@param callable        $callback

@return $this
500884
public function addAction(ActionInterface $action, $callback = null)
    {
        $this->queue[] = array(
            'action'   => $action,
            'callback' => $callback,
        );

        return $this;
    }
795764
public function callback(string $name, callable $callback): self
    {
        $this->callbacks[$name] = $callback;
        return $this;
    }
897840
public function setAction($action)
	{
		if (!in_array($action, self::$validActions))
		{
			// @codeCoverageIgnoreStart
			throw new \LogicException('Action has to be one of the following: %s', implode(', ', self::$validActions));
			// @codeCoverageIgnoreEnd
		}
		$this->action = $action;

		return $this;
	}
1113008
public function when($callback)
    {
        $this->filters[] = is_callable($callback) ? $callback : function () use ($callback) {
            return $callback;
        };

        return $this;
    }
826907
public function action(callable $value = null)
    {
        if (null === $value) {
            return $this->action;
        }
        $this->action = $value;
        return $this;
    }
1148843
private function callActionCallable($action, $result)
    {
        if (isset($this->actionsCallable[$action]) && is_callable($this->actionsCallable[$action])) {
            call_user_func($this->actionsCallable[$action], $result);
        }
    }
309092
public function group($name, $action, Closure $callback)
    {
        static::$groups[$name] = [
            'action' => $action,
            'callback' => $callback
        ];

        return $this;
    }
508624
public function action(callable $action = null)
    {
        if (\func_num_args() === 0) {
            return $this->_action;
        }

        $this->_action = $action;

        return $this;
    }
781070
public function tap(callable $action)
    {
        return new Enumerator(
            function () use($action) {
                foreach ($this->each() as $k => $v) {
                    call_user_func($action, $v, $k);
                    yield $k => $v;
                }
            }
        );
    }
677438
public function actionResolver($action)
    {
        if(is_string($action)) {
            $this->setFunctionName(Str::camel($action));
        } elseif (is_callable($action)) {
            $this->setCallback($action);
        } else {
            $this->setData($action);
        }

        return $this;
    }
1340701
public static function handleFilter($action = '')
    {
        if (!$action) {
            return true;
        }

        if (self::hasFilter($action)) {
            $callback = self::$filters[$action];
            return $callback();
        }

        return false;
    }
1040387
public function addAction($action)
    {
        if (!$action instanceof ActionInterface) {
            return $this;
        }

        $name = $action->getIdentifier();

        if (empty($name)) {
            return $this;
        }

        $this->actions[] = $action;

        return $this;
    }
579758
public function action($action = null)
    {
        if (!is_null($action)) {
            $this->action = $action;
            return $this;
        } else {
            return $this->action ?: '';
        }
    }
325454
public function dispatchAction($action = false)
    {
        $action = Dispatcher::formatActionName($action);
        return $this->callAction($action);
    }
886816
public function dispatchUntil(ActionEvent $event, callable $callback): void
    {
        foreach ($this->getListeners($event) as $listenerHandler) {
            $listener = $listenerHandler->getActionEventListener();
            $listener($event);

            if ($event->propagationIsStopped()) {
                return;
            }
            if ($callback($event) === true) {
                return;
            }
        }
    }
1312219
public function setCallbackData($callbackData)
    {
        $this->callbackData = $callbackData;

        if ($callbackData !== null) {
            $this->url = null;
            $this->switchInlineQuery = null;
        }

        return $this;
    }
173099
public function map($method, $action, $callback){
		$route = new Route($method, $action, $callback);
		array_push($this->routes, $route);
		return $route;
	}