Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions generated/apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

/**
* Fetch the Apache version.
*
*
* @return string Returns the Apache version on success .
* @throws ApacheException
*
*
*/
function apache_get_version(): string
{
error_clear_last();
$result = \apache_get_version();
if ($result === FALSE) {
if ($result === false) {
throw ApacheException::createFromPhpError();
}
return $result;
Expand All @@ -28,34 +28,34 @@ function apache_get_version(): string
* ignore_user_abort(true) and periodic
* apache_reset_timeout calls, Apache can theoretically
* run forever.
*
*
* This function requires Apache 1.
*
*
* @throws ApacheException
*
*
*/
function apache_reset_timeout(): void
{
error_clear_last();
$result = \apache_reset_timeout();
if ($result === FALSE) {
if ($result === false) {
throw ApacheException::createFromPhpError();
}
}


/**
* Fetch all HTTP response headers.
*
*
* @return array An array of all Apache response headers on success .
* @throws ApacheException
*
*
*/
function apache_response_headers(): array
{
error_clear_last();
$result = \apache_response_headers();
if ($result === FALSE) {
if ($result === false) {
throw ApacheException::createFromPhpError();
}
return $result;
Expand All @@ -66,20 +66,18 @@ function apache_response_headers(): array
* apache_setenv sets the value of the Apache
* environment variable specified by
* variable.
*
*
* @param string $variable The environment variable that's being set.
* @param string $value The new variable value.
* @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers.
* @throws ApacheException
*
*
*/
function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void
{
error_clear_last();
$result = \apache_setenv($variable, $value, $walk_to_top);
if ($result === FALSE) {
if ($result === false) {
throw ApacheException::createFromPhpError();
}
}


66 changes: 32 additions & 34 deletions generated/apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,41 @@
use Safe\Exceptions\ApcException;

/**
* apc_cas updates an already existing integer value if the
* old parameter matches the currently stored value
* apc_cas updates an already existing integer value if the
* old parameter matches the currently stored value
* with the value of the new parameter.
*
*
* @param string $key The key of the value being updated.
* @param int $old The old value (the value currently stored).
* @param int $new The new value to update to.
* @throws ApcException
*
*
*/
function apc_cas(string $key, int $old, int $new): void
{
error_clear_last();
$result = \apc_cas($key, $old, $new);
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
}


/**
* Stores a file in the bytecode cache, bypassing all filters.
*
*
* @param string $filename Full or relative path to a PHP file that will be compiled and stored in
* the bytecode cache.
* @param bool $atomic
* @param bool $atomic
* @return mixed Returns TRUE on success .
* @throws ApcException
*
*
*/
function apc_compile_file(string $filename, bool $atomic = true)
{
error_clear_last();
$result = \apc_compile_file($filename, $atomic);
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
return $result;
Expand All @@ -48,25 +48,25 @@ function apc_compile_file(string $filename, bool $atomic = true)

/**
* Decreases a stored integer value.
*
*
* @param string $key The key of the value being decreased.
* @param int $step The step, or value to decrease.
* @param bool $success Optionally pass the success or fail boolean value to
* this referenced variable.
* @return int Returns the current value of key's value on success,
*
*
* @throws ApcException
*
*
*/
function apc_dec(string $key, int $step = 1, bool &$success = null): int
{
error_clear_last();
if ($success !== null) {
$result = \apc_dec($key, $step, $success);
}else {
} else {
$result = \apc_dec($key, $step);
}
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
return $result;
Expand All @@ -78,10 +78,10 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
* APC is to increase the performance of scripts/applications, this mechanism
* is provided to streamline the process of mass constant definition. However,
* this function does not perform as well as anticipated.
*
*
* For a better-performing solution, try the
* hidef extension from PECL.
*
*
* @param string $key The key serves as the name of the constant set
* being stored. This key is used to retrieve the
* stored constants in apc_load_constants.
Expand All @@ -94,21 +94,21 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int
* represent different values. If this parameter evaluates to FALSE the
* constants will be declared as case-insensitive symbols.
* @throws ApcException
*
*
*/
function apc_define_constants(string $key, array $constants, bool $case_sensitive = true): void
{
error_clear_last();
$result = \apc_define_constants($key, $constants, $case_sensitive);
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
}


/**
* Deletes the given files from the opcode cache.
*
*
* @param mixed $keys The files to be deleted. Accepts a string,
* array of strings, or an APCIterator
* object.
Expand All @@ -117,13 +117,13 @@ function apc_define_constants(string $key, array $constants, bool $case_sensitiv
* an empty array is returned on success, or an array of failed files
* is returned.
* @throws ApcException
*
*
*/
function apc_delete_file($keys)
{
error_clear_last();
$result = \apc_delete_file($keys);
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
return $result;
Expand All @@ -132,17 +132,17 @@ function apc_delete_file($keys)

/**
* Removes a stored variable from the cache.
*
*
* @param string|string[]|APCIterator $key The key used to store the value (with
* apc_store).
* @throws ApcException
*
*
*/
function apc_delete(string $key)
{
error_clear_last();
$result = \apc_delete($key);
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
return $result;
Expand All @@ -151,25 +151,25 @@ function apc_delete(string $key)

/**
* Increases a stored number.
*
*
* @param string $key The key of the value being increased.
* @param int $step The step, or value to increase.
* @param bool $success Optionally pass the success or fail boolean value to
* this referenced variable.
* @return int Returns the current value of key's value on success,
*
*
* @throws ApcException
*
*
*/
function apc_inc(string $key, int $step = 1, bool &$success = null): int
{
error_clear_last();
if ($success !== null) {
$result = \apc_inc($key, $step, $success);
}else {
} else {
$result = \apc_inc($key, $step);
}
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
return $result;
Expand All @@ -178,23 +178,21 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int

/**
* Loads a set of constants from the cache.
*
*
* @param string $key The name of the constant set (that was stored with
* apc_define_constants) to be retrieved.
* @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
* i.e. CONSTANT and Constant
* represent different values. If this parameter evaluates to FALSE the
* constants will be declared as case-insensitive symbols.
* @throws ApcException
*
*
*/
function apc_load_constants(string $key, bool $case_sensitive = true): void
{
error_clear_last();
$result = \apc_load_constants($key, $case_sensitive);
if ($result === FALSE) {
if ($result === false) {
throw ApcException::createFromPhpError();
}
}


Loading