-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
routes.json
443 lines (443 loc) · 14.9 KB
/
routes.json
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
{
"routes get": {
"prefix": [
"ci:routes:get",
"$routes->get",
"routes get"
],
"body": "\\$routes->get('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to GET requests."
},
"routes post": {
"prefix": [
"ci:routes:post",
"$routes->post",
"routes post"
],
"body": "\\$routes->post('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to POST requests."
},
"routes put": {
"prefix": [
"ci:routes:put",
"$routes->put",
"routes put"
],
"body": "\\$routes->put('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to PUT requests."
},
"routes delete": {
"prefix": [
"ci:routes:delete",
"$routes->delete",
"routes delete"
],
"body": "\\$routes->delete('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to DELETE requests."
},
"routes head": {
"prefix": [
"ci:routes:head",
"$routes->head",
"routes head"
],
"body": "\\$routes->head('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to HEAD requests."
},
"routes patch": {
"prefix": [
"ci:routes:patch",
"$routes->patch",
"routes patch"
],
"body": "\\$routes->patch('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to PATCH requests."
},
"routes options": {
"prefix": [
"ci:routes:options",
"$routes->options",
"routes options"
],
"body": "\\$routes->options('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to OPTIONS requests."
},
"routes cli": {
"prefix": [
"ci:routes:cli",
"$routes->cli",
"routes cli"
],
"body": "\\$routes->cli('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Specifies a route that is only available to command-line requests."
},
"routes add": {
"prefix": [
"ci:routes:add",
"$routes->add",
"routes add"
],
"body": "\\$routes->add('${1:url}', '${2:control}::${3:function}', ['as' => '${4:alias}', 'filter' => '${5:filter}']);",
"description": "Adds a single route to the collection."
},
"routes view": {
"prefix": [
"ci:routes:view",
"$routes->view",
"routes view"
],
"body": "\\$routes->view('${1:url}', '${2:view}', ['as' => '${3:alias}', 'filter' => '${4:filter}']);",
"description": "Specifies a route that will only display a view."
},
"routes addPlaceholder": {
"prefix": [
"ci:routes:addPlaceholder",
"$routes->addPlaceholder",
"routes addPlaceholder"
],
"body": "\\$routes->addPlaceholder('${1:uuid}', '${2:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}}');",
"description": "Registers a new constraint with the system."
},
"routes presenter": {
"prefix": [
"ci:routes:presenter",
"$routes->presenter",
"routes presenter"
],
"body": "\\$routes->presenter('${1:ulr}');",
"description": "Creates a collections of HTTP-verb based routes for a presenter controller."
},
"routes resource": {
"prefix": [
"ci:routes:resource",
"$routes->resource",
"routes resource"
],
"body": "\\$routes->resource('${1:ulr}');",
"description": "Creates a collections of HTTP-verb based routes for a controller."
},
"routes match": {
"prefix": [
"ci:routes:match",
"$routes->match",
"routes match"
],
"body": "\\$routes->match([${1:verb}], '${2:url}', '${3:control}::${4:function}', ['as' => '${5:alias}', 'filter' => '${6:filter}']);",
"description": "Specifies a single route to match for multiple HTTP Verbs."
},
"routes addRedirect": {
"prefix": [
"ci:routes:addRedirect",
"$routes->addRedirect",
"routes addRedirect"
],
"body": "\\$routes->addRedirect('${1:url}', '${2:route}');",
"description": "Adds a temporary redirect from one route to another."
},
"routes map": {
"prefix": [
"ci:routes:map",
"$routes->map",
"routes map"
],
"body": "\\$routes->map(['${1:routes}'], ['as' => '${2:alias}', 'filter' => '${3:filter}']);",
"description": "A shortcut method to add a number of routes at a single time."
},
"routes setPrioritize": {
"prefix": [
"ci:routes:setPrioritize",
"$routes->setPrioritize",
"routes setPrioritize"
],
"body": "\\$routes->setPrioritize('${1:boolean}');",
"description": "Enable or Disable sorting routes by priority."
},
"routes setTranslateURIDashes": {
"prefix": [
"ci:routes:setTranslateURIDashes",
"$routes->setTranslateURIDashes",
"routes setTranslateURIDashes"
],
"body": "\\$routes->setTranslateURIDashes('${1:boolean}');",
"description": "Tells the system whether to convert dashes in URI strings into underscores."
},
"routes setAutoRoute": {
"prefix": [
"ci:routes:setAutoRoute",
"$routes->setAutoRoute",
"routes setAutoRoute"
],
"body": "\\$routes->setAutoRoute('${1:boolean}');",
"description": "If TRUE, the system will attempt to match the URI against Controllers by matching each segment against folders/files in APPPATH/Controllers, when a match wasn't found against defined routes."
},
"routes setDefaultNamespace": {
"prefix": [
"ci:routes:setDefaultNamespace",
"$routes->setDefaultNamespace",
"routes setDefaultNamespace"
],
"body": "\\$routes->setDefaultNamespace('${1:namespace}');",
"description": "Sets the default namespace to use for Controllers when no other namespace has been specified."
},
"routes setDefaultController": {
"prefix": [
"ci:routes:setDefaultController",
"$routes->setDefaultController",
"routes setDefaultController"
],
"body": "\\$routes->setDefaultController('${1:controller}');",
"description": "Sets the default controller to use when no other controller has been specified."
},
"routes setDefaultMethod": {
"prefix": [
"ci:routes:setDefaultMethod",
"$routes->setDefaultMethod",
"routes setDefaultMethod"
],
"body": "\\$routes->setDefaultMethod('${1:method}');",
"description": "Sets the default method to call on the controller when no other method has been set in the route."
},
"routes environment": {
"prefix": [
"ci:routes:environment",
"$routes->environment",
"routes environment"
],
"body": [
"\\$routes->environment('${1:development}', static function (\\$routes)",
"{",
"\t\\$routes->add('${2:builder}', '${3:Tools\\\\Builder}::${4:function}');",
"});"
],
"description": "Limits the routes to a specified ENVIRONMENT or they won't run."
},
"routes group": {
"prefix": [
"ci:routes:group",
"$routes->group",
"routes group"
],
"body": [
"\\$routes->group('${1:url}', ['namespace' => '${2:namespace}', 'filter' => '${3:filter}'], static function (\\$routes) {",
"\t//",
"});"
],
"description": "Group a series of routes under a single URL segment."
},
"routes loadRoutes": {
"prefix": [
"ci:routes:loadRoutes",
"$routes->loadRoutes",
"routes loadRoutes"
],
"body": "\\$routes->loadRoutes('${1:routesFile}')",
"description": "Loads main routes file and discover routes."
},
"routes getPlaceholders": {
"prefix": [
"ci:routes:getPlaceholders",
"$routes->getPlaceholders",
"routes getPlaceholders"
],
"body": "\\$routes->getPlaceholders()",
"description": "For `spark routes`"
},
"routes set404Override": {
"prefix": [
"ci:routes:set404Override",
"$routes->set404Override",
"routes set404Override"
],
"body": "\\$routes->set404Override($callable)",
"description": "ets the class/method that should be called if routing doesn't find a match. It can be either a closure or the controller/method name exactly like a route is defined: Users: :index."
},
"routes get404Override": {
"prefix": [
"ci:routes:get404Override",
"$routes->get404Override",
"routes get404Override"
],
"body": "\\$routes->get404Override()",
"description": "Returns the 404 Override setting, which can be null, a closure or the controller/string."
},
"routes setDefaultConstraint": {
"prefix": [
"ci:routes:setDefaultConstraint",
"$routes->setDefaultConstraint",
"routes setDefaultConstraint"
],
"body": "\\$routes->setDefaultConstraint('${1:placeholder}')",
"description": "Sets the default constraint to be used in the system. Typically for use with the 'resource' method."
},
"routes getDefaultController": {
"prefix": [
"ci:routes:getDefaultController",
"$routes->getDefaultController",
"routes getDefaultController"
],
"body": "\\$routes->getDefaultController()",
"description": "Returns the name of the default controller. With Namespace."
},
"routes getDefaultMethod": {
"prefix": [
"ci:routes:getDefaultMethod",
"$routes->getDefaultMethod",
"routes getDefaultMethod"
],
"body": "\\$routes->getDefaultMethod()",
"description": "Returns the name of the default method to use within the controller."
},
"routes getDefaultNamespace": {
"prefix": [
"ci:routes:getDefaultNamespace",
"$routes->getDefaultNamespace",
"routes getDefaultNamespace"
],
"body": "\\$routes->getDefaultNamespace()",
"description": "Returns the default namespace as set in the Routes config file."
},
"routes shouldTranslateURIDashes": {
"prefix": [
"ci:routes:shouldTranslateURIDashes",
"$routes->shouldTranslateURIDashes",
"routes shouldTranslateURIDashes"
],
"body": "\\$routes->shouldTranslateURIDashes()",
"description": "Returns the current value of the translateURIDashes setting."
},
"routes shouldAutoRoute": {
"prefix": [
"ci:routes:shouldAutoRoute",
"$routes->shouldAutoRoute",
"routes shouldAutoRoute"
],
"body": "\\$routes->shouldAutoRoute()",
"description": "Returns the flag that tells whether to autoRoute URI against Controllers."
},
"routes getRoutes": {
"prefix": [
"ci:routes:getRoutes",
"$routes->getRoutes",
"routes getRoutes"
],
"body": "\\$routes->getRoutes('${1:verb}', ${2:boolean})",
"description": "Returns the raw array of available routes."
},
"routes getRoutesOptions": {
"prefix": [
"ci:routes:getRoutesOptions",
"$routes->getRoutesOptions",
"routes getRoutesOptions"
],
"body": "\\$routes->getRoutesOptions('${1:routeKey}', '${2:verb}')",
"description": "Returns one or all routes options."
},
"routes getHTTPVerb": {
"prefix": [
"ci:routes:getHTTPVerb",
"$routes->getHTTPVerb",
"routes getHTTPVerb"
],
"body": "\\$routes->getHTTPVerb()",
"description": "Returns the current HTTP Verb being used."
},
"routes setHTTPVerb": {
"prefix": [
"ci:routes:setHTTPVerb",
"$routes->setHTTPVerb",
"routes setHTTPVerb"
],
"body": "\\$routes->setHTTPVerb('${1:verb}')",
"description": "Sets the current HTTP verb. Used primarily for testing."
},
"routes isRedirect": {
"prefix": [
"ci:routes:isRedirect",
"$routes->isRedirect",
"routes isRedirect"
],
"body": "\\$routes->isRedirect('${1:routeKey}')",
"description": "Determines if the route is a redirecting route."
},
"routes getRedirectCode": {
"prefix": [
"ci:routes:getRedirectCode",
"$routes->getRedirectCode",
"routes getRedirectCode"
],
"body": "\\$routes->getRedirectCode('${1:routeKey}')",
"description": "Grabs the HTTP status code from a redirecting Route."
},
"routes reverseRoute": {
"prefix": [
"ci:routes:reverseRoute",
"$routes->reverseRoute",
"routes reverseRoute"
],
"body": "\\$routes->reverseRoute('${1:search}', '${2:params}')",
"description": "Attempts to look up a route based on its destination."
},
"routes isFiltered": {
"prefix": [
"ci:routes:isFiltered",
"$routes->isFiltered",
"routes isFiltered"
],
"body": "\\$routes->isFiltered('${1:search}', '${2:verb}')",
"description": "Checks a route (using the \"from\") to see if it's filtered or not."
},
"routes getFilterForRoute": {
"prefix": [
"ci:routes:getFilterForRoute",
"$routes->getFilterForRoute",
"routes getFilterForRoute"
],
"body": "\\$routes->getFilterForRoute('${1:search}', '${2:verb}')",
"description": "Returns the filter that should be applied for a single route, along with any parameters it might have."
},
"routes getFiltersForRoute": {
"prefix": [
"ci:routes:getFiltersForRoute",
"$routes->getFiltersForRoute",
"routes getFiltersForRoute"
],
"body": "\\$routes->getFiltersForRoute('${1:search}', '${2:verb}')",
"description": "Returns the filters that should be applied for a single route, along with any parameters it might have."
},
"routes resetRoutes": {
"prefix": [
"ci:routes:resetRoutes",
"$routes->resetRoutes",
"routes resetRoutes"
],
"body": "\\$routes->resetRoutes()",
"description": "Reset the routes, so that a test case can provide the explicit ones needed for it."
},
"routes getRegisteredControllers": {
"prefix": [
"ci:routes:getRegisteredControllers",
"$routes->getRegisteredControllers",
"routes getRegisteredControllers"
],
"body": "\\$routes->getRegisteredControllers('${1:verb}')",
"description": "Get all controllers in Route Handlers."
},
"routes useSupportedLocalesOnly": {
"prefix": [
"ci:routes:useSupportedLocalesOnly",
"$routes->useSupportedLocalesOnly",
"routes useSupportedLocalesOnly"
],
"body": "\\$routes->useSupportedLocalesOnly(${1:boolean})",
"description": "Set The flag that limit or not the routes with {locale} placeholder to App::$supportedLocales."
},
"routes shouldUseSupportedLocalesOnly": {
"prefix": [
"ci:routes:shouldUseSupportedLocalesOnly",
"$routes->shouldUseSupportedLocalesOnly",
"routes shouldUseSupportedLocalesOnly"
],
"body": "\\$routes->shouldUseSupportedLocalesOnly()",
"description": "Get the flag that limit or not the routes with {locale} placeholder to App::$supportedLocales."
}
}