struct Athena::Routing::Action(Controller, ActionType, ReturnType, ArgTypeTuple, ArgumentsType)
inherits Athena::Routing::ActionBase
#
Represents an endpoint within the application.
Includes metadata about the endpoint, such as its controller, arguments, return type, and the action that should be executed.
Class methods#
.new(action : ActionType, name : String, method : String, path : String, constraints : Hash(String, Regex), arguments : ArgumentsType, param_converters : Array(ART::ParamConverterInterface::ConfigurationInterface), view_context : ART::Action::ViewContext, annotation_configurations : ACF::AnnotationConfigurations, params : Array(ART::Params::ParamInterface), _controller : Controller.class, _return_type : ReturnType.class, _arg_types : ArgTypeTuple.class)
#
(action : ActionType, name : String, method : String, path : String, constraints : Hash(String, Regex), arguments : ArgumentsType, param_converters : Array(ART::ParamConverterInterface::ConfigurationInterface), view_context : ART::Action::ViewContext, annotation_configurations : ACF::AnnotationConfigurations, params : Array(ART::Params::ParamInterface), _controller : Controller.class, _return_type : ReturnType.class, _arg_types : ArgTypeTuple.class)
Methods#
#annotation_configurations : ACF::AnnotationConfigurations
#
: ACF::AnnotationConfigurations
Returns annotation configurations registered via Athena::Config.configuration_annotation
and applied to self
.
These configurations could then be accessed within ART::ParamConverterInterface
s and/or ART::Listeners
s.
See ART::Events::RequestAware
for an example.
#arguments : ArgumentsType
#
: ArgumentsType
Returns an Array(ART::Arguments::ArgumentMetadata)
that self
requires.
#execute(arguments : Array) : ReturnType
#
(arguments : Array) : ReturnType
Executes the action related to self
with the provided arguments array.
#param_converters : Array(ART::ParamConverterInterface::ConfigurationInterface)
#
: Array(ART::ParamConverterInterface::ConfigurationInterface)
Returns an Array(ART::ParamConverterInterface::ConfigurationInterface)
representing the ARTA::ParamConverter
s applied to self
.
#view_context : ART::Action::ViewContext
#
: ART::Action::ViewContext
Returns the ART::Action::ViewContext
related to self
.