ControllerPlan class
How to call one controller: what goes in each parameter.
It is made once per route, at start. Dox reads the parameter types
from the function type (no dart:mirrors), and finds DTOs in
AppConfig(dtos: dtos). Each request only fills the list and calls
the function.
Constructors
-
ControllerPlan(Function fn, List<
ControllerArg> args)
Properties
-
args
→ List<
ControllerArg> -
final
- fn → Function
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
DoxRequest req) → FutureOr -
Fill the parameters for
reqand call the controller. A path param that does not fit its type answers 404. Without a DTO it is sync and gives what the controller gives. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
Function fn, RouteData route) → ControllerPlan -
The plan for
fnonroute. Throws a StateError when a parameter type is not known.