struct Athena::Framework::Action(Controller, ActionType, ReturnType, ArgTypeTuple, ArgumentsType, ParamConverterType)
inherits Athena::Framework::ActionBase
#
Represents a controller action that will handle a request.
Includes metadata about the endpoint, such as its controller, arguments, return type, and the action that should be executed.
Constructors#
.new(action : ActionType, arguments : ArgumentsType, param_converters : ParamConverterType, annotation_configurations : ACF::AnnotationConfigurations, params : Array(ATH::Params::ParamInterface), _controller : Controller.class, _return_type : ReturnType.class, _arg_types : ArgTypeTuple.class)
#
Methods#
#annotation_configurations : ACF::AnnotationConfigurations
#
Returns annotation configurations registered via Athena::Config.configuration_annotation
and applied to self
.
These configurations could then be accessed within ATH::ParamConverter
s and/or ATH::Listeners
s.
See ATH::Events::RequestAware
for an example.
#arguments : ArgumentsType
#
Returns an Array(ATH::Arguments::ArgumentMetadata)
that self
requires.
#execute(arguments : Array) : ReturnType
#
Executes the action related to self
with the provided arguments array.
#param_converters : ParamConverterType
#
Returns a Tuple
of ATH::ParamConverter::ConfigurationInterface
representing the ATHA::ParamConverter
s applied to self
.