-
Notifications
You must be signed in to change notification settings - Fork 2
/
edge_router.h
44 lines (32 loc) · 1.52 KB
/
edge_router.h
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
/*
* +----------------------------------------------------------------------+
* | Edge Framework |
* +----------------------------------------------------------------------+
* +----------------------------------------------------------------------+
* | Author: linkaisheng <carlsonlin@tencent.com> |
* +----------------------------------------------------------------------+
*/
#define EDGE_REQUEST_VARS_GET TRACK_VARS_GET
#define EDGE_REQUEST_VARS_POST TRACK_VARS_POST
#define EDGE_REQUEST_vARS_REQUEST TRACK_VARS_REQUEST
#define EDGE_REQUEST_VARS_COOKIE TRACK_VARS_COOKIE
#define EDGE_REQUEST_VARS_SERVER TRACK_VARS_SERVER
#define EDGE_REQUEST_VARS_ENV TRACK_VARS_ENV
#define EDGE_REQUEST_BASEMODULE "base_module"
#define EDGE_REQUEST_MODULE "module"
#define EDGE_REQUEST_CONTROLLER "controller"
#define EDGE_REQUEST_ACTION "action"
#define LPS(token, op) \
if(token == NULL){ \
spprintf(&op, 0, "%s", "index"); \
}else{ \
spprintf(&op, 0, "%s", token); \
} \
extern zend_class_entry *edge_router_ce;
EDGE_STARTUP_FUNCTION(router);
PHP_METHOD(Edge_Router, __construct);
zval * edge_request_query(int type, char *name);
zval * get_router_instance();
static void set_base_home(const char *interface_path);
static void dispatch(zval *obj);
static void init_ce(zval *obj);