Files
kulakpos_web/vendor/thecodingmachine/safe/generated/8.4/apache.php

124 lines
2.1 KiB
PHP
Raw Normal View History

2026-03-30 14:54:57 +07:00
<?php
namespace Safe;
use Safe\Exceptions\ApacheException;
/**
2026-04-18 20:32:18 +07:00
* @return string
2026-03-30 14:54:57 +07:00
* @throws ApacheException
*
*/
function apache_get_version(): string
{
error_clear_last();
$safeResult = \apache_get_version();
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
return $safeResult;
}
/**
2026-04-18 20:32:18 +07:00
* @param string $variable
* @param bool $walk_to_top
* @return string
2026-03-30 14:54:57 +07:00
* @throws ApacheException
*
*/
function apache_getenv(string $variable, bool $walk_to_top = false): string
{
error_clear_last();
$safeResult = \apache_getenv($variable, $walk_to_top);
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
return $safeResult;
}
/**
2026-04-18 20:32:18 +07:00
* @param string $filename
* @return object
2026-03-30 14:54:57 +07:00
* @throws ApacheException
*
*/
function apache_lookup_uri(string $filename): object
{
error_clear_last();
$safeResult = \apache_lookup_uri($filename);
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
return $safeResult;
}
/**
2026-04-18 20:32:18 +07:00
* @return array|false
2026-03-30 14:54:57 +07:00
*
*/
function apache_request_headers()
{
error_clear_last();
$safeResult = \apache_request_headers();
return $safeResult;
}
/**
2026-04-18 20:32:18 +07:00
* @return array|false
2026-03-30 14:54:57 +07:00
*
*/
function apache_response_headers()
{
error_clear_last();
$safeResult = \apache_response_headers();
return $safeResult;
}
/**
2026-04-18 20:32:18 +07:00
* @param string $variable
* @param string $value
* @param bool $walk_to_top
2026-03-30 14:54:57 +07:00
* @throws ApacheException
*
*/
function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void
{
error_clear_last();
$safeResult = \apache_setenv($variable, $value, $walk_to_top);
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
}
/**
2026-04-18 20:32:18 +07:00
* @return array
2026-03-30 14:54:57 +07:00
*
*/
function getallheaders(): array
{
error_clear_last();
$safeResult = \getallheaders();
return $safeResult;
}
/**
2026-04-18 20:32:18 +07:00
* @param string $uri
2026-03-30 14:54:57 +07:00
* @throws ApacheException
*
*/
function virtual(string $uri): void
{
error_clear_last();
$safeResult = \virtual($uri);
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
}