forked from managedit/kohana-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.php
31 lines (30 loc) · 824 Bytes
/
init.php
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
<?php
/**
* Extra HTTP Status Code Messages
*/
Response::$messages[102] = 'Processing';
Response::$messages[207] = 'Multi-Status';
Response::$messages[422] = 'Unprocessable Entity';
Response::$messages[423] = 'Locked';
Response::$messages[424] = 'Failed Dependency';
Response::$messages[507] = 'Insufficient Storage';
/**
* Routes
*/
Route::set('api', 'api(/<version>)/<controller>(/<id>)(/<custom>)(/<id2>)(/<custom2>)(<custom3>)(.<format>)',
array (
'version' => '[0-9]++',
'id' => '[0-9;]++',
'id2' => '[0-9;]++',
'custom' => '[a-z]++',
'custom2' => '[a-z]++',
'custom3' => '[a-z]++',
))
->defaults(array(
'version' => '1',
'directory' => 'API',
'id' => NULL,
'custom' => NULL,
'id2' => NULL,
'custom2' => NULL,
));