API Index — Namespaces, Packages, Reports, Indices
apache_shims.php
Table of Contents
Functions
- apache_request_headers() : array<string, string>
- Return all HTTP request headers as an associative array.
- getallheaders() : array<string, string>
- Alias for
apache_request_headers()— both names exist under mod_php. - apache_response_headers() : array<string, string>
- Return all response headers queued for the current request.
- apache_setenv() : bool
- Set a named Apache subprocess environment variable.
- apache_getenv() : string|false
- Retrieve a named Apache subprocess environment variable.
- apache_note() : string
- Get or set an Apache request note (named annotation attached to the request).
- virtual() : bool
- Perform an Apache internal sub-request for
$uri.
Functions
apache_request_headers()
Return all HTTP request headers as an associative array.
apache_request_headers() : array<string, string>
Shim for apache_request_headers() / getallheaders() on non-Apache SAPIs.
Return values
array<string, string>getallheaders()
Alias for apache_request_headers() — both names exist under mod_php.
getallheaders() : array<string, string>
This shim makes getallheaders() available on OpenSwoole / CLI SAPIs.
Return values
array<string, string>apache_response_headers()
Return all response headers queued for the current request.
apache_response_headers() : array<string, string>
Delegates to \ZealPHP\apache_response_headers() which reads from the
per-request $g->zealphp_response header list.
Return values
array<string, string>apache_setenv()
Set a named Apache subprocess environment variable.
apache_setenv(string $variable, string $value[, bool $walk_to_top = false ]) : bool
In ZealPHP this writes into the per-request $g->server bag under the
conventional HTTP_* key so subsequent handler code sees the value.
The $walk_to_top parameter is accepted for API compatibility but has
no effect (there is no parent-request scope in OpenSwoole).
Parameters
- $variable : string
- $value : string
- $walk_to_top : bool = false
Return values
boolapache_getenv()
Retrieve a named Apache subprocess environment variable.
apache_getenv(string $variable[, bool $walk_to_top = false ]) : string|false
Returns false when the variable is not set (matching Apache's behaviour).
The $walk_to_top parameter is accepted for API compatibility but has
no effect in ZealPHP.
Parameters
- $variable : string
- $walk_to_top : bool = false
Return values
string|falseapache_note()
Get or set an Apache request note (named annotation attached to the request).
apache_note(string $note_name[, string|null $note_value = null ]) : string
When $note_value is null, returns the current value of the note.
When $note_value is provided, sets it and returns the previous value (or
an empty string when the note was not previously set).
Parameters
- $note_name : string
- $note_value : string|null = null
Return values
stringvirtual()
Perform an Apache internal sub-request for $uri.
virtual(string $uri) : bool
In ZealPHP this dispatches the URI through the framework's routing stack
in-process (similar to Apache's virtual() / mod_include sub-request
mechanism). Returns true on success, false on failure.
Parameters
- $uri : string