mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Convert apache2handler arginfo to php stubs
This commit is contained in:
parent
7a5dbcd660
commit
e208d236b3
3 changed files with 69 additions and 48 deletions
|
@ -43,6 +43,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "php_apache.h"
|
#include "php_apache.h"
|
||||||
|
#include "php_functions_arginfo.h"
|
||||||
|
|
||||||
#ifdef ZTS
|
#ifdef ZTS
|
||||||
int php_apache2_info_id;
|
int php_apache2_info_id;
|
||||||
|
@ -475,55 +476,17 @@ PHP_MINFO_FUNCTION(apache)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* {{{ arginfo */
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_lookup_uri, 0, 0, 1)
|
|
||||||
ZEND_ARG_INFO(0, filename)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_virtual, 0, 0, 1)
|
|
||||||
ZEND_ARG_INFO(0, uri)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_response_headers, 0)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_getallheaders, 0)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_note, 0, 0, 1)
|
|
||||||
ZEND_ARG_INFO(0, note_name)
|
|
||||||
ZEND_ARG_INFO(0, note_value)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_setenv, 0, 0, 2)
|
|
||||||
ZEND_ARG_INFO(0, variable)
|
|
||||||
ZEND_ARG_INFO(0, value)
|
|
||||||
ZEND_ARG_INFO(0, walk_to_top)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_apache2handler_getenv, 0, 0, 1)
|
|
||||||
ZEND_ARG_INFO(0, variable)
|
|
||||||
ZEND_ARG_INFO(0, walk_to_top)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_get_version, 0)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO(arginfo_apache2handler_get_modules, 0)
|
|
||||||
ZEND_END_ARG_INFO()
|
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
static const zend_function_entry apache_functions[] = {
|
static const zend_function_entry apache_functions[] = {
|
||||||
PHP_FE(apache_lookup_uri, arginfo_apache2handler_lookup_uri)
|
PHP_FE(apache_lookup_uri, arginfo_apache_lookup_uri)
|
||||||
PHP_FE(virtual, arginfo_apache2handler_virtual)
|
PHP_FE(virtual, arginfo_virtual)
|
||||||
PHP_FE(apache_request_headers, arginfo_apache2handler_getallheaders)
|
PHP_FE(apache_request_headers, arginfo_apache_request_headers)
|
||||||
PHP_FE(apache_response_headers, arginfo_apache2handler_response_headers)
|
PHP_FE(apache_response_headers, arginfo_apache_response_headers)
|
||||||
PHP_FE(apache_setenv, arginfo_apache2handler_setenv)
|
PHP_FE(apache_setenv, arginfo_apache_setenv)
|
||||||
PHP_FE(apache_getenv, arginfo_apache2handler_getenv)
|
PHP_FE(apache_getenv, arginfo_apache_getenv)
|
||||||
PHP_FE(apache_note, arginfo_apache2handler_note)
|
PHP_FE(apache_note, arginfo_apache_note)
|
||||||
PHP_FE(apache_get_version, arginfo_apache2handler_get_version)
|
PHP_FE(apache_get_version, arginfo_apache_get_version)
|
||||||
PHP_FE(apache_get_modules, arginfo_apache2handler_get_modules)
|
PHP_FE(apache_get_modules, arginfo_apache_get_modules)
|
||||||
PHP_FALIAS(getallheaders, apache_request_headers, arginfo_apache2handler_getallheaders)
|
PHP_FALIAS(getallheaders, apache_request_headers, arginfo_getallheaders)
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
21
sapi/apache2handler/php_functions.stub.php
Normal file
21
sapi/apache2handler/php_functions.stub.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function apache_lookup_uri(string $filename): object|false {}
|
||||||
|
|
||||||
|
function virtual(string $uri): bool {}
|
||||||
|
|
||||||
|
function apache_request_headers(): array {}
|
||||||
|
|
||||||
|
function getallheaders(): array {}
|
||||||
|
|
||||||
|
function apache_response_headers(): array {}
|
||||||
|
|
||||||
|
function apache_note(string $note_name, string $note_value = UNKNOWN): string|false {}
|
||||||
|
|
||||||
|
function apache_setenv(string $variable, string $value, bool $walk_to_top = false): bool {}
|
||||||
|
|
||||||
|
function apache_getenv(string $variable, bool $walk_to_top = false): string|false {}
|
||||||
|
|
||||||
|
function apache_get_version(): string|false {}
|
||||||
|
|
||||||
|
function apache_get_modules(): array {}
|
37
sapi/apache2handler/php_functions_arginfo.h
Normal file
37
sapi/apache2handler/php_functions_arginfo.h
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/* This is a generated file, edit the .stub.php file instead. */
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_apache_lookup_uri, 0, 1, MAY_BE_OBJECT|MAY_BE_FALSE)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_virtual, 0, 1, _IS_BOOL, 0)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_apache_request_headers, 0, 0, IS_ARRAY, 0)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
#define arginfo_getallheaders arginfo_apache_request_headers
|
||||||
|
|
||||||
|
#define arginfo_apache_response_headers arginfo_apache_request_headers
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_apache_note, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, note_name, IS_STRING, 0)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, note_value, IS_STRING, 0)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_apache_setenv, 0, 2, _IS_BOOL, 0)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, variable, IS_STRING, 0)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, walk_to_top, _IS_BOOL, 0)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_apache_getenv, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, variable, IS_STRING, 0)
|
||||||
|
ZEND_ARG_TYPE_INFO(0, walk_to_top, _IS_BOOL, 0)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_apache_get_version, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
|
||||||
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
|
#define arginfo_apache_get_modules arginfo_apache_request_headers
|
Loading…
Add table
Add a link
Reference in a new issue