-
Notifications
You must be signed in to change notification settings - Fork 1
/
BrookURLRouter.html
223 lines (222 loc) · 13.3 KB
/
BrookURLRouter.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html>
<html lang="en">
<head>
<title>Brook Tardigrade: BrookURLRouter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="tipuesearch/tipuesearch.css">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<div class="container"><div class="navigation">
<h2><a href="index.html">Brook Tardigrade</a></h2><ul><li><a href="AllUnits.html">Units</a></li><li><a href="ClassHierarchy.html">Class Hierarchy</a></li><li><a href="AllClasses.html">Classes, Interfaces, Objects and Records</a></li><li><a href="AllTypes.html">Types</a></li><li><a href="AllVariables.html">Variables</a></li><li><a href="AllConstants.html">Constants</a></li><li><a href="AllFunctions.html">Functions and Procedures</a></li><li><a href="AllIdentifiers.html">Identifiers</a></li><li><form class="search-form" action="tipue_results.html"><div class="search-input"><input type="text" name="q" id="tipue_search_input" pattern=".{3,}" title="At least 3 characters" required><div class="search-button"><input type="button" id="tipue_search_button" onclick="this.form.submit();"></div></div></form>
<div style="clear: both"></div>
</li></ul></div><div class="content">
<h1 class="unit">Unit BrookURLRouter</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Uses">Uses</a></div><div class="one_section"><a class="section" href="#PasDoc-Classes">Classes, Interfaces, Objects and Records</a></div><div class="one_section">Functions and Procedures</div><div class="one_section"><a class="section" href="#PasDoc-Types">Types</a></div><div class="one_section"><a class="section" href="#PasDoc-Constants">Constants</a></div><div class="one_section">Variables</div></div>
<span id="PasDoc-Description"></span><h2 class="description">Description</h2>
<p>
Contains classes for fast URL routing.</p>
<span id="PasDoc-Uses"></span><h2 class="uses">Uses</h2>
<ul class="useslist"><li>RTLConsts</li><li>SysUtils</li><li>Classes</li><li>Platform</li><li>Marshalling</li><li>libsagui</li><li><a href="BrookUtility.html">BrookUtility</a></li><li><a href="BrookHandledClasses.html">BrookHandledClasses</a></li><li><a href="BrookStringMap.html">BrookStringMap</a></li><li><a href="BrookExtra.html">BrookExtra</a></li><li><a href="BrookHTTPRequest.html">BrookHTTPRequest</a></li><li><a href="BrookHTTPResponse.html">BrookHTTPResponse</a></li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Classes"></span><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
<table class="classestable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="BrookURLRouter.EBrookURLRoute.html"><code>EBrookURLRoute</code></a></td>
<td class="itemdesc">Handles exceptions related to route classes.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="BrookURLRouter.TBrookURLRoute.html"><code>TBrookURLRoute</code></a></td>
<td class="itemdesc">Class to represent a URL route item.</td>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="BrookURLRouter.TBrookURLRoutesEnumerator.html"><code>TBrookURLRoutesEnumerator</code></a></td>
<td class="itemdesc">List enumerator for <code><a class="normal" href="BrookURLRouter.TBrookURLRoutes.html">TBrookURLRoutes</a></code>.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="BrookURLRouter.EBrookURLRoutes.html"><code>EBrookURLRoutes</code></a></td>
<td class="itemdesc">Handles exceptions related to routes classes.</td>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="BrookURLRouter.TBrookURLRoutes.html"><code>TBrookURLRoutes</code></a></td>
<td class="itemdesc">Class to represent an list of URL routes.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="BrookURLRouter.TBrookURLRouter.html"><code>TBrookURLRouter</code></a></td>
<td class="itemdesc">URL router component.</td>
</tr>
</table>
<span id="PasDoc-Types"></span><h3 class="summary">Types</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#TBrookURLRouteMatchEvent">TBrookURLRouteMatchEvent</a></strong> = procedure(ARoute: <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>) of object;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#TBrookURLRouteRequestEvent">TBrookURLRouteRequestEvent</a></strong> = procedure(ASender: TObject; ARoute: <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>) of object;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#TBrookURLRouteRequestMethodEvent">TBrookURLRouteRequestMethodEvent</a></strong> = procedure(ASender: TObject; ARoute: <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>; var AAllowed: Boolean) of object;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#TBrookURLRouteClass">TBrookURLRouteClass</a></strong> = class of <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#TBrookURLRouterRouteEvent">TBrookURLRouterRouteEvent</a></strong> = procedure(ASender: TObject; const ARoute: string; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>) of object;</code></td>
</tr>
</table>
<span id="PasDoc-Constants"></span><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookInactiveRouter">SBrookInactiveRouter</a></strong> = 'Inactive router.';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookNoRoutesDefined">SBrookNoRoutesDefined</a></strong> = 'No routes defined.';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookEmptyRoutePattern">SBrookEmptyRoutePattern</a></strong> = '%s: pattern cannot be empty.';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookRouteAlreadyExists">SBrookRouteAlreadyExists</a></strong> = '%s: pattern ''%s'' already exists in ''%s''.';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookRequestMethodNotAllowed">SBrookRequestMethodNotAllowed</a></strong> = 'Request method not allowed: %s.';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookRequestNoMethodDefined">SBrookRequestNoMethodDefined</a></strong> = 'No method(s) defined.';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookRouteNotFound">SBrookRouteNotFound</a></strong> = 'Route not found: %s.';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookURLRouter.html#SBrookDefaultRouteAlreadyExists">SBrookDefaultRouteAlreadyExists</a></strong> = 'A default route already exists.';</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Types</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookURLRouteMatchEvent"></span><code><strong>TBrookURLRouteMatchEvent</strong> = procedure(ARoute: <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by <code><a class="normal" href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a></code> to notify a route matching.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookURLRouteRequestEvent"></span><code><strong>TBrookURLRouteRequestEvent</strong> = procedure(ASender: TObject; ARoute: <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by <code><a class="normal" href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a></code> to notify a client request.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookURLRouteRequestMethodEvent"></span><code><strong>TBrookURLRouteRequestMethodEvent</strong> = procedure(ASender: TObject; ARoute: <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>; var AAllowed: Boolean) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by <code><a class="normal" href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a></code> to notify a request method matching.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookURLRouteClass"></span><code><strong>TBrookURLRouteClass</strong> = class of <a href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a>;</code></td>
</tr>
<tr><td colspan="1">
<p>
Class-reference for <code><a class="normal" href="BrookURLRouter.TBrookURLRoute.html">TBrookURLRoute</a></code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookURLRouterRouteEvent"></span><code><strong>TBrookURLRouterRouteEvent</strong> = procedure(ASender: TObject; const ARoute: string; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by <code><a class="normal" href="BrookURLRouter.TBrookURLRouter.html">TBrookURLRouter</a></code> to handle routing.</p>
</td></tr>
</table>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookInactiveRouter"></span><code><strong>SBrookInactiveRouter</strong> = 'Inactive router.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'Inactive router.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookNoRoutesDefined"></span><code><strong>SBrookNoRoutesDefined</strong> = 'No routes defined.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'No routes defined.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookEmptyRoutePattern"></span><code><strong>SBrookEmptyRoutePattern</strong> = '%s: pattern cannot be empty.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'<new-class>: pattern cannot be empty.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookRouteAlreadyExists"></span><code><strong>SBrookRouteAlreadyExists</strong> = '%s: pattern ''%s'' already exists in ''%s''.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'<new-class>: pattern <pattern> already exists in <existing-class>.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookRequestMethodNotAllowed"></span><code><strong>SBrookRequestMethodNotAllowed</strong> = 'Request method not allowed: %s.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'Request method not allowed: <method>.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookRequestNoMethodDefined"></span><code><strong>SBrookRequestNoMethodDefined</strong> = 'No method(s) defined.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'No routes defined.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookRouteNotFound"></span><code><strong>SBrookRouteNotFound</strong> = 'Route not found: %s.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'Route not found: <route>.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookDefaultRouteAlreadyExists"></span><code><strong>SBrookDefaultRouteAlreadyExists</strong> = 'A default route already exists.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'A default route already exists.'</code>.</p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0</a>. </em>
</span>
</div></div></body></html>