Class TBrookURLRoute
Unit
BrookURLRouter
Declaration
type TBrookURLRoute = class(TBrookHandledCollectionItem)
Description
Class to represent a URL route item.
Hierarchy
Overview
Fields
Methods
 |
constructor Create(ACollection: TCollection); override; |
 |
destructor Destroy; override; |
 |
procedure Validate; inline; |
Properties
Description
Fields
Methods
 |
constructor Create(ACollection: TCollection); override; |
|
Creates an instance of TBrookURLRoute.
Parameters
- ACollection[in]
- Routes list.
|
 |
procedure Validate; inline; |
|
Checks if the route pattern is valid.
|
Properties
 |
property PCRE2Handle: Pointer read GetPCRE2Handle; |
|
Contains the PCRE2 instance.
|
 |
property Segments: TArray<string> read GetSegments; |
|
Contains all path segments (a.k.a. path levels).
|
 |
property Variables: TBrookStringMap read GetVariables; |
|
Contains all path variables (a.k.a. query-string parameters).
|
 |
property RawPattern: string read GetRawPattern; |
|
Contains the raw route pattern. For example, given a pattern /foo, the raw pattern is ˆ/foo$.
|
 |
property Path: string read GetPath; |
|
Contains the route path.
|
 |
property UserData: Pointer read GetUserData; |
|
User-defined data to be stored temporarily in the route object.
|
 |
property Default: Boolean read FDefault write SetDefault
stored IsDefaultStored default False; |
|
Default route called if URL does not match any registered route.
|
 |
property Pattern: string read GetPattern write SetPattern; |
|
Pattern to find the route. It must be a valid regular expression in PCRE2 syntax.
|
 |
property OnRequestMethod: TBrookURLRouteRequestMethodEvent
read FOnRequestMethod write FOnRequestMethod; |
|
Event triggered when the HTTP method matches a route allowed method.
|
 |
property OnRequest: TBrookURLRouteRequestEvent read FOnRequest
write FOnRequest; |
|
Event triggered when a client requests the route.
|
Generated by PasDoc 0.16.0.