pharaoh_next library
Classes
- $PharaohImpl
- AppConfig
- AppInstance
- Application
- ApplicationFactory
- BaseDTO
- Body
- Use this to annotate a parameter in a controller method which will be resolved to the request body.
- ClassMiddleware
-
ClassPropertyValidator<
T extends Object> - ControllerMethod
- ControllerMethodParam
- ControllerRouteMethodDefinition
- DtoReflector
- ezDateTime
- ezEmail
- ezMaxLength
- ezMinLength
- ezOptional
-
ezRequired<
T extends Object> - FunctionalRouteDefinition
- Header
- HTTPController
- Injectable
- Param
- Use this to annotate a parameter in a controller method which will be resolved to a parameter in the request path.
- Pharaoh
- Query
- Use this to annotate a parameter in a controller method which will be resolved to a parameter in the request query params.
- Request
-
RequestAnnotation<
T> - RequestContext
- Response
- Route
- RouteDefinition
- RouteGroupDefinition
- RouteMapping
- ServiceProvider
- UseAliasedMiddleware
Extensions
- ClassMirrorExtensions on ClassMirror
-
ConfigExtension
on Map<
String, dynamic> - MiddlewareChainExtension on Middleware
- ReqResExtension on ReqRes
Constants
- body → const Body
- dtoReflector → const DtoReflector
- header → const Header
- inject → const Injectable
- param → const Param
- query → const Query
- unnamedConstructor → const String
Functions
-
cleanRoute(
String route) → String -
createNewInstance<
T extends Object> (Type classType) → T -
ensureIsSubTypeOf<
Parent extends Object> (Type objectType) → void -
env<
T extends Object> (String name, T defaultValue) → T -
executeHandlers(
Iterable handlers, ReqRes reqRes) → Future< ReqRes> -
filteredDeclarationsOf<
X extends DeclarationMirror> (ClassMirror cm, dynamic predicate) → List< X> -
getHttpMethod(
HttpRequest req) → HTTPMethod -
instanceFromRegistry<
T extends Object> ({Type? type}) → T -
isRegistered<
T extends Object> () → bool -
parseControllerMethod(
ControllerMethodDefinition defn) → ControllerMethod -
reflectType(
Type type) → ClassMirror -
registerSingleton<
T extends Object> (T instance) → T -
symbolToString(
Symbol symbol) → String -
useAliasedMiddleware(
String alias) → Middleware -
useRequestHandler(
RequestHandler handler) → Middleware
Typedefs
-
ApplicationExceptionsHandler
= FutureOr<
Response> Function(Object exception, ReqRes reqRes) - Use this to override the application exceptiosn handler
- ControllerMethodDefinition = (Type, Symbol)
-
Middleware
= FutureOr<
void> Function(Request req, Response res, NextFunction next) -
NextFunction<
Next> = dynamic Function([dynamic result, Next? chain]) -
OnErrorCallback
= FutureOr<
Response> Function(PharaohError error, Request req, Response res) - PharaohError = ({Object exception, StackTrace trace})
- ReqRes = ({Request req, Response res})
-
ReqResHook
= FutureOr<
ReqRes> Function(ReqRes reqRes) - RequestHandler = FutureOr Function(Request req, Response res)
- RequestHandlerWithApp = dynamic Function(Application app, Request req, Response res)
-
RoutesResolver
= List<
RouteDefinition> Function()