If the action is a Controller string, a factory callable is returned to allow for lazy loading

@param  mixed $action
@return callable
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;
    }
454667
public function setAction ($action)
    {
        if ($action instanceof \Closure) {

            $this->action = $action;

            return $this;
        }

        $parts = explode('::', $action);

        if (count($parts) != 2) {

            throw new \LengthException('Malformed action string');
        }

        $this->validateRoutable($parts[0], $parts[1]);

        $this->action = $parts;

        return $this;

    }
1293852
public function canExecute($action)
    {
        $method  = 'can'.ucfirst($action);
        $methods = $this->getMixer()->getMethods();

        if (!isset($methods[$method]))
        {
            $actions = $this->getActions();
            $actions = array_flip($actions);

            $result = isset($actions[$action]);
        }
        else $result = $this->$method();

        return $result;
    }
1344994
public function setAction($action)
    {
        if (gettype($action) !== 'string') {
            throw new BadParametersException(
                sprintf(
                    ' The action type ("%s") must be a string',
                    gettype($action)
                )
            );
        }
        $this->action = $action;
        return $this;
    }
579758
public function action($action = null)
    {
        if (!is_null($action)) {
            $this->action = $action;
            return $this;
        } else {
            return $this->action ?: '';
        }
    }
934624
public function each(callable $action = null)
    {
        if ($action === null) {
            $each = call_user_func($this->each);
            if (!self::isIterable($each)) {
                throw new \RuntimeException("return value is not iterable object");
            }
            return $each;
        } else {
            $this->apply($action);
        }

        return null;
    }
353618
public function doAction($action)
    {
        $controller = $this->getOption('hooks-controller');
        $instance = $this->getControllerInstance($controller);

        if (is_object($instance) && method_exists($instance, $action)) {
            $response = call_user_func([$instance, $action]);
        }

        $this->setAction('');

        return isset($response);
    }
259848
public function Link($action = null) {
                $name = $this->name;

                if (($pos = stripos($name, '[')) !== false) {

                        $name = substr($name, 0, $pos);
                        $action = substr($this->name, $pos + 1, strlen($this->name) - 1 - ($pos + 1)) . 'Tree';
                }

                return Controller::join_links($this->form->FormAction(), 'field/' . $name, $action);
        }
752688
protected function parseAction( $action )
	{
		// If no action is passed in right away, we assume the user will make use of
		// fluent routing. In that case, we set a default closure, to be executed
		// if the user never explicitly sets an action to handle the given uri.
		if ( is_null( $action ) )
			return [
				'uses' => function ()
				{
					throw new LogicException( "Route for [{$this->uri}] has no action." );
				}
			];

		// If the action is already a Closure instance, we will just set that instance
		// as the "uses" property, because there is nothing else we need to do when
		// it is available. Otherwise we will need to find it in the action list.
		if ( is_callable( $action ) )
			return ['uses' => $action];

		// If no "uses" property has been set, we will dig through the array to find a
		// Closure instance within this list. We will set the first Closure we come
		// across into the "uses" property that will get fired off by this route.
		elseif ( !isset( $action['uses'] ) )
			$action['uses'] = $this->findCallable( $action );

		if ( is_string( $action['uses'] ) && !Str::contains( $action['uses'], '@' ) )
			throw new UnexpectedValueException( sprintf( 'Invalid route action: [%s]', $action['uses'] ) );

		return $action;
	}
1058073
protected function setAddRoute($controller, $action): Controller
    {
        $callTo = Inflector::classify($controller) . '@' . $action;

        $this->routes['get'] = array_merge($this->routes['get'], [
            "/$controller/$action/" => $callTo,
        ]);

        $this->routes['post'] = [
            "/$controller/$action/" => $callTo,
        ];

        return $this;
    }
922111
public function addAction(string $action): ClassDeclaration\MethodDeclaration
    {
        $method = $this->method($action . $this->actionPostfix);

        return $method->setAccess(ClassDeclaration\MethodDeclaration::ACCESS_PROTECTED);
    }
254813
public function action($action = null)
    {
        if ($action === null) {
            return $this->clause('action');
        }

        $this->_parts['action'] = $action;

        return $this;
    }
581289
public function Link($action=null) {
        $link = Controller::join_links(
            $this->stat('url_base', true),
            $this->stat('url_segment', true), // in case we want to change the segment
            '/', // trailing slash needed if $action is null!
            "$action"
        );
        
        $this->extend('updateLink', $link);
        return $link;
    }
1196168
protected function _mapAction($action) {
		$actionMap = $this->getConfig('actionMap');
		if (isset($actionMap[$action]) && method_exists($this, $actionMap[$action]['method'])) {
			$pass = (array)$this->_getRequest()->param('pass');
			call_user_func_array([$this, $actionMap[$action]['method']], $pass);

			if ($this->_redirectResponse instanceof Response) {
				return $this->_redirectResponse;
			}

			if (is_string($actionMap[$action]['view'])) {
				try {
					return $this->getController()->render($this->getController()->request->param('action'));
				} catch (MissingTemplateException $e) {
					return $this->getController()->render($actionMap[$action]['view']);
				}
			}

				return $this->_getResponse();
			}

		return false;
	}
151971
protected function urlAction ($action)
    {
        // Get controller public name
        $ctrlPubName = \Teon\Base\Stdlib\ClassUtils::getPublicControllerName(get_class($this));

        // Return generated URL
        return $this->url()->fromRoute($ctrlPubName, array('action' => $action));
    }
697539
public function run(callable $action)
    {
        $retryCount = 0;
        $lastException = null;

        do {
            try {
                return $action();
            } catch (Exception $e) {
                $lastException = $e;
                if (!$this->strategy->shouldRetry($e, $retryCount)) {
                    throw $e;
                }
            }
        } while ($this->retries > $retryCount++);

        if ($lastException !== null) {
            throw $lastException;
        }
    }
723794
protected function compileAction($action)
    {
        if (is_null($action)) {
            return $this->attributes;
        }

        if (is_string($action) || $action instanceof Closure) {
            $action = ['uses' => $action];
        }

        return array_merge($this->attributes, $action);
    }