-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathphp_request.c
85 lines (73 loc) · 2.27 KB
/
php_request.c
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
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <ctype.h>
#include <string.h>
#include "main/php.h"
#include "main/php_ini.h"
#include "ext/standard/info.h"
#include "php_request.h"
extern PHP_MINIT_FUNCTION(sapirequest);
extern PHP_MINIT_FUNCTION(sapiresponse);
extern PHP_MINIT_FUNCTION(sapiresponseinterface);
extern PHP_MINIT_FUNCTION(sapiresponsesender);
extern PHP_MINIT_FUNCTION(sapiupload);
extern PHP_MSHUTDOWN_FUNCTION(sapirequest);
extern PHP_MSHUTDOWN_FUNCTION(sapiupload);
/* {{{ PHP_MINIT_FUNCTION */
static PHP_MINIT_FUNCTION(request)
{
PHP_MINIT(sapirequest)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(sapiresponseinterface)(INIT_FUNC_ARGS_PASSTHRU); // must be before sapiresponse
PHP_MINIT(sapiresponse)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(sapiresponsesender)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(sapiupload)(INIT_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MINFO_FUNCTION */
static PHP_MINFO_FUNCTION(request)
{
php_info_print_table_start();
php_info_print_table_row(2, "Version", PHP_REQUEST_VERSION);
php_info_print_table_end();
}
/* }}} */
/* {{{ PHP_MSHUTDOWN_FUNCTION */
static PHP_MSHUTDOWN_FUNCTION(request)
{
PHP_MSHUTDOWN(sapirequest)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
PHP_MSHUTDOWN(sapiupload)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}
/* }}} */
/* {{{ request_deps */
static const zend_module_dep request_deps[] = {
ZEND_MOD_REQUIRED("spl")
ZEND_MOD_END
};
/* }}} */
zend_module_entry request_module_entry = {
STANDARD_MODULE_HEADER_EX, NULL,
request_deps, /* Deps */
PHP_REQUEST_NAME, /* Name */
NULL, /* Functions */
PHP_MINIT(request), /* MINIT */
PHP_MSHUTDOWN(request), /* MSHUTDOWN */
NULL, /* RINIT */
NULL, /* RSHUTDOWN */
PHP_MINFO(request), /* MINFO */
PHP_REQUEST_VERSION, /* Version */
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_REQUEST
ZEND_GET_MODULE(request) // Common for all PHP extensions which are build as shared modules
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: et sw=4 ts=4
*/