Transform an "action" token into a method name

@param  string $action
@return string
426891
public static function getMethodFromAction(string $action): string
    {
        $method = str_replace(['.', '-', '_'], ' ', $action);
        $method = ucwords($method);
        $method = str_replace(' ', '', $method);
        $method = lcfirst($method);
        $method .= 'Action';
        return $method;
    }
709960
protected function mergeNamespaceGroup(array $action)
    {
        if (isset($this->groupAttributes['namespace']) && isset($action['uses'])) {
            $namespace = trim($this->groupAttributes['namespace'], '\\');

            $action['uses'] = $namespace ? $namespace.'\\'.$action['uses'] : $action['uses'];
        }

        return $action;
    }
695820
protected function getTemplateFile(string $action = null) : string
    {
        $path = '/controller/' . lcfirst($this->getControllerName()) . '/';

        return $path . ($action ? $action : $this->getActionName());
    }
1245877
protected function parseAction($action)
    {
        if ($action === $this->fullController) {
            return $this->action = null;
        }

        $this->action = strtolower(
            preg_replace(['/^get/', '/^post/', '/^put/', '/^patch/', '/^delete/'], '', $action)
        );
    }
21603
public function matchesAction($action)
    {
        $action = (array) $action;
        return $this->action === 'manage' || in_array($this->action, $action);
    }
166886
private function createCallableFromAction($action) : callable
    {
        // Check if this looks like it could be a class/method string
        if (!is_callable($action) && is_string($action)) {
            return $this->convertClassStringToFactory($action);
        }

        return $action;
    }
1160156
protected function formatAction($action)
    {
        if ($this->rootNamespace && ! (strpos($action, '\\') === 0)) {
            return $this->rootNamespace.'\\'.$action;
        } else {
            return trim($action, '\\');
        }
    }
645173
private function getActionFromParam($action)
    {
        $action = str_replace("-", "_", $action);
        if (substr($action, -1) === "/") {
            $action = substr($action, 0, -1);
        }

        return lcfirst(Inflector::camelize($action));
    }
1114771
protected function getIconClass($action) {
        if (in_array($action, ['add', 'remove', 'clone', 'drag-handle'])) {
            return $this->iconMap[$action];
        }

        if (YII_DEBUG) {
            throw new InvalidConfigException('Out of bounds, "' . $action . '" not found in your iconMap');
        }
        return '';
    }
914492
protected function getActionInformation(Action $action) {
        return [
            $action->getPattern(),
            $action->getName(),
            $action->getMethod(),
            $action->group->getName() . ', ' . $action->group->getPattern(),
            Formatter::shortArray($action->getMiddleware()),
            $action->getUses(),
            Formatter::boolean($action->register),
            Formatter::boolean($action->useSmoothState)
        ];
    }
238180
protected function methodName($action, $field)
    {
        if (substr($field, -1, 1) === 's' && $action != 'clear') {
            $field = substr($field, 0, -1);
        }

        return $action . ucfirst(strtolower($field));
    }
547166
protected function redirectToAction($action)
    {
        return $this->response->redirect([
            'for' => $this->router->getMatchedRoute()->getName(),
            'action' => $action
        ]);
    }
763011
private static String getActionString(int action) {

        switch (action) {

            case Constraint.RESTRICT :
                return Tokens.T_RESTRICT;

            case Constraint.CASCADE :
                return Tokens.T_CASCADE;

            case Constraint.SET_DEFAULT :
                return Tokens.T_SET + ' ' + Tokens.T_DEFAULT;

            case Constraint.SET_NULL :
                return Tokens.T_SET + ' ' + Tokens.T_NULL;

            default :
                return Tokens.T_NO + ' ' + Tokens.T_ACTION;
        }
    }
215706
protected function parseAction(string $action, string $method): string
    {
        if ('post' === $method) {
            return $this->getSlug().'_'.$action;
        }

        return $action;
    }
738516
protected function actionReferencesController($action)
    {
        if ($action instanceof Closure) {
            return false;
        }

        return is_string($action) || is_string(array_get($action, 'uses'));
    }
460841
protected function normalizeAction(string $action): string
    {
        $action = strtolower($action);
        $action = str_replace(['_', '-', '.'], ' ', $action);
        $action = ucwords($action);
        $action = str_replace(' ', '', $action);
        $action = lcfirst($action);

        return $action;
    }
529902
public function next(string $action = null): string
    {
        $this->message = $this->handle($action);

        if ($this->message instanceof Dispatcher)
        {
            return $this->message->next();
        }

        $response = $this->message;

        if (!($response instanceof MessageInterface))
        {
            $stream   = $this->factory->stream->createStream($response);
            $response = $this->message()->withBody($stream);
        }

        $this->setMessage($response);

        return (string)$this;
    }