diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 000000000..679d22906
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,53 @@
+name: PhpStorm Stubs Tests
+
+on: [push, pull_request, workflow_dispatch]
+
+jobs:
+ general:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
+ name: Run tests against php ${{matrix.php}}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Build Docker Container
+ run: docker-compose -f docker-compose.yml build >/dev/null
+ env:
+ PHP_VERSION: ${{matrix.php}}
+
+ - name: Composer Install
+ run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} test_runner composer update
+ env:
+ PHP_VERSION: ${{matrix.php}}
+
+ - name: Dump Reflection To File
+ run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
+ env:
+ PHP_VERSION: ${{matrix.php}}
+
+ - name: Run Tests
+ run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} test_runner vendor/bin/phpunit --testsuite PHP_${{matrix.php}}
+ env:
+ PHP_VERSION: ${{matrix.php}}
+ additional:
+ runs-on: ubuntu-latest
+ name: Run cs-fixer and stubs structure tests
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Composer Install
+ run: docker-compose -f docker-compose.yml run test_runner composer install
+
+ - name: Test PhpDoc
+ run: docker-compose -f docker-compose.yml run test_runner vendor/bin/phpunit --testsuite PhpDoc
+
+ - name: Test Stubs Map, Structure and Reflection
+ run: docker-compose -f docker-compose.yml run test_runner vendor/bin/phpunit --testsuite Structure
+
+ - name: run cs fixer
+ run: docker-compose -f docker-compose.yml run test_runner composer cs
diff --git a/.github/workflows/testLinks.yml b/.github/workflows/testLinks.yml
new file mode 100644
index 000000000..2cc556a8a
--- /dev/null
+++ b/.github/workflows/testLinks.yml
@@ -0,0 +1,28 @@
+name: PhpStorm Stubs Check Links
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '0 0 1 * *'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Composer Install
+ run: docker-compose -f docker-compose.yml run test_runner composer install
+ env:
+ PHP_VERSION: '8.0'
+
+ - name: Build Docker Container
+ run: docker-compose -f docker-compose.yml build >/dev/null
+ env:
+ PHP_VERSION: '8.0'
+
+ - name: Run Tests
+ run: docker-compose -f docker-compose.yml run -e CHECK_LINKS=true test_runner vendor/bin/phpunit --testsuite PhpDoc
+ env:
+ PHP_VERSION: '8.0'
diff --git a/.github/workflows/testPeclExtensions.yml b/.github/workflows/testPeclExtensions.yml
new file mode 100644
index 000000000..35f48771d
--- /dev/null
+++ b/.github/workflows/testPeclExtensions.yml
@@ -0,0 +1,35 @@
+name: PhpStorm Stubs PECL Test
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '0 0 1 * *'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Build Docker Container
+ run: docker-compose -f docker-compose.yml build >/dev/null
+ env:
+ PHP_VERSION: '8.0'
+
+ - name: Composer Install
+ run: docker-compose -f docker-compose.yml run test_runner composer install
+
+ - name: Dump Reflection With Pecl To File
+ run: docker-compose -f docker-compose.yml run pecl_extensions /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionDataPecl.json
+
+ - name: Dump Reflection Without Pecl To File
+ run: docker-compose -f docker-compose.yml run php_under_test /usr/local/bin/php tests/Tools/dump-reflection-to-file.php ReflectionData.json
+
+ - name: Build Reflection Data With Pecl Only
+ run: docker-compose -f docker-compose.yml run php_under_test /usr/local/bin/php tests/Tools/dump-pecl-to-file.php
+
+ - name: Run Tests
+ run: docker-compose -f docker-compose.yml run -e PHP_VERSION='8.0' test_runner vendor/bin/phpunit tests/
+ env:
+ PHP_VERSION: '8.0'
diff --git a/.gitignore b/.gitignore
index 9f2c8a609..bc8b7a41d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,14 @@ rest-client.private.env.json
.idea/workspace.xml
.idea/shelf
-#Composer
+# PHPUnit
+phpunit.xml
+
+# Composer
vendor
-composer.lock
\ No newline at end of file
+composer.lock
+
+.php_cs.cache
+.phpunit.result.cache
+
+ReflectionData.json
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index c5aecf806..a7b0332eb 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -8,6 +8,9 @@
* The argument offset. Function arguments are counted starting from
* zero.
*
* The string being measured for length.
*
+ * @param string $string1
* The first string.
*
+ * @param string $string2
* The second string.
*
+ * @param string $string1
* The first string.
*
+ * @param string $string2
* The second string.
*
+ * @param int $length
* Number of characters to use in the comparison.
*
+ * @param string $string1
* The first string
*
+ * @param string $string2
* The second string
*
+ * @param string $string1
* The first string.
*
+ * @param string $string2
* The second string.
*
+ * @param int $length
* The length of strings to be used in the comparison.
*
+ * @param array|ArrayObject &$array
* The input array.
*
+ * @param int|null $error_level [optional]
* The new error_reporting
- * level. It takes on either a bitmask, or named constants. Using named
- * constants is strongly encouraged to ensure compatibility for future
- * versions. As error levels are added, the range of integers increases,
+ * level. It takes on either a bitmask, or named constants. Using named
+ * constants is strongly encouraged to ensure compatibility for future
+ * versions. As error levels are added, the range of integers increases,
* so older integer-based error levels will not always behave as expected.
*
@@ -277,51 +310,51 @@ function each (array &$array) {}
* @return int the old error_reporting
* level or the current level if no level parameter is
* given.
- * @since 4.0
- * @since 5.0
*/
-function error_reporting ($level = null) {}
+function error_reporting(?int $error_level): int {}
/**
* Defines a named constant
* @link https://php.net/manual/en/function.define.php
- * @param string $name
+ * @param string $constant_name
* The name of the constant.
*
- * The value of the constant; only scalar and null values are allowed.
- * Scalar values are integer,
- * float, string or boolean values. It is
- * possible to define resource constants, however it is not recommended
- * and may cause unpredictable behavior.
+ * @param null|array|bool|int|float|string $value
+ * The value of the constant.
+ * In PHP 5, value must be a scalar value (integer, float, string, boolean, or null).
+ * In PHP 7, array values are also accepted.
+ * It is possible to define resource constants,
+ * however it is not recommended and may cause unpredictable behavior.
*
- * If set to true, the constant will be defined case-insensitive.
- * The default behavior is case-sensitive; i.e.
+ * If set to true, the constant will be defined case-insensitive.
+ * The default behavior is case-sensitive; i.e.
* CONSTANT and Constant represent
* different values.
+ * Defining case-insensitive constants is deprecated as of PHP 7.3.0.
*
* Case-insensitive constants are stored as lower-case.
*
+ * @param string $constant_name
* The constant name.
*
* The tested object. This parameter may be omitted when inside a class.
*
+ * @return string
The name of the class of which object is an + * instance. * If object is omitted when inside a class, the - * name of that class is returned. - * @since 4.0 - * @since 5.0 + * name of that class is returned.
*/ -function get_class ($object = null) {} +#[Pure] +function get_class(object $object): string {} /** * the "Late Static Binding" class name * @link https://php.net/manual/en/function.get-called-class.php - * @return string the class name. Returns false if called from outside a class. - * @since 5.3 + * @return string */ -function get_called_class () {} +#[Pure] +function get_called_class(): string {} /** * Retrieves the parent class name for object or class * @link https://php.net/manual/en/function.get-parent-class.php - * @param mixed $object [optional]+ * @param object|string $object_or_class [optional]
* The tested object or class name *
- * @return string the name of the parent class of the class of which + * @return string|falseThe name of the parent class of the class of which * object is an instance or the name. *
** If the object does not have a parent false will be returned. *
*- * If called without parameter outside object, this function returns false. - * @since 4.0 - * @since 5.0 + * If called without parameter outside object, this function returns false.
*/ -function get_parent_class ($object = null) {} +#[Pure] +function get_parent_class(object|string $object_or_class): string|false {} /** * Checks if the class method exists * @link https://php.net/manual/en/function.method-exists.php - * @param mixed $object+ * @param object|string $object_or_class
* An object instance or a class name *
- * @param string $method_name+ * @param string $method
* The method name *
* @return bool true if the method given by method_name * has been defined for the given object, false * otherwise. - * @since 4.0 - * @since 5.0 */ -function method_exists ($object, $method_name) {} +#[Pure] +function method_exists($object_or_class, string $method): bool {} /** * Checks if the object or class has a property * @link https://php.net/manual/en/function.property-exists.php - * @param mixed $class+ * @param object|string $object_or_class
* The class name or an object of the class to test for *
* @param string $property@@ -396,134 +423,142 @@ function method_exists ($object, $method_name) {} *
* @return bool true if the property exists, false if it doesn't exist or * null in case of an error. - * @since 5.1 */ -function property_exists ($class, $property) {} +#[Pure] +function property_exists($object_or_class, string $property): bool {} /** * Checks if the trait exists - * @param string $traitname Name of the trait to check + * @param string $trait Name of the trait to check * @param bool $autoload [optional] Whether to autoload if not already loaded. * @return bool Returns TRUE if trait exists, FALSE if not, NULL in case of an error. * @link https://secure.php.net/manual/en/function.trait-exists.php * @since 5.4 */ -function trait_exists($traitname, $autoload ) {} +function trait_exists(string $trait, bool $autoload = true): bool {} /** * Checks if the class has been defined * @link https://php.net/manual/en/function.class-exists.php - * @param string $class_name+ * @param string $class
* The class name. The name is matched in a case-insensitive manner. *
* @param bool $autoload [optional]- * Whether or not to call &link.autoload; by default. + * Whether or not to call autoload by default. *
* @return bool true if class_name is a defined class, * false otherwise. - * @since 4.0 - * @since 5.0 */ -function class_exists ($class_name, $autoload = true) {} +function class_exists(string $class, bool $autoload = true): bool {} /** * Checks if the interface has been defined * @link https://php.net/manual/en/function.interface-exists.php - * @param string $interface_name+ * @param string $interface
* The interface name *
* @param bool $autoload [optional]- * Whether to call &link.autoload; or not by default. + * Whether to call autoload or not by default. *
- * @return bool true if the interface given by + * @return bool true if the interface given by * interface_name has been defined, false otherwise. * @since 5.0.2 */ -function interface_exists ($interface_name, $autoload = true) {} +function interface_exists(string $interface, bool $autoload = true): bool {} /** * Return true if the given function has been defined * @link https://php.net/manual/en/function.function-exists.php - * @param string $function_name+ * @param string $function
* The function name, as a string. *
* @return bool true if function_name exists and is a * function, false otherwise. * *- * This function will return false for constructs, such as + * This function will return false for constructs, such as * include_once and echo. - * @since 4.0 - * @since 5.0 */ -function function_exists ($function_name) {} +#[Pure(true)] +function function_exists(string $function): bool {} + +/** + * Checks if the enum has been defined + * @link https://php.net/manual/en/function.enum-exists.php + * @param string $enum
+ * The enum name. The name is matched in a case-insensitive manner. + *
+ * @param bool $autoload [optional]+ * Whether or not to call autoload by default. + *
+ * @return bool true if enum is a defined enum, + * false otherwise. + * @since 8.1 + */ +function enum_exists(string $enum, bool $autoload = true): bool {} /** * Creates an alias for a class * @link https://php.net/manual/en/function.class-alias.php - * @param string $original The original class. + * @param string $class The original class. * @param string $alias The alias name for the class. * @param bool $autoload [optional] Whether to autoload if the original class is not found. * @return bool true on success or false on failure. - * @since 5.3 */ -function class_alias ($original, $alias, $autoload = TRUE) {} +function class_alias(string $class, string $alias, bool $autoload = true): bool {} /** * Returns an array with the names of included or required files * @link https://php.net/manual/en/function.get-included-files.php * @return string[] an array of the names of all files. - * ** The script originally called is considered an "included file," so it will - * be listed together with the files referenced by + * be listed together with the files referenced by * include and family. *
** Files that are included or required multiple times only show up once in * the returned array. - * @since 4.0 - * @since 5.0 + *
*/ -function get_included_files () {} +#[Pure(true)] +function get_included_files(): array {} /** * Alias of get_included_files * @link https://php.net/manual/en/function.get-required-files.php * @return string[] - * @since 4.0 - * @since 5.0 */ -function get_required_files () {} +#[Pure(true)] +function get_required_files(): array {} /** - * Checks if the object has this class as one of its parents + * checks if the object has this class as one of its parents or implements it * @link https://php.net/manual/en/function.is-subclass-of.php - * @param mixed $object+ * @param object|string $object_or_class
* A class name or an object instance *
- * @param string $class_name+ * @param string $class
* The class name *
* @param bool $allow_string [optional]* If this parameter set to false, string class name as object is not allowed. - * This also prevents from calling autoloader if the class doesn't exist. + * This also prevents from calling autoloader if the class doesn't exist. *
* @return bool This function returns true if the object object, - * belongs to a class which is a subclass of + * belongs to a class which is a subclass of * class_name, false otherwise. - * @since 4.0 - * @since 5.0 */ -function is_subclass_of ($object, $class_name, $allow_string = TRUE) {} +#[Pure] +function is_subclass_of(mixed $object_or_class, string $class, bool $allow_string = true): bool {} /** * Checks if the object is of this class or has this class as one of its parents * @link https://php.net/manual/en/function.is-a.php - * @param object|string $object+ * @param object|string $object_or_class
* The tested object *
- * @param string $class_name+ * @param string $class
* The class name *
* @param bool $allow_string [optional]@@ -532,25 +567,23 @@ function is_subclass_of ($object, $class_name, $allow_string = TRUE) {} *
* @return bool TRUE if the object is of this class or has this class as one of * its parents, FALSE otherwise. - * @since 4.0.4 - * @since 5.0 */ -function is_a ($object, $class_name, $allow_string = FALSE) {} +#[Pure] +function is_a(mixed $object_or_class, string $class, bool $allow_string = false): bool {} /** * Get the default properties of the class * @link https://php.net/manual/en/function.get-class-vars.php - * @param string $class_name+ * @param string $class
* The class name *
* @return array an associative array of declared properties visible from the * current scope, with their default value. - * The resulting array elements are in the form of + * The resulting array elements are in the form of * varname => value. - * @since 4.0 - * @since 5.0 */ -function get_class_vars ($class_name) {} +#[Pure] +function get_class_vars(string $class): array {} /** * Gets the properties of the given object @@ -561,59 +594,55 @@ function get_class_vars ($class_name) {} * @return array an associative array of defined object accessible non-static properties * for the specified object in scope. If a property have * not been assigned a value, it will be returned with a null value. - * @since 4.0 - * @since 5.0 */ -function get_object_vars ($object) {} +#[Pure] +function get_object_vars(object $object): array {} /** * Gets the class methods' names * @link https://php.net/manual/en/function.get-class-methods.php - * @param mixed $class_name+ * @param object|string $object_or_class
* The class name or an object instance *
- * @return array an array of method names defined for the class specified by + * @return string[] an array of method names defined for the class specified by * class_name. In case of an error, it returns null. - * @since 4.0 - * @since 5.0 */ -function get_class_methods ($class_name) {} +#[Pure] +function get_class_methods(object|string $object_or_class): array {} /** * Generates a user-level error/warning/notice message * @link https://php.net/manual/en/function.trigger-error.php - * @param string $error_msg- * The designated error message for this error. It's limited to 1024 - * characters in length. Any additional characters beyond 1024 will be + * @param string $message
+ * The designated error message for this error. It's limited to 1024 + * characters in length. Any additional characters beyond 1024 will be * truncated. *
- * @param int $error_type [optional]+ * @param int $error_level [optional]
* The designated error type for this error. It only works with the E_USER * family of constants, and will default to E_USER_NOTICE. *
* @return bool This function returns false if wrong error_type is * specified, true otherwise. - * @since 4.0.4 - * @since 5.0 */ -function trigger_error ($error_msg, $error_type = E_USER_NOTICE) {} +function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool {} /** * Alias of trigger_error * @link https://php.net/manual/en/function.user-error.php * @param string $message - * @param int $error_type [optional] - * @since 4.0 - * @since 5.0 + * @param int $error_level [optional] + * @return bool This function returns false if wrong error_type is + * specified, true otherwise. */ -function user_error ($message, $error_type = E_USER_NOTICE) {} +function user_error(string $message, int $error_level = E_USER_NOTICE): bool {} /** * Sets a user-defined error handler function * @link https://php.net/manual/en/function.set-error-handler.php - * @param callable|null $error_handler+ * @param callable|null $callback
* The user function needs to accept two parameters: the error code, and a - * string describing the error. Then there are three optional parameters + * string describing the error. Then there are three optional parameters * that may be supplied: the filename in which the error occurred, the * line number in which the error occurred, and the context in which the * error occurred (an array that points to the active symbol table at the @@ -628,8 +657,8 @@ function user_error ($message, $error_type = E_USER_NOTICE) {} * arrayerrcontext * errno * The first parameter, errno, contains the - * level of the error raised, as an integer. - * @param int $error_types [optional]
+ * level of the error raised, as an integer.
+ * @param int $error_levels [optional]* Can be used to mask the triggering of the * error_handler function just like the error_reporting ini setting * controls which errors are shown. Without this mask set the @@ -641,24 +670,21 @@ function user_error ($message, $error_type = E_USER_NOTICE) {} * in case of an error such as an invalid callback. If the previous error handler * was a class method, this function will return an indexed array with the class * and the method name. - * @since 4.0.4 - * @since 5.0 */ -function set_error_handler ($error_handler, $error_types = E_ALL | E_STRICT) {} +function set_error_handler(?callable $callback, int $error_levels = E_ALL|E_STRICT) {} /** * Restores the previous error handler function * @link https://php.net/manual/en/function.restore-error-handler.php * @return bool This function always returns true. - * @since 4.0.4 - * @since 5.0 */ -function restore_error_handler () {} +#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] +function restore_error_handler(): bool {} /** * Sets a user-defined exception handler function * @link https://php.net/manual/en/function.set-exception-handler.php - * @param callable|null $exception_handler
+ * @param callable|null $callback
* Name of the function to be called when an uncaught exception occurs. * This function must be defined before calling * set_exception_handler. This handler function @@ -668,43 +694,40 @@ function restore_error_handler () {} *
* @return callable|null the name of the previously defined exception handler, or null on error. If * no previous handler was defined, null is also returned. - * @since 5.0 */ -function set_exception_handler ($exception_handler) {} +function set_exception_handler(?callable $callback) {} /** * Restores the previously defined exception handler function * @link https://php.net/manual/en/function.restore-exception-handler.php * @return bool This function always returns true. - * @since 5.0 */ -function restore_exception_handler () {} +#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] +function restore_exception_handler(): bool {} /** * Returns an array with the name of the defined classes * @link https://php.net/manual/en/function.get-declared-classes.php - * @return array an array of the names of the declared classes in the current - * script. - * + * @return string[] an array of the names of the declared classes in the current script. ** Note that depending on what extensions you have compiled or * loaded into PHP, additional classes could be present. This means that * you will not be able to define your own classes using these * names. There is a list of predefined classes in the Predefined Classes section of * the appendices. - * @since 4.0 - * @since 5.0 + *
*/ -function get_declared_classes () {} +#[Pure(true)] +function get_declared_classes(): array {} /** * Returns an array of all declared interfaces * @link https://php.net/manual/en/function.get-declared-interfaces.php - * @return array an array of the names of the declared interfaces in the current + * @return string[] an array of the names of the declared interfaces in the current * script. - * @since 5.0 */ -function get_declared_interfaces () {} +#[Pure(true)] +function get_declared_interfaces(): array {} /** * Returns an array of all declared traits @@ -713,7 +736,8 @@ function get_declared_interfaces () {} * @see class_uses() * @since 5.4 */ -function get_declared_traits() {} +#[Pure(true)] +function get_declared_traits(): array {} /** * Returns an array of all defined functions @@ -724,19 +748,17 @@ function get_declared_traits() {} * functions will be accessible via $arr["internal"], and * the user defined ones using $arr["user"] (see example * below). - * @since 4.0.4 - * @since 5.0 */ -function get_defined_functions ($exclude_disabled = FALSE) {} +#[Pure(true)] +function get_defined_functions(#[PhpStormStubsElementAvailable(from: '7.1')] bool $exclude_disabled = true): array {} /** * Returns an array of all defined variables * @link https://php.net/manual/en/function.get-defined-vars.php * @return array A multidimensional array with all the variables. - * @since 4.0.4 - * @since 5.0 */ -function get_defined_vars () {} +#[Pure(true)] +function get_defined_vars(): array {} /** * Create an anonymous (lambda-style) function @@ -747,31 +769,24 @@ function get_defined_vars () {} * @param string $code* The function code. *
- * @return string a unique function name as a string, or false on error. - * @since 4.0.1 - * @since 5.0 - * @deprecated 7.2 Use anonymous functions instead. + * @return string|false a unique function name as a string, or false on error. + * @removed 8.0 */ -function create_function ($args, $code) {} +#[Deprecated(reason: "Use anonymous functions instead", since: "7.2")] +function create_function(string $args, string $code): false|string {} /** * Returns the resource type * @link https://php.net/manual/en/function.get-resource-type.php - * @param resource $handle+ * @param resource $resource
* The evaluated resource handle. *
* @return string If the given handle is a resource, this function * will return a string representing its type. If the type is not identified - * by this function, the return value will be the string + * by this function, the return value will be the string * Unknown. - * - *- * This function will return false and generate an error if - * handle is not a resource. - * @since 4.0.2 - * @since 5.0 */ -function get_resource_type ($handle) {} +function get_resource_type($resource): string {} /** * Returns an array with the names of all modules compiled and loaded @@ -780,16 +795,15 @@ function get_resource_type ($handle) {} * Only return Zend extensions, if not then regular extensions, like * mysqli are listed. Defaults to false (return regular extensions). *
- * @return array an indexed array of all the modules names. - * @since 4.0 - * @since 5.0 + * @return string[] an indexed array of all the modules names. */ -function get_loaded_extensions ($zend_extensions = false) {} +#[Pure] +function get_loaded_extensions(bool $zend_extensions = false): array {} /** * Find out whether an extension is loaded * @link https://php.net/manual/en/function.extension-loaded.php - * @param string $name+ * @param string $extension
* The extension name. *
*@@ -817,26 +831,24 @@ function get_loaded_extensions ($zend_extensions = false) {} *
* @return bool true if the extension identified by name * is loaded, false otherwise. - * @since 4.0 - * @since 5.0 */ -function extension_loaded ($name) {} +#[Pure] +function extension_loaded(string $extension): bool {} /** * Returns an array with the names of the functions of a module * @link https://php.net/manual/en/function.get-extension-funcs.php - * @param string $module_name+ * @param string $extension
* The module name. *
** This parameter must be in lowercase. *
- * @return array an array with all the functions, or false if + * @return string[]|false an array with all the functions, or false if * module_name is not a valid extension. - * @since 4.0 - * @since 5.0 */ -function get_extension_funcs ($module_name) {} +#[Pure] +function get_extension_funcs(string $extension): array|false {} /** * Returns an associative array with the names of all the constants and their values @@ -890,19 +902,18 @@ function get_extension_funcs ($module_name) {} * ) * * - * @return array - * @since 4.1 - * @since 5.0 + * @return array */ -function get_defined_constants ($categorize = false) {} +#[Pure(true)] +function get_defined_constants(bool $categorize = false): array {} /** * Generates a backtrace * @link https://php.net/manual/en/function.debug-backtrace.php * @param int $options [optional]- * As of 5.3.6, this parameter is a bitmask for the following options: - *
DEBUG_BACKTRACE_PROVIDE_OBJECT | *@@ -917,6 +928,7 @@ function get_defined_constants ($categorize = false) {} * | *
* Before 5.3.6, the only values recognized are true or false, which are the same as * setting or not setting the DEBUG_BACKTRACE_PROVIDE_OBJECT option respectively. *
@@ -924,15 +936,16 @@ function get_defined_constants ($categorize = false) {} * As of 5.4.0, this parameter can be used to limit the number of stack frames returned. * By default (limit=0) it returns all stack frames. * - * @return array an array of associative arrays. The possible returned elements + * @return arrayan array of associative arrays. The possible returned elements * are as follows: *
*- *
&Name; | - *&Type; | + *Name | + *Type | *Description | *
* As of 5.3.6, this parameter is a bitmask for the following options: - *
DEBUG_BACKTRACE_IGNORE_ARGS | + *DEBUG_BACKTRACE_IGNORE_ARGS | *
* Whether or not to omit the "args" index, and thus all the function/method arguments,
* to save memory.
@@ -1014,49 +1025,59 @@ function debug_backtrace ($options = DEBUG_BACKTRACE_PROVIDE_OBJECT, $limit = 0)
*
* @param int $limit [optional] * As of 5.4.0, this parameter can be used to limit the number of stack frames printed. - * By default (limit=0) it prints all stack frames. + * By default (limit = 0) it prints all stack frames. * * @return void - * @since 5.0 */ -function debug_print_backtrace ($options = 0, $limit = 0) {} +function debug_print_backtrace( + int $options = 0, + #[PhpStormStubsElementAvailable(from: '7.0')] int $limit = 0 +): void {} /** * Forces collection of any existing garbage cycles * @link https://php.net/manual/en/function.gc-collect-cycles.php * @return int number of collected cycles. - * @since 5.3 */ -function gc_collect_cycles () {} +function gc_collect_cycles(): int {} /** * Returns status of the circular reference collector * @link https://php.net/manual/en/function.gc-enabled.php * @return bool true if the garbage collector is enabled, false otherwise. - * @since 5.3 */ -function gc_enabled () {} +#[Pure(true)] +function gc_enabled(): bool {} /** * Activates the circular reference collector * @link https://php.net/manual/en/function.gc-enable.php - * @return void - * @since 5.3 + * @return void */ -function gc_enable () {} +function gc_enable(): void {} /** * Deactivates the circular reference collector * @link https://php.net/manual/en/function.gc-disable.php - * @return void - * @since 5.3 + * @return void */ -function gc_disable () {} +function gc_disable(): void {} /** + * Gets information about the garbage collector + * @link https://php.net/manual/en/function.gc-status.php + * @return int[] associative array with the following elements: + *
+ * @param string|null $type [optional] * * If defined, this will cause get_resources() to only return resources of the given type. A list of resource types is available. * @@ -1077,7 +1098,8 @@ function gc_mem_caches () {} * * If omitted, all resources will be returned. * - * @return array Returns an array of currently active resources, indexed by resource number. + * @return resource[] Returns an array of currently active resources, indexed by resource number. * @since 7.0 */ -function get_resources ($type) {} +#[Pure(true)] +function get_resources(?string $type): array {} diff --git a/Core/Core_c.php b/Core/Core_c.php index d3912025d..696095752 100644 --- a/Core/Core_c.php +++ b/Core/Core_c.php @@ -1,13 +1,17 @@ */ -interface Traversable extends iterable { -} +interface Traversable extends iterable {} /** * Interface to create an external Iterator. * @link https://php.net/manual/en/class.iteratoraggregate.php + * @template TKey + * @template-covariant TValue + * @template-implements Traversable* The return value will be casted to boolean if non-boolean was returned. - * @since 5.0 */ - public function offsetExists($offset); + #[TentativeType] + public function offsetExists(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): bool; /** * Offset to retrieve @@ -116,80 +131,80 @@ public function offsetExists($offset); * @param mixed $offset * The offset to retrieve. * - * @return mixed Can return all value types. - * @since 5.0 + * @return TValue Can return all value types. */ - public function offsetGet($offset); + #[TentativeType] + public function offsetGet(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): mixed; /** * Offset to set * @link https://php.net/manual/en/arrayaccess.offsetset.php - * @param mixed $offset+ * @param TKey $offset * The offset to assign the value to. * - * @param mixed $value+ * @param TValue $value * The value to set. * * @return void - * @since 5.0 */ - public function offsetSet($offset, $value); + #[TentativeType] + public function offsetSet( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value + ): void; /** * Offset to unset * @link https://php.net/manual/en/arrayaccess.offsetunset.php - * @param mixed $offset+ * @param TKey $offset * The offset to unset. * * @return void - * @since 5.0 */ - public function offsetUnset($offset); + #[TentativeType] + public function offsetUnset(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $offset): void; } /** - * Interface for customized serializing. + * Interface for customized serializing.+ * As of PHP 8.1.0, a class which implements Serializable without also implementing `__serialize()` and `__unserialize()` + * will generate a deprecation warning. * @link https://php.net/manual/en/class.serializable.php */ -interface Serializable { - +interface Serializable +{ /** - * String representation of object + * String representation of object. * @link https://php.net/manual/en/serializable.serialize.php - * @return string the string representation of the object or null - * @since 5.1 + * @return string|null The string representation of the object or null + * @throws Exception Returning other type than string or null */ public function serialize(); /** - * Constructs the object + * Constructs the object. * @link https://php.net/manual/en/serializable.unserialize.php - * @param string $serialized - * The string representation of the object. - * + * @param string $data The string representation of the object. * @return void - * @since 5.1 */ - public function unserialize($serialized); + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data); } - /** * Throwable is the base interface for any object that can be thrown via a throw statement in PHP 7, * including Error and Exception. * @link https://php.net/manual/en/class.throwable.php * @since 7.0 */ -interface Throwable +interface Throwable extends Stringable { - /** * Gets the message * @link https://php.net/manual/en/throwable.getmessage.php * @return string * @since 7.0 */ - public function getMessage(); + public function getMessage(): string; /** * Gets the exception code @@ -210,7 +225,7 @@ public function getCode(); * @return string Returns the name of the file from which the object was thrown. * @since 7.0 */ - public function getFile(); + public function getFile(): string; /** * Gets the line on which the object was instantiated @@ -218,7 +233,7 @@ public function getFile(); * @return int Returns the line number where the thrown object was instantiated. * @since 7.0 */ - public function getLine(); + public function getLine(): int; /** * Gets the stack trace @@ -229,7 +244,7 @@ public function getLine(); * * @since 7.0 */ - public function getTrace(); + public function getTrace(): array; /** * Gets the stack trace as a string @@ -237,14 +252,15 @@ public function getTrace(); * @return string Returns the stack trace as a string. * @since 7.0 */ - public function getTraceAsString(); + public function getTraceAsString(): string; /** * Returns the previous Throwable * @link https://php.net/manual/en/throwable.getprevious.php - * @return Throwable Returns the previous {@see Throwable} if available, or NULL otherwise. + * @return null|Throwable Returns the previous {@see Throwable} if available, or NULL otherwise. * @since 7.0 */ + #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: '')] public function getPrevious(); /** @@ -255,44 +271,67 @@ public function getPrevious(); */ public function __toString(); } + /** * Exception is the base class for * all Exceptions. * @link https://php.net/manual/en/class.exception.php */ -class Exception implements Throwable { +class Exception implements Throwable +{ + /** The error message */ protected $message; + + /** The error code */ protected $code; + + /** The filename where the error happened */ + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] protected $file; + + /** The line where the error happened */ + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] protected $line; + /** + * Clone the exception + * Tries to clone the Exception, which results in Fatal error. + * @link https://php.net/manual/en/exception.clone.php + * @return void + */ + #[PhpStormStubsElementAvailable(from: "5.4", to: "8.0")] + final private function __clone(): void {} /** * Clone the exception * Tries to clone the Exception, which results in Fatal error. * @link https://php.net/manual/en/exception.clone.php * @return void - * @since 5.1 */ - final private function __clone() { } + #[PhpStormStubsElementAvailable("8.1")] + private function __clone(): void {} /** * Construct the exception. Note: The message is NOT binary safe. * @link https://php.net/manual/en/exception.construct.php * @param string $message [optional] The Exception message to throw. * @param int $code [optional] The Exception code. - * @param Throwable $previous [optional] The previous throwable used for the exception chaining. - * @since 5.1 + * @param null|Throwable $previous [optional] The previous throwable used for the exception chaining. */ - public function __construct($message = "", $code = 0, Throwable $previous = null) { } + #[Pure] + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "", + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0, + #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: 'Throwable')] $previous = null + ) {} /** * Gets the Exception message * @link https://php.net/manual/en/exception.getmessage.php * @return string the Exception message as a string. - * @since 5.1 */ - final public function getMessage() { } + #[Pure] + final public function getMessage(): string {} /** * Gets the Exception code @@ -301,60 +340,61 @@ final public function getMessage() { } * Exception but possibly as other type in * Exception descendants (for example as * string in PDOException). - * @since 5.1 */ - final public function getCode() { } + #[Pure] + final public function getCode() {} /** * Gets the file in which the exception occurred * @link https://php.net/manual/en/exception.getfile.php * @return string the filename in which the exception was created. - * @since 5.1 */ - final public function getFile() { } + #[Pure] + final public function getFile(): string {} /** * Gets the line in which the exception occurred * @link https://php.net/manual/en/exception.getline.php * @return int the line number where the exception was created. - * @since 5.1 */ - final public function getLine() { } + #[Pure] + final public function getLine(): int {} /** * Gets the stack trace * @link https://php.net/manual/en/exception.gettrace.php * @return array the Exception stack trace as an array. - * @since 5.1 */ - final public function getTrace() { } + #[Pure] + final public function getTrace(): array {} /** * Returns previous Exception * @link https://php.net/manual/en/exception.getprevious.php - * @return Exception the previous Exception if available + * @return null|Throwable Returns the previous {@see Throwable} if available, or NULL otherwise. * or null otherwise. - * @since 5.3 */ - final public function getPrevious() { } + #[Pure] + final public function getPrevious(): ?Throwable {} /** * Gets the stack trace as a string * @link https://php.net/manual/en/exception.gettraceasstring.php * @return string the Exception stack trace as a string. - * @since 5.1 */ - final public function getTraceAsString() { } + #[Pure] + final public function getTraceAsString(): string {} /** * String representation of the exception * @link https://php.net/manual/en/exception.tostring.php * @return string the string representation of the exception. - * @since 5.1 */ - public function __toString() { } + #[TentativeType] + public function __toString(): string {} - public function __wakeup() { } + #[TentativeType] + public function __wakeup(): void {} } /** @@ -362,18 +402,35 @@ public function __wakeup() { } * @link https://php.net/manual/en/class.error.php * @since 7.0 */ -class Error implements Throwable { +class Error implements Throwable +{ + /** The error message */ + protected $message; + + /** The error code */ + protected $code; + + /** The filename where the error happened */ + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] + protected $file; + + /** The line where the error happened */ + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] + protected $line; /** * Construct the error object. * @link https://php.net/manual/en/error.construct.php * @param string $message [optional] The Error message to throw. * @param int $code [optional] The Error code. - * @param Throwable $previous [optional] The previous throwable used for the exception chaining. + * @param null|Throwable $previous [optional] The previous throwable used for the exception chaining. */ - public function __construct($message = "", $code = 0, Throwable $previous = null) - { - } + #[Pure] + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "", + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0, + #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: 'Throwable')] $previous = null + ) {} /*** * Gets the message @@ -381,9 +438,7 @@ public function __construct($message = "", $code = 0, Throwable $previous = null * @return string * @since 7.0 */ - public final function getMessage() - { - } + final public function getMessage(): string {} /** * Gets the exception code @@ -396,8 +451,7 @@ public final function getMessage() * * @since 7.0 */ - public final function getCode(){} - + final public function getCode() {} /** * Gets the file in which the exception occurred @@ -405,8 +459,7 @@ public final function getCode(){} * @return string Returns the name of the file from which the object was thrown. * @since 7.0 */ - public final function getFile(){} - + final public function getFile(): string {} /** * Gets the line on which the object was instantiated @@ -414,8 +467,7 @@ public final function getFile(){} * @return int Returns the line number where the thrown object was instantiated. * @since 7.0 */ - public final function getLine(){} - + final public function getLine(): int {} /** * Gets the stack trace @@ -426,7 +478,7 @@ public final function getLine(){} * * @since 7.0 */ - public final function getTrace(){} + final public function getTrace(): array {} /** * Gets the stack trace as a string @@ -434,22 +486,32 @@ public final function getTrace(){} * @return string Returns the stack trace as a string. * @since 7.0 */ - public final function getTraceAsString(){} + final public function getTraceAsString(): string {} /** * Returns the previous Throwable * @link https://php.net/manual/en/throwable.getprevious.php - * @return Throwable Returns the previous {@see Throwable} if available, or NULL otherwise. + * @return null|Throwable Returns the previous {@see Throwable} if available, or NULL otherwise. * @since 7.0 */ - public final function getPrevious(){} + final public function getPrevious(): ?Throwable {} + /** * Gets a string representation of the thrown object * @link https://php.net/manual/en/throwable.tostring.php * @return stringReturns the string representation of the thrown object. * @since 7.0 */ - public function __toString(){} + public function __toString(): string {} + + /** + * Clone the error + * Error can not be clone, so this method results in fatal error. + * @return void + * @link https://php.net/manual/en/error.clone.php + */ + #[PhpStormStubsElementAvailable(from: "7.0", to: "8.0")] + final private function __clone(): void {} /** * Clone the error @@ -457,11 +519,15 @@ public function __toString(){} * @return void * @link https://php.net/manual/en/error.clone.php */ - private final function __clone(){} + #[PhpStormStubsElementAvailable('8.1')] + private function __clone(): void {} - public function __wakeup(){} + #[TentativeType] + public function __wakeup(): void {} } +class ValueError extends Error {} + /** * There are three scenarios where a TypeError may be thrown. * The first is where the argument type being passed to a function does not match its corresponding declared @@ -470,18 +536,14 @@ public function __wakeup(){} * @link https://php.net/manual/en/class.typeerror.php * @since 7.0 */ -class TypeError extends Error { - -} +class TypeError extends Error {} /** * ParseError is thrown when an error occurs while parsing PHP code, such as when {@see eval()} is called. * @link https://php.net/manual/en/class.parseerror.php * @since 7.0 */ -class ParseError extends CompileError { - -} +class ParseError extends CompileError {} /** * ArgumentCountError is thrown when too few arguments are passed to a user @@ -499,37 +561,36 @@ class ArgumentCountError extends TypeError {} * @link https://php.net/manual/en/class.arithmeticerror.php * @since 7.0 */ -class ArithmeticError extends Error { - -} +class ArithmeticError extends Error {} /** * Class CompileError * @link https://secure.php.net/manual/en/class.compileerror.php * @since 7.3 */ -class CompileError extends Error { - -} +class CompileError extends Error {} /** * DivisionByZeroError is thrown when an attempt is made to divide a number by zero. * @link https://php.net/manual/en/class.divisionbyzeroerror.php * @since 7.0 */ -class DivisionByZeroError extends ArithmeticError { +class DivisionByZeroError extends ArithmeticError {} -} +/** + * @since 8.0 + */ +class UnhandledMatchError extends Error {} /** * An Error Exception. * @link https://php.net/manual/en/class.errorexception.php */ -class ErrorException extends Exception { - +class ErrorException extends Exception +{ + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] protected $severity; - /** * Constructs the exception * @link https://php.net/manual/en/errorexception.construct.php @@ -537,19 +598,25 @@ class ErrorException extends Exception { * @param int $code [optional] The Exception code. * @param int $severity [optional] The severity level of the exception. * @param string $filename [optional] The filename where the exception is thrown. - * @param int $lineno [optional] The line number where the exception is thrown. + * @param int $line [optional] The line number where the exception is thrown. * @param Exception $previous [optional] The previous exception used for the exception chaining. - * @since 5.1 */ - public function __construct($message = "", $code = 0, $severity = 1, $filename = __FILE__, $lineno = __LINE__, $previous = null) { } + #[Pure] + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "", + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $severity = 1, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = __FILE__, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $line = __LINE__, + #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: 'Throwable')] $previous = null + ) {} /** * Gets the exception severity * @link https://php.net/manual/en/errorexception.getseverity.php * @return int the severity level of the exception. - * @since 5.1 */ - final public function getSeverity() { } + final public function getSeverity(): int {} } /** @@ -561,65 +628,64 @@ final public function getSeverity() { } * This is for consistency with other classes that implement calling magic, as this method is not used for calling the function. * @link https://secure.php.net/manual/en/class.closure.php */ -final class Closure { - +final class Closure +{ /** * This method exists only to disallow instantiation of the Closure class. * Objects of this class are created in the fashion described on the anonymous functions page. * @link https://secure.php.net/manual/en/closure.construct.php */ - private function __construct() { } + private function __construct() {} /** * This is for consistency with other classes that implement calling magic, * as this method is not used for calling the function. - * @param mixed $_ [optional] + * @param mixed ...$_ [optional] * @return mixed * @link https://secure.php.net/manual/en/class.closure.php */ - public function __invoke(...$_) { } + public function __invoke(...$_) {} /** * Duplicates the closure with a new bound object and class scope * @link https://secure.php.net/manual/en/closure.bindto.php - * @param object $newthis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound. - * @param mixed $newscope The class scope to which associate the closure is to be associated, or 'static' to keep the current one. + * @param object|null $newThis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound. + * @param mixed $newScope The class scope to which associate the closure is to be associated, or 'static' to keep the current one. * If an object is given, the type of the object will be used instead. * This determines the visibility of protected and private methods of the bound object. - * @return Closure Returns the newly created Closure object or FALSE on failure + * @return Closure|null Returns the newly created Closure object or null on failure */ - function bindTo($newthis, $newscope = 'static') { } + public function bindTo(?object $newThis, object|string|null $newScope = 'static'): ?Closure {} /** * This method is a static version of Closure::bindTo(). * See the documentation of that method for more information. - * @static * @link https://secure.php.net/manual/en/closure.bind.php * @param Closure $closure The anonymous functions to bind. - * @param object $newthis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound. - * @param mixed $newscope The class scope to which associate the closure is to be associated, or 'static' to keep the current one. + * @param object|null $newThis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound. + * @param mixed $newScope The class scope to which associate the closure is to be associated, or 'static' to keep the current one. * If an object is given, the type of the object will be used instead. * This determines the visibility of protected and private methods of the bound object. - * @return Closure Returns the newly created Closure object or FALSE on failure + * @return Closure|null Returns the newly created Closure object or null on failure */ - static function bind(Closure $closure, $newthis, $newscope = 'static') { } + public static function bind(Closure $closure, ?object $newThis, object|string|null $newScope = 'static'): ?Closure {} /** * Temporarily binds the closure to newthis, and calls it with any given parameters. * @link https://php.net/manual/en/closure.call.php * @param object $newThis The object to bind the closure to for the duration of the call. - * @param mixed $parameters [optional] Zero or more parameters, which will be given as parameters to the closure. + * @param mixed $args [optional] Zero or more parameters, which will be given as parameters to the closure. * @return mixed * @since 7.0 */ - function call ($newthis, ...$parameters) {} - + public function call(object $newThis, mixed ...$args): mixed {} + /** - * @param callable $callable + * @param callable $callback * @return Closure * @since 7.1 */ - public static function fromCallable (callable $callable) {} + public static function fromCallable(callable $callback): Closure {} } /** @@ -627,27 +693,30 @@ public static function fromCallable (callable $callable) {} * count function. * @link https://php.net/manual/en/class.countable.php */ -interface Countable { - +interface Countable +{ /** * Count elements of an object * @link https://php.net/manual/en/countable.count.php - * @return int The custom count as an integer. - * + * @return int<0,max> The custom count as an integer. ** The return value is cast to an integer. - * @since 5.1 + * */ - public function count(); + #[TentativeType] + public function count(): int; } /** * Weak references allow the programmer to retain a reference to an * object which does not prevent the object from being destroyed. * They are useful for implementing cache like structures. + * @template T of object * @link https://www.php.net/manual/en/class.weakreference.php + * @since 7.4 */ -class WeakReference { +final class WeakReference +{ /** * This method exists only to disallow instantiation of the WeakReference * class. Weak references are to be instantiated with the factory method @@ -658,18 +727,400 @@ public function __construct() {} /** * Create a new weak reference. * @link https://www.php.net/manual/en/weakreference.create.php - * @param object $referent The object to be weakly referenced. - * @return WeakReference the freshly instantiated object. - * @since 7.4.0 + * @template TIn of object + * @param TIn $object Any object. + * @return WeakReferenceLuaSandbox::getProfilerFunctionReport()
+ * to return timings in samples.
+ */
+ public const SAMPLES = 0;
+
+ /**
+ * Used with LuaSandbox::getProfilerFunctionReport()
+ * to return timings in seconds.
+ */
+ public const SECONDS = 1;
+
+ /**
+ * Used with LuaSandbox::getProfilerFunctionReport()
+ * to return timings in percentages of the total.
+ */
+ public const PERCENT = 2;
+
+ /**
+ * Call a function in a Lua global variable.
+ *
+ * If the name contains "." characters, the function is located via recursive table accesses, + * as if the name were a Lua expression. + * + *If the variable does not exist, or is not a function, + * false will be returned and a warning issued. + * + *For more information about calling Lua functions and the return values,
+ * see Lua variable name. + * @param mixed[] $argumentsArguments to the function. + * @return array|boolReturns an array of values returned by the Lua function, + * which may be empty, or false in case of failure. + * @see LuaSandboxFunction::call() + * @since luasandbox >= 1.0.0 + */ + public function callFunction($name, array $arguments) {} + + /** + * Disable the profiler. + * + * @link https://www.php.net/manual/en/luasandbox.disableProfiler.php + * @since luasandbox >= 1.1.0 + * @see LuaSandbox::enableProfiler() + * @see LuaSandbox::getProfilerFunctionReport() + */ + public function disableProfiler() {} + + /** + * Enable the profiler. + * + *The profiler periodically samples the Lua environment + * to record the running function. Testing indicates that + * at least on Linux, setting a period less than 1ms will + * lead to a high overrun count but no performance problems. + * + * @link https://www.php.net/manual/en/luasandbox.enableprofiler.php + * @param float $period [optional]Sampling period in seconds. + * @return boolReturns a boolean indicating whether the profiler is enabled. + * @since luasandbox >= 1.1.0 + * @see LuaSandbox::disableProfiler() + * @see LuaSandbox::getProfilerFunctionReport() + */ + public function enableProfiler($period = 0.02) {} + + /** + * Fetch the current CPU time usage of the Lua environment. + * + *This includes time spent in PHP callbacks. + * + *Note: On Windows, this function always returns zero. + * On operating systems that do not support CLOCK_THREAD_CPUTIME_ID, + * such as FreeBSD and Mac OS X, this function will return the + * elapsed wall-clock time, not CPU time. + * + * @link https://www.php.net/manual/en/luasandbox.getcpuusage.php + * @return floatReturns the current CPU time usage in seconds. + * @since luasandbox >= 1.0.0 + * @see LuaSandbox::getMemoryUsage() + * @see LuaSandbox::getPeakMemoryUsage() + * @see LuaSandbox::setCPULimit() + */ + public function getCPUUsage() {} + + /** + * Fetch the current memory usage of the Lua environment. + * + * @link https://www.php.net/manual/en/luasandbox.getmemoryusage.php + * @return int + * @since luasandbox >= 1.0.0 + * @see LuaSandbox::getMemoryUsage() + * @see LuaSandbox::getCPUUsage() + * @see LuaSandbox::setMemoryLimit() + */ + public function getMemoryUsage() {} + + /** + * Fetch the peak memory usage of the Lua environment. + * + * @link https://www.php.net/manual/en/luasandbox.getpeakmemoryusage.php + * @return intReturns the current memory usage in bytes. + * @since luasandbox >= 1.0.0 + * @see LuaSandbox::getMemoryUsage() + * @see LuaSandbox::getCPUUsage() + * @see LuaSandbox::setMemoryLimit() + */ + public function getPeakMemoryUsage() {} + + /** + * Fetch profiler data. + * + *For a profiling instance previously started by The measurement unit used for the cost is determined by the $units parameter: + *LuaSandbox::SAMPLES Measure in number of samples.LuaSandbox::SECONDS Measure in seconds of CPU time.LuaSandbox::PERCENT Measure percentage of CPU time.Note: On Windows, this function always returns an empty array. + * On operating systems that do not support CLOCK_THREAD_CPUTIME_ID, + * such as FreeBSD and Mac OS X, this function will report the + * elapsed wall-clock time, not CPU time. + * + * @link https://www.php.net/manual/en/luasandbox.getprofilerfunctionreport.php + * @param int $units Measurement unit constant. + * @return arrayReturns profiler measurements, sorted in descending order, as an associative array. + * Keys are the Lua function names (with source file and line defined in angle brackets), values are the + * measurements as integer or float. + * @since luasandbox >= 1.1.0 + * @see LuaSandbox::SAMPLES + * @see LuaSandbox::SECONDS + * @see LuaSandbox::PERCENT + */ + public function getProfilerFunctionReport($units = LuaSandbox::SECONDS) {} + + /** + * Return the versions of LuaSandbox and Lua. + * + * @link https://www.php.net/manual/en/luasandbox.getversioninfo.php + * @return arrayReturns an array with two keys: + *Loads data generated by Data from Name for the loaded function. + * @return LuaSandboxFunction + * @since luasandbox >= 1.0.0 + * @see LuaSandbox::loadString() + */ + public function loadBinary($code, $chunkName = '') {} + + /** + * Load Lua code into the Lua environment. + * + *This is the equivalent of standard Lua's Lua code. + * @param string $chunkName [optional]Name for the loaded chunk, for use in error traces. + * @return LuaSandboxFunctionReturns a This only has effect when called from within a callback from Lua. + * When execution returns to Lua, the timer will be automatically unpaused. + * If a new call into Lua is made, the timer will be unpaused + * for the duration of that call. + * + *If a PHP callback calls into Lua again with timer not paused, + * and then that Lua function calls into PHP again, + * the second PHP call will not be able to pause the timer. + * The logic is that even though the second PHP call would + * avoid counting the CPU usage against the limit, + * the first call still counts it. + * + * @link https://www.php.net/manual/en/luasandbox.pauseusagetimer.php + * @return boolReturns a boolean indicating whether the timer is now paused. + * @since luasandbox >= 1.4.0 + * @see LuaSandbox::setCPULimit() + * @see LuaSandbox::unpauseUsageTimer() + */ + public function pauseUsageTimer() {} + + /** + * Register a set of PHP functions as a Lua library. + * + *Registers a set of PHP functions as a Lua library, + * so that Lua can call the relevant PHP code. + * + *For more information about calling Lua functions and the return values,
+ * see The name of the library. + * In the Lua state, the global variable of this name will be set to the table of functions. + * If the table already exists, the new functions will be added to it. + * @param array $functionsReturns an array, where each key is a function name, + * and each value is a corresponding PHP callable. + * @since luasandbox >= 1.0.0 + * @see LuaSandbox::loadString() + * @see LuaSandbox::wrapPhpFunction() + */ + public function registerLibrary($libname, $functions) {} + + /** + * Set the CPU time limit for the Lua environment. + * + *If the total user and system time used by the environment after the call
+ * to this method exceeds this limit, a Time used in PHP callbacks is included in the limit. + * + *Setting the time limit from a callback while Lua is running causes the timer to be reset, + * or started if it was not already running. + * + *Note: On Windows, the CPU limit will be ignored. On operating systems + * that do not support CLOCK_THREAD_CPUTIME_ID, such as FreeBSD and + * Mac OS X, wall-clock time rather than CPU time will be limited. + * + * @link https://www.php.net/manual/en/luasandbox.setcpulimit.php + * @param bool|float $limitLimit as a float in seconds, or false for no limit. + * @since luasandbox >= 1.0.0 + * @see LuaSandbox::getCPUUsage() + * @see LuaSandbox::setMemoryLimit() + */ + public function setCPULimit($limit) {} + + /** + * Set the memory limit for the Lua environment. + * + * @link https://www.php.net/manual/en/luasandbox.setmemorylimit.php + * @param int $limitMemory limit in bytes. + * @throws LuaSandboxMemoryErrorException is thrown if this limit is exceeded. + * @since luasandbox >= 1.0.0 + * @see LuaSandbox::getMemoryUsage() + * @see LuaSandbox::getPeakMemoryUsage() + * @see LuaSandbox::setCPULimit() + */ + public function setMemoryLimit($limit) {} + + /** + * Unpause the timer paused byLuaSandbox::pauseUsageTimer() .
+ *
+ * @link https://www.php.net/manual/en/luasandbox.unpauseusagetimer.php
+ * @since luasandbox >= 1.0.0
+ * @see LuaSandbox::setCPULimit()
+ * @see LuaSandbox::unpauseUsageTimer()
+ */
+ public function unpauseUsageTimer() {}
+
+ /**
+ * Wrap a PHP callable in a LuaSandboxFunction.
+ *
+ * Wraps a PHP callable in a The function must return either an array of values (which may be empty), + * or NULL which is equivalent to returning the empty array. + * + *Exceptions will be raised as errors in Lua, however only For more information about calling Lua functions and the return values,
+ * see Callable to wrap. + * @return LuaSandboxFunction + * @since luasandbox >= 1.2.0 + * @see LuaSandbox::loadString() + * @see LuaSandbox::registerLibrary() + */ + public function wrapPhpFunction($function) {} +} + +/** + * Represents a Lua function, allowing it to be called from PHP. + * + *A LuaSandboxFunction may be obtained as a return value from Lua,
+ * as a parameter passed to a callback from Lua,
+ * or by using Errors considered to be the fault of the PHP code will result in the + * function returning false and E_WARNING being raised, for example, + * a resource type being used as an argument. Lua errors will result + * in a LuaSandboxRuntimeError exception being thrown. + * + *PHP and Lua types are converted as follows: + *
Lua functions inherently return a list of results. So on success, + * this method returns an array containing all of the values returned by Lua, + * with integer keys starting from zero. + * Lua may return no results, in which case an empty array is returned. + * + * @link https://www.php.net/manual/en/luasandboxfunction.call.php + * @param string[] $argumentsArguments passed to the function. + * @return array|boolReturns an array of values returned by the function, + * which may be empty, or false on error. + * @since luasandbox >= 1.0.0 + */ + public function call($arguments) {} + + /** + * Dump the function as a binary blob. + * + * @link https://www.php.net/manual/en/luasandboxfunction.dump.php + * @return stringReturns a string that may be passed to These may be caught inside Lua using These may not be caught inside Lua using
- * using PDO::ATTR_DRIVER_NAME
- *
- * Forcing queries to be buffered in mysql
- * - * Enable LOAD LOCAL INFILE. - * - *- * Note, this constant can only be used in the driver_options - * array when constructing a new database handle. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-local-infile - */ - const MYSQL_ATTR_LOCAL_INFILE = 1001; - - /** - *- * Command to execute when connecting to the MySQL server. Will - * automatically be re-executed when reconnecting. - * - *- * Note, this constant can only be used in the driver_options - * array when constructing a new database handle. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-init-command - */ - const MYSQL_ATTR_INIT_COMMAND = 1002; - - /** - *- * Maximum buffer size. Defaults to 1 MiB. This constant is not supported when - * compiled against mysqlnd. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-max-buffer-size - */ - const MYSQL_ATTR_MAX_BUFFER_SIZE = 1005; - - /** - *- * Read options from the named option file instead of from - * my.cnf. This option is not available if - * mysqlnd is used, because mysqlnd does not read the mysql - * configuration files. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-read-default-file - */ - const MYSQL_ATTR_READ_DEFAULT_FILE = 1003; - - /** - *- * Read options from the named group from my.cnf or the - * file specified with MYSQL_READ_DEFAULT_FILE. This option - * is not available if mysqlnd is used, because mysqlnd does not read the mysql - * configuration files. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-read-default-group - */ - const MYSQL_ATTR_READ_DEFAULT_GROUP = 1004; - - /** - *- * Enable network communication compression. This is not supported when - * compiled against mysqlnd. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-compress - */ - const MYSQL_ATTR_COMPRESS = 1006; - - /** - *- * Perform direct queries, don't use prepared statements. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-direct-query - */ - const MYSQL_ATTR_DIRECT_QUERY = 1007; - - /** - *- * Return the number of found (matched) rows, not the - * number of changed rows. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-found-rows - */ - const MYSQL_ATTR_FOUND_ROWS = 1008; - - /** - *- * Permit spaces after function names. Makes all functions - * names reserved words. - * - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ignore-space - */ - const MYSQL_ATTR_IGNORE_SPACE = 1009; - - const MYSQL_ATTR_SERVER_PUBLIC_KEY = 1009; - - /** - *- * The file path to the SSL key. - * - * @since 5.3.7 - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-key - */ - const MYSQL_ATTR_SSL_KEY = 1010; - - /** - *- * The file path to the SSL certificate. - * - * @since 5.3.7 - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-cert - */ - const MYSQL_ATTR_SSL_CERT = 1011; - - /** - *- * The file path to the SSL certificate authority. - * - * @since 5.3.7 - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-ca - */ - const MYSQL_ATTR_SSL_CA = 1012; - - /** - *- * The file path to the directory that contains the trusted SSL - * CA certificates, which are stored in PEM format. - * - * @since 5.3.7 - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-capath - */ - const MYSQL_ATTR_SSL_CAPATH = 1013; - - /** - *- * A list of one or more permissible ciphers to use for SSL encryption, - * in a format understood by OpenSSL. - * For example: DHE-RSA-AES256-SHA:AES128-SHA - * - * @since 5.3.7 - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-cipher - */ - const MYSQL_ATTR_SSL_CIPHER = 1014; - - /** - *- * Disables multi query execution in both {@see PDO::prepare()} and {@see PDO::query()} when set to FALSE. - * - *- * Note, this constant can only be used in the driver_options array when constructing a new database handle. - * - * @since 5.5.21 and 5.6.5 - * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-multi-statements - */ - const MYSQL_ATTR_MULTI_STATEMENTS = 1015; - - /** - *- * Disables SSL peer verification when set to FALSE. - * - * @since 7.0.18 - * @since 7.1.4 - * @link https://bugs.php.net/bug.php?id=71003 - */ - const MYSQL_ATTR_SSL_VERIFY_SERVER_CERT = 1016; - - /** - * @deprecated 5.6 Use PDO::ATTR_EMULATE_PREPARES instead. - */ - const PGSQL_ASSOC = 1; - const PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT = 1000; - const PGSQL_BAD_RESPONSE = 5; - const PGSQL_BOTH = 3; - const PGSQL_TRANSACTION_IDLE = 0; - const PGSQL_TRANSACTION_ACTIVE = 1; - const PGSQL_TRANSACTION_INTRANS = 2; - const PGSQL_TRANSACTION_INERROR = 3; - const PGSQL_TRANSACTION_UNKNOWN = 4; - - const PGSQL_CONNECT_ASYNC = 4; - const PGSQL_CONNECT_FORCE_NEW = 2; - const PGSQL_CONNECTION_AUTH_OK = 5; - const PGSQL_CONNECTION_AWAITING_RESPONSE = 4; - const PGSQL_CONNECTION_BAD = 1; - const PGSQL_CONNECTION_OK = 0; - const PGSQL_CONNECTION_MADE = 3; - const PGSQL_CONNECTION_SETENV = 6; - const PGSQL_CONNECTION_SSL_STARTUP = 7; - const PGSQL_CONNECTION_STARTED = 2; - const PGSQL_COMMAND_OK = 1; - const PGSQL_CONV_FORCE_NULL = 4; - const PGSQL_CONV_IGNORE_DEFAULT = 2; - const PGSQL_CONV_IGNORE_NOT_NULL = 8; - const PGSQL_COPY_IN = 4; - const PGSQL_COPY_OUT = 3; - const PGSQL_DIAG_CONTEXT = 87; - const PGSQL_DIAG_INTERNAL_POSITION = 112; - const PGSQL_DIAG_INTERNAL_QUERY = 113; - const PGSQL_DIAG_MESSAGE_DETAIL = 68; - const PGSQL_DIAG_MESSAGE_HINT = 72; - const PGSQL_DIAG_MESSAGE_PRIMARY = 77; - const PGSQL_DIAG_SEVERITY = 83; - const PGSQL_DIAG_SOURCE_FILE = 70; - const PGSQL_DIAG_SOURCE_FUNCTION = 82; - const PGSQL_DIAG_SOURCE_LINE = 76; - const PGSQL_DIAG_SQLSTATE = 67; - const PGSQL_DIAG_STATEMENT_POSITION = 80; - const PGSQL_DML_ASYNC = 1024; - const PGSQL_DML_EXEC = 512; - const PGSQL_DML_NO_CONV = 256; - const PGSQL_DML_STRING = 2048; - const PGSQL_DML_ESCAPE = 4096; - const PGSQL_EMPTY_QUERY = 0; - const PGSQL_ERRORS_DEFAULT = 1; - const PGSQL_ERRORS_TERSE = 0; - const PGSQL_ERRORS_VERBOSE = 2; - const PGSQL_FATAL_ERROR = 7; - const PGSQL_NONFATAL_ERROR = 6; - const PGSQL_NOTICE_ALL = 2; - const PGSQL_NOTICE_CLEAR = 3; - const PGSQL_NOTICE_LAST = 1; - const PGSQL_NUM = 2; - const PGSQL_POLLING_ACTIVE = 4; - const PGSQL_POLLING_FAILED = 0; - const PGSQL_POLLING_OK = 3; - const PGSQL_POLLING_READING = 1; - const PGSQL_POLLING_WRITING = 2; - const PGSQL_SEEK_CUR = 1; - const PGSQL_SEEK_END = 2; - const PGSQL_SEEK_SET = 0; - const PGSQL_STATUS_LONG = 1; - const PGSQL_STATUS_STRING = 2; - const PGSQL_TUPLES_OK = 2; - const SQLSRV_TXN_READ_UNCOMMITTED = "READ_UNCOMMITTED"; - const SQLSRV_TXN_READ_COMMITTED = "READ_COMMITTED"; - const SQLSRV_TXN_REPEATABLE_READ = "REPEATABLE_READ"; - const SQLSRV_TXN_SNAPSHOT = "SNAPSHOT"; - const SQLSRV_TXN_SERIALIZABLE = "SERIALIZABLE"; - const SQLSRV_ENCODING_BINARY = 2; - const SQLSRV_ENCODING_SYSTEM = 3; - const SQLSRV_ENCODING_UTF8 = 65001; - const SQLSRV_ENCODING_DEFAULT = 1; - const SQLSRV_ATTR_ENCODING = 1000; - const SQLSRV_ATTR_QUERY_TIMEOUT = 1001; - const SQLSRV_ATTR_DIRECT_QUERY = 1002; - const SQLSRV_ATTR_CURSOR_SCROLL_TYPE = 1003; - const SQLSRV_ATTR_CLIENT_BUFFER_MAX_KB_SIZE = 1004; - const SQLSRV_ATTR_FETCHES_NUMERIC_TYPE = 1005; - const SQLSRV_PARAM_OUT_DEFAULT_SIZE = -1; - const SQLSRV_CURSOR_KEYSET = 1; - const SQLSRV_CURSOR_DYNAMIC = 2; - const SQLSRV_CURSOR_STATIC = 3; - const SQLSRV_CURSOR_BUFFERED = 42; - - /** - * @since 7.4 - */ - const SQLITE_ATTR_READONLY_STATEMENT = 1; - /** - * @since 7.4 - */ - const SQLITE_ATTR_EXTENDED_RESULT_CODES = 2; - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)- * Creates a PDO instance representing a connection to a database - * @link https://php.net/manual/en/pdo.construct.php - * @param string $dsn - * @param string $username [optional] - * @param string $passwd [optional] - * @param array $options [optional] - * @throws PDOException if the attempt to connect to the requested database fails. - */ - public function __construct ($dsn, $username = null, $passwd = null, $options = null) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Prepares a statement for execution and returns a statement object - * @link https://php.net/manual/en/pdo.prepare.php - * @param string $statement - * This must be a valid SQL statement for the target database server. - * - * @param array $driver_options [optional]- * This array holds one or more key=>value pairs to set - * attribute values for the PDOStatement object that this method - * returns. You would most commonly use this to set the - * PDO::ATTR_CURSOR value to - * PDO::CURSOR_SCROLL to request a scrollable cursor. - * Some drivers have driver specific options that may be set at - * prepare-time. - * - * @return PDOStatement|bool If the database server successfully prepares the statement, - * PDO::prepare returns a - * PDOStatement object. - * If the database server cannot successfully prepare the statement, - * PDO::prepare returns FALSE or emits - * PDOException (depending on error handling). - * - *
- * Emulated prepared statements does not communicate with the database server
- * so PDO::prepare does not check the statement.
- */
- public function prepare ($statement, array $driver_options = array()) {}
-
- /**
- * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Turns off autocommit mode. While autocommit mode is turned off, - * changes made to the database via the PDO object instance are not committed - * until you end the transaction by calling {@link PDO::commit()}. - * Calling {@link PDO::rollBack()} will roll back all changes to the database and - * return the connection to autocommit mode. - * - *- * Some databases, including MySQL, automatically issue an implicit COMMIT - * when a database definition language (DDL) statement - * such as DROP TABLE or CREATE TABLE is issued within a transaction. - * The implicit COMMIT will prevent you from rolling back any other changes - * within the transaction boundary. - * - * @link https://php.net/manual/en/pdo.begintransaction.php - * @return bool TRUE on success or FALSE on failure. - * @throws PDOException If there is already a transaction started or - * the driver does not support transactions- * Note: An exception is raised even when the PDO::ATTR_ERRMODE - * attribute is not PDO::ERRMODE_EXCEPTION. - */ - public function beginTransaction () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Commits a transaction - * @link https://php.net/manual/en/pdo.commit.php - * @return bool TRUE on success or FALSE on failure. - * @throws PDOException if there is no active transaction. - */ - public function commit () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Rolls back a transaction - * @link https://php.net/manual/en/pdo.rollback.php - * @return bool TRUE on success or FALSE on failure. - * @throws PDOException if there is no active transaction. - */ - public function rollBack () {} - - /** - * (PHP 5 >= 5.3.3, Bundled pdo_pgsql, PHP 7) - * Checks if inside a transaction - * @link https://php.net/manual/en/pdo.intransaction.php - * @return bool TRUE if a transaction is currently active, and FALSE if not. - */ - public function inTransaction () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Set an attribute - * @link https://php.net/manual/en/pdo.setattribute.php - * @param int $attribute - * @param mixed $value - * @return bool TRUE on success or FALSE on failure. - */ - public function setAttribute ($attribute, $value) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Execute an SQL statement and return the number of affected rows - * @link https://php.net/manual/en/pdo.exec.php - * @param string $statement - * The SQL statement to prepare and execute. - * - *- * Data inside the query should be properly escaped. - * - * @return int|false PDO::exec returns the number of rows that were modified - * or deleted by the SQL statement you issued. If no rows were affected, - * PDO::exec returns 0. - * - * This function may - * return Boolean FALSE, but may also return a non-Boolean value which - * evaluates to FALSE. Please read the section on Booleans for more - * information. Use the === - * operator for testing the return value of this - * function. - *
- * The following example incorrectly relies on the return value of
- * PDO::exec, wherein a statement that affected 0 rows
- * results in a call to die:
- * - * The SQL statement to prepare and execute. - * - *- * Data inside the query should be properly escaped. - * - * @param int $mode- * The fetch mode must be one of the PDO::FETCH_* constants. - * - * @param mixed $arg3- * The second and following parameters are the same as the parameters for PDOStatement::setFetchMode. - * - * @param array $ctorargs [optional]- * Arguments of custom class constructor when the mode - * parameter is set to PDO::FETCH_CLASS. - * - * @return PDOStatement|false PDO::query returns a PDOStatement object, or FALSE - * on failure. - * @see PDOStatement::setFetchMode For a full description of the second and following parameters. - */ - public function query ($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = array()) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)- * Returns the ID of the last inserted row or sequence value - * @link https://php.net/manual/en/pdo.lastinsertid.php - * @param string $name [optional] - * Name of the sequence object from which the ID should be returned. - * - * @return string If a sequence name was not specified for the name - * parameter, PDO::lastInsertId returns a - * string representing the row ID of the last row that was inserted into - * the database. - * - *- * If a sequence name was specified for the name - * parameter, PDO::lastInsertId returns a - * string representing the last value retrieved from the specified sequence - * object. - * - *
- * If the PDO driver does not support this capability,
- * PDO::lastInsertId triggers an
- * IM001 SQLSTATE.
- */
- public function lastInsertId ($name = null) {}
-
- /**
- * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * PDO::errorCode only retrieves error codes for operations - * performed directly on the database handle. If you create a PDOStatement - * object through PDO::prepare or - * PDO::query and invoke an error on the statement - * handle, PDO::errorCode will not reflect that error. - * You must call PDOStatement::errorCode to return the error - * code for an operation performed on a particular statement handle. - * - *
- * Returns NULL if no operation has been run on the database handle.
- */
- public function errorCode () {}
-
- /**
- * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Element |
- * Information |
- * 0 |
- * SQLSTATE error code (a five characters alphanumeric identifier defined
- * in the ANSI SQL standard). |
- * 1 |
- * Driver-specific error code. |
- * 2 |
- * Driver-specific error message. |
- * - * If the SQLSTATE error code is not set or there is no driver-specific - * error, the elements following element 0 will be set to NULL. - * - *
- * PDO::errorInfo only retrieves error information for
- * operations performed directly on the database handle. If you create a
- * PDOStatement object through PDO::prepare or
- * PDO::query and invoke an error on the statement
- * handle, PDO::errorInfo will not reflect the error
- * from the statement handle. You must call
- * PDOStatement::errorInfo to return the error
- * information for an operation performed on a particular statement handle.
- */
- public function errorInfo () {}
-
- /**
- * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) - * One of the PDO::ATTR_* constants. The constants that - * apply to database connections are as follows: - * PDO::ATTR_AUTOCOMMIT - * PDO::ATTR_CASE - * PDO::ATTR_CLIENT_VERSION - * PDO::ATTR_CONNECTION_STATUS - * PDO::ATTR_DRIVER_NAME - * PDO::ATTR_ERRMODE - * PDO::ATTR_ORACLE_NULLS - * PDO::ATTR_PERSISTENT - * PDO::ATTR_PREFETCH - * PDO::ATTR_SERVER_INFO - * PDO::ATTR_SERVER_VERSION - * PDO::ATTR_TIMEOUT - * - * @return mixed A successful call returns the value of the requested PDO attribute. - * An unsuccessful call returns null. - */ - public function getAttribute ($attribute) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.1)- * Quotes a string for use in a query. - * @link https://php.net/manual/en/pdo.quote.php - * @param string $string - * The string to be quoted. - * - * @param int $parameter_type [optional]- * Provides a data type hint for drivers that have alternate quoting styles. - * - * @return string|false a quoted string that is theoretically safe to pass into an - * SQL statement. Returns FALSE if the driver does not support quoting in - * this way. - */ - public function quote ($string, $parameter_type = PDO::PARAM_STR) {} - - final public function __wakeup () {} - - final public function __sleep () {} - - /** - * (PHP 5 >= 5.1.3, PHP 7, PECL pdo >= 1.0.3)- * Return an array of available PDO drivers - * @link https://php.net/manual/en/pdo.getavailabledrivers.php - * @return array PDO::getAvailableDrivers returns an array of PDO driver names. If - * no drivers are available, it returns an empty array. - */ - public static function getAvailableDrivers () {} +class PDO +{ + /** + * Represents the SQL NULL data type. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-null + */ + public const PARAM_NULL = 0; + + /** + * Represents the SQL INTEGER data type. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-int + */ + public const PARAM_INT = 1; + + /** + * Represents the SQL CHAR, VARCHAR, or other string data type. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str + */ + public const PARAM_STR = 2; + + /** + * Represents the SQL large object data type. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-lob + */ + public const PARAM_LOB = 3; + + /** + * Represents a recordset type. Not currently supported by any drivers. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-stmt + */ + public const PARAM_STMT = 4; + + /** + * Represents a boolean data type. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-bool + */ + public const PARAM_BOOL = 5; + + /** + * Flag to denote a string uses the national character set. + * @since 7.2 + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str-natl + */ + public const PARAM_STR_NATL = 1073741824; + + /** + * Flag to denote a string uses the regular character set. + * @since 7.2 + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-str-char + */ + public const PARAM_STR_CHAR = 536870912; + + /** + * Sets the default string parameter type, this can be one of PDO::PARAM_STR_NATL and PDO::PARAM_STR_CHAR. + * @since 7.2 + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-default-str-param + */ + public const ATTR_DEFAULT_STR_PARAM = 21; + + /** + * Specifies that a function created with PDO::sqliteCreateFunction() is deterministic, i.e. it always returns the same result given the same inputs within a single SQL statement. + * @since 7.1.4 + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.sqlite-deterministic + */ + public const SQLITE_DETERMINISTIC = 2048; + + /** + * @since 7.3 + */ + public const SQLITE_OPEN_READONLY = 1; + + /** + * @since 7.3 + */ + public const SQLITE_OPEN_READWRITE = 2; + + /** + * @since 7.3 + */ + public const SQLITE_OPEN_CREATE = 4; + + /** + * @since 7.3 + */ + public const SQLITE_ATTR_OPEN_FLAGS = 1000; + + /** + * Specifies that the parameter is an INOUT parameter for a stored + * procedure. You must bitwise-OR this value with an explicit + * PDO::PARAM_* data type. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-input-output + */ + public const PARAM_INPUT_OUTPUT = 2147483648; + + /** + * Allocation event + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-alloc + */ + public const PARAM_EVT_ALLOC = 0; + + /** + * Deallocation event + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-free + */ + public const PARAM_EVT_FREE = 1; + + /** + * Event triggered prior to execution of a prepared statement. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-exec-pre + */ + public const PARAM_EVT_EXEC_PRE = 2; + + /** + * Event triggered subsequent to execution of a prepared statement. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-exec-post + */ + public const PARAM_EVT_EXEC_POST = 3; + + /** + * Event triggered prior to fetching a result from a resultset. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-fetch-pre + */ + public const PARAM_EVT_FETCH_PRE = 4; + + /** + * Event triggered subsequent to fetching a result from a resultset. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-fetch-post + */ + public const PARAM_EVT_FETCH_POST = 5; + + /** + * Event triggered during bound parameter registration + * allowing the driver to normalize the parameter name. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.param-evt-normalize + */ + public const PARAM_EVT_NORMALIZE = 6; + + /** + * Specifies that the fetch method shall return each row as an object with + * variable names that correspond to the column names returned in the result + * set. PDO::FETCH_LAZY creates the object variable names as they are accessed. + * Not valid inside PDOStatement::fetchAll. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-lazy + */ + public const FETCH_LAZY = 1; + + /** + * Specifies that the fetch method shall return each row as an array indexed + * by column name as returned in the corresponding result set. If the result + * set contains multiple columns with the same name, + * PDO::FETCH_ASSOC returns + * only a single value per column name. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-assoc + */ + public const FETCH_ASSOC = 2; + + /** + * Specifies that the fetch method shall return each row as an array indexed + * by column number as returned in the corresponding result set, starting at + * column 0. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-num + */ + public const FETCH_NUM = 3; + + /** + * Specifies that the fetch method shall return each row as an array indexed + * by both column name and number as returned in the corresponding result set, + * starting at column 0. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-both + */ + public const FETCH_BOTH = 4; + + /** + * Specifies that the fetch method shall return each row as an object with + * property names that correspond to the column names returned in the result + * set. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-obj + */ + public const FETCH_OBJ = 5; + + /** + * Specifies that the fetch method shall return TRUE and assign the values of + * the columns in the result set to the PHP variables to which they were + * bound with the PDOStatement::bindParam or + * PDOStatement::bindColumn methods. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-bound + */ + public const FETCH_BOUND = 6; + + /** + * Specifies that the fetch method shall return only a single requested + * column from the next row in the result set. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-column + */ + public const FETCH_COLUMN = 7; + + /** + * Specifies that the fetch method shall return a new instance of the + * requested class, mapping the columns to named properties in the class. + * The magic + * __set + * method is called if the property doesn't exist in the requested class + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-class + */ + public const FETCH_CLASS = 8; + + /** + * Specifies that the fetch method shall update an existing instance of the + * requested class, mapping the columns to named properties in the class. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-into + */ + public const FETCH_INTO = 9; + + /** + * Allows completely customize the way data is treated on the fly (only + * valid inside PDOStatement::fetchAll). + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-func + */ + public const FETCH_FUNC = 10; + + /** + * Group return by values. Usually combined with + * PDO::FETCH_COLUMN or + * PDO::FETCH_KEY_PAIR. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-group + */ + public const FETCH_GROUP = 65536; + + /** + * Fetch only the unique values. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-unique + */ + public const FETCH_UNIQUE = 196608; + + /** + * Fetch a two-column result into an array where the first column is a key and the second column + * is the value. + * @since 5.2.3 + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-key-pair + */ + public const FETCH_KEY_PAIR = 12; + + /** + * Determine the class name from the value of first column. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-classtype + */ + public const FETCH_CLASSTYPE = 262144; + + /** + * As PDO::FETCH_INTO but object is provided as a serialized string. + * Available since PHP 5.1.0. Since PHP 5.3.0 the class constructor is never called if this + * flag is set. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-serialize + */ + public const FETCH_SERIALIZE = 524288; + + /** + * Call the constructor before setting properties. + * @since 5.2.0 + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-props-late + */ + public const FETCH_PROPS_LATE = 1048576; + + /** + * Specifies that the fetch method shall return each row as an array indexed + * by column name as returned in the corresponding result set. If the result + * set contains multiple columns with the same name, + * PDO::FETCH_NAMED returns + * an array of values per column name. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.fetch-named + */ + public const FETCH_NAMED = 11; + + /** + * If this value is FALSE, PDO attempts to disable autocommit so that the + * connection begins a transaction. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-autocommit + */ + public const ATTR_AUTOCOMMIT = 0; + + /** + * Setting the prefetch size allows you to balance speed against memory + * usage for your application. Not all database/driver combinations support + * setting of the prefetch size. A larger prefetch size results in + * increased performance at the cost of higher memory usage. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-prefetch + */ + public const ATTR_PREFETCH = 1; + + /** + * Sets the timeout value in seconds for communications with the database. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-timeout + */ + public const ATTR_TIMEOUT = 2; + + /** + * @see https://php.net/manual/en/pdo.error-handling.php Errors and error handling + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-errmode + */ + public const ATTR_ERRMODE = 3; + + /** + * This is a read only attribute; it will return information about the + * version of the database server to which PDO is connected. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr- + */ + public const ATTR_SERVER_VERSION = 4; + + /** + * This is a read only attribute; it will return information about the + * version of the client libraries that the PDO driver is using. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-client-version + */ + public const ATTR_CLIENT_VERSION = 5; + + /** + * This is a read only attribute; it will return some meta information about the + * database server to which PDO is connected. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-server-info + */ + public const ATTR_SERVER_INFO = 6; + public const ATTR_CONNECTION_STATUS = 7; + + /** + * Force column names to a specific case specified by the PDO::CASE_* + * constants. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-case + */ + public const ATTR_CASE = 8; + + /** + * Get or set the name to use for a cursor. Most useful when using + * scrollable cursors and positioned updates. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-cursor-name + */ + public const ATTR_CURSOR_NAME = 9; + + /** + * Selects the cursor type. PDO currently supports either + * PDO::CURSOR_FWDONLY and + * PDO::CURSOR_SCROLL. Stick with + * PDO::CURSOR_FWDONLY unless you know that you need a + * scrollable cursor. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-cursor + */ + public const ATTR_CURSOR = 10; + + /** + * Convert empty strings to SQL NULL values on data fetches. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-oracle-nulls + */ + public const ATTR_ORACLE_NULLS = 11; + + /** + * Request a persistent connection, rather than creating a new connection. + * @see https://php.net/manual/en/pdo.connections.php Connections and Connection Management + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-persistent + */ + public const ATTR_PERSISTENT = 12; + + /** + * Sets the class name of which statements are returned as. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-statement-class + */ + public const ATTR_STATEMENT_CLASS = 13; + + /** + * Prepend the containing table name to each column name returned in the + * result set. The table name and column name are separated by a decimal (.) + * character. Support of this attribute is at the driver level; it may not + * be supported by your driver. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-fetch-table-names + */ + public const ATTR_FETCH_TABLE_NAMES = 14; + + /** + * Prepend the containing catalog name to each column name returned in the + * result set. The catalog name and column name are separated by a decimal + * (.) character. Support of this attribute is at the driver level; it may + * not be supported by your driver. + * @link https://php.net/manual/en/pdo.constants.php#pdo.constants.attr-fetch-catalog-names + */ + public const ATTR_FETCH_CATALOG_NAMES = 15; + + /** + * Returns the name of the driver. + *
+ * using PDO::ATTR_DRIVER_NAME
+ *
+ * Forcing queries to be buffered in mysql
+ * + * Enable LOAD LOCAL INFILE. + * + *+ * Note, this constant can only be used in the driver_options + * array when constructing a new database handle. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-local-infile + */ + public const MYSQL_ATTR_LOCAL_INFILE = 1001; + + /** + *+ * Command to execute when connecting to the MySQL server. Will + * automatically be re-executed when reconnecting. + * + *+ * Note, this constant can only be used in the driver_options + * array when constructing a new database handle. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-init-command + */ + public const MYSQL_ATTR_INIT_COMMAND = 1002; + + /** + *+ * Maximum buffer size. Defaults to 1 MiB. This constant is not supported when + * compiled against mysqlnd. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-max-buffer-size + */ + public const MYSQL_ATTR_MAX_BUFFER_SIZE = 1005; + + /** + *+ * Read options from the named option file instead of from + * my.cnf. This option is not available if + * mysqlnd is used, because mysqlnd does not read the mysql + * configuration files. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-read-default-file + */ + public const MYSQL_ATTR_READ_DEFAULT_FILE = 1003; + + /** + *+ * Read options from the named group from my.cnf or the + * file specified with MYSQL_READ_DEFAULT_FILE. This option + * is not available if mysqlnd is used, because mysqlnd does not read the mysql + * configuration files. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-read-default-group + */ + public const MYSQL_ATTR_READ_DEFAULT_GROUP = 1004; + + /** + *+ * Enable network communication compression. This is not supported when + * compiled against mysqlnd. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-compress + */ + public const MYSQL_ATTR_COMPRESS = 1003; + + /** + *+ * Perform direct queries, don't use prepared statements. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-direct-query + */ + public const MYSQL_ATTR_DIRECT_QUERY = 1004; + + /** + *+ * Return the number of found (matched) rows, not the + * number of changed rows. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-found-rows + */ + public const MYSQL_ATTR_FOUND_ROWS = 1005; + + /** + *+ * Permit spaces after function names. Makes all functions + * names reserved words. + * + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ignore-space + */ + public const MYSQL_ATTR_IGNORE_SPACE = 1006; + public const MYSQL_ATTR_SERVER_PUBLIC_KEY = 1012; + + /** + *+ * The file path to the SSL key. + * + * @since 5.3.7 + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-key + */ + public const MYSQL_ATTR_SSL_KEY = 1007; + + /** + *+ * The file path to the SSL certificate. + * + * @since 5.3.7 + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-cert + */ + public const MYSQL_ATTR_SSL_CERT = 1008; + + /** + *+ * The file path to the SSL certificate authority. + * + * @since 5.3.7 + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-ca + */ + public const MYSQL_ATTR_SSL_CA = 1009; + + /** + *+ * The file path to the directory that contains the trusted SSL + * CA certificates, which are stored in PEM format. + * + * @since 5.3.7 + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-ssl-capath + */ + public const MYSQL_ATTR_SSL_CAPATH = 1010; + + /** + *+ * A list of one or more permissible ciphers to use for SSL encryption, + * in a format understood by OpenSSL. + * For example: DHE-RSA-AES256-SHA:AES128-SHA + * + * @since 5.3.7 + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-cipher + */ + public const MYSQL_ATTR_SSL_CIPHER = 1011; + + /** + *+ * Disables multi query execution in both {@see PDO::prepare()} and {@see PDO::query()} when set to FALSE. + * + *+ * Note, this constant can only be used in the driver_options array when constructing a new database handle. + * + * @since 5.5.21 + * @link https://php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-multi-statements + */ + public const MYSQL_ATTR_MULTI_STATEMENTS = 1013; + + /** + *+ * Disables SSL peer verification when set to FALSE. + * + * @since 7.0.18 + * @since 7.1.4 + * @link https://bugs.php.net/bug.php?id=71003 + */ + public const MYSQL_ATTR_SSL_VERIFY_SERVER_CERT = 1014; + + /** + * @since 8.1 + */ + public const MYSQL_ATTR_LOCAL_INFILE_DIRECTORY = 1015; + + #[Deprecated("Use PDO::ATTR_EMULATE_PREPARES instead")] + public const PGSQL_ASSOC = 1; + + /** + * @removed 7.1 + */ + public const PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT = 1000; + + /** + * @since 5.6 + */ + public const PGSQL_ATTR_DISABLE_PREPARES = 1000; + public const PGSQL_BAD_RESPONSE = 5; + public const PGSQL_BOTH = 3; + public const PGSQL_TRANSACTION_IDLE = 0; + public const PGSQL_TRANSACTION_ACTIVE = 1; + public const PGSQL_TRANSACTION_INTRANS = 2; + public const PGSQL_TRANSACTION_INERROR = 3; + public const PGSQL_TRANSACTION_UNKNOWN = 4; + public const PGSQL_CONNECT_ASYNC = 4; + public const PGSQL_CONNECT_FORCE_NEW = 2; + public const PGSQL_CONNECTION_AUTH_OK = 5; + public const PGSQL_CONNECTION_AWAITING_RESPONSE = 4; + public const PGSQL_CONNECTION_BAD = 1; + public const PGSQL_CONNECTION_OK = 0; + public const PGSQL_CONNECTION_MADE = 3; + public const PGSQL_CONNECTION_SETENV = 6; + public const PGSQL_CONNECTION_SSL_STARTUP = 7; + public const PGSQL_CONNECTION_STARTED = 2; + public const PGSQL_COMMAND_OK = 1; + public const PGSQL_CONV_FORCE_NULL = 4; + public const PGSQL_CONV_IGNORE_DEFAULT = 2; + public const PGSQL_CONV_IGNORE_NOT_NULL = 8; + public const PGSQL_COPY_IN = 4; + public const PGSQL_COPY_OUT = 3; + public const PGSQL_DIAG_CONTEXT = 87; + public const PGSQL_DIAG_INTERNAL_POSITION = 112; + public const PGSQL_DIAG_INTERNAL_QUERY = 113; + public const PGSQL_DIAG_MESSAGE_DETAIL = 68; + public const PGSQL_DIAG_MESSAGE_HINT = 72; + public const PGSQL_DIAG_MESSAGE_PRIMARY = 77; + public const PGSQL_DIAG_SEVERITY = 83; + public const PGSQL_DIAG_SOURCE_FILE = 70; + public const PGSQL_DIAG_SOURCE_FUNCTION = 82; + public const PGSQL_DIAG_SOURCE_LINE = 76; + public const PGSQL_DIAG_SQLSTATE = 67; + public const PGSQL_DIAG_STATEMENT_POSITION = 80; + public const PGSQL_DML_ASYNC = 1024; + public const PGSQL_DML_EXEC = 512; + public const PGSQL_DML_NO_CONV = 256; + public const PGSQL_DML_STRING = 2048; + public const PGSQL_DML_ESCAPE = 4096; + public const PGSQL_EMPTY_QUERY = 0; + public const PGSQL_ERRORS_DEFAULT = 1; + public const PGSQL_ERRORS_TERSE = 0; + public const PGSQL_ERRORS_VERBOSE = 2; + public const PGSQL_FATAL_ERROR = 7; + public const PGSQL_NONFATAL_ERROR = 6; + public const PGSQL_NOTICE_ALL = 2; + public const PGSQL_NOTICE_CLEAR = 3; + public const PGSQL_NOTICE_LAST = 1; + public const PGSQL_NUM = 2; + public const PGSQL_POLLING_ACTIVE = 4; + public const PGSQL_POLLING_FAILED = 0; + public const PGSQL_POLLING_OK = 3; + public const PGSQL_POLLING_READING = 1; + public const PGSQL_POLLING_WRITING = 2; + public const PGSQL_SEEK_CUR = 1; + public const PGSQL_SEEK_END = 2; + public const PGSQL_SEEK_SET = 0; + public const PGSQL_STATUS_LONG = 1; + public const PGSQL_STATUS_STRING = 2; + public const PGSQL_TUPLES_OK = 2; + public const SQLSRV_TXN_READ_UNCOMMITTED = "READ_UNCOMMITTED"; + public const SQLSRV_TXN_READ_COMMITTED = "READ_COMMITTED"; + public const SQLSRV_TXN_REPEATABLE_READ = "REPEATABLE_READ"; + public const SQLSRV_TXN_SNAPSHOT = "SNAPSHOT"; + public const SQLSRV_TXN_SERIALIZABLE = "SERIALIZABLE"; + public const SQLSRV_ENCODING_BINARY = 2; + public const SQLSRV_ENCODING_SYSTEM = 3; + public const SQLSRV_ENCODING_UTF8 = 65001; + public const SQLSRV_ENCODING_DEFAULT = 1; + public const SQLSRV_ATTR_ENCODING = 1000; + public const SQLSRV_ATTR_QUERY_TIMEOUT = 1001; + public const SQLSRV_ATTR_DIRECT_QUERY = 1002; + public const SQLSRV_ATTR_CURSOR_SCROLL_TYPE = 1003; + public const SQLSRV_ATTR_CLIENT_BUFFER_MAX_KB_SIZE = 1004; + public const SQLSRV_ATTR_FETCHES_NUMERIC_TYPE = 1005; + public const SQLSRV_ATTR_FETCHES_DATETIME_TYPE = 1006; + public const SQLSRV_ATTR_FORMAT_DECIMALS = 1007; + public const SQLSRV_ATTR_DECIMAL_PLACES = 1008; + public const SQLSRV_ATTR_DATA_CLASSIFICATION = 1009; + public const SQLSRV_PARAM_OUT_DEFAULT_SIZE = -1; + public const SQLSRV_CURSOR_KEYSET = 1; + public const SQLSRV_CURSOR_DYNAMIC = 2; + public const SQLSRV_CURSOR_STATIC = 3; + public const SQLSRV_CURSOR_BUFFERED = 42; + + /** + * @since 7.4 + */ + public const SQLITE_ATTR_READONLY_STATEMENT = 1001; + + /** + * @since 7.4 + */ + public const SQLITE_ATTR_EXTENDED_RESULT_CODES = 1002; + + /** + * Provides a way to specify the action on the database session. + * @since 7.2.16 + * @since 7.3.3 + */ + public const OCI_ATTR_ACTION = 1000; + + /** + * Provides a way to specify the client info on the database session. + * @since 7.2.16 + * @since 7.3.3 + */ + public const OCI_ATTR_CLIENT_INFO = 1001; + + /** + * Provides a way to specify the client identifier on the database session. + * @since 7.2.16 + * @since 7.3.3 + */ + public const OCI_ATTR_CLIENT_IDENTIFIER = 1002; + + /** + * Provides a way to specify the module on the database session. + * @since 7.2.16 + * @since 7.3.3 + */ + public const OCI_ATTR_MODULE = 1003; + + /** + * The number of milliseconds to wait for individual round trips to the database to complete before timing out. + * @since 8.0 + */ + public const OCI_ATTR_CALL_TIMEOUT = 1004; + + /** + * Sets the date format. + */ + public const FB_ATTR_DATE_FORMAT = 1000; + + /** + * Sets the time format. + */ + public const FB_ATTR_TIME_FORMAT = 1001; + + /** + * Sets the timestamp format. + */ + public const FB_ATTR_TIMESTAMP_FORMAT = 1002; + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)+ * Creates a PDO instance representing a connection to a database + * @link https://php.net/manual/en/pdo.construct.php + * @param string $dsn + * @param string $username [optional] + * @param string $password [optional] + * @param array $options [optional] + * @throws PDOException if the attempt to connect to the requested database fails. + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $dsn, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $username = null, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $password = null, + #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $options = null + ) {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Prepares a statement for execution and returns a statement object + * @link https://php.net/manual/en/pdo.prepare.php + * @param string $query + * This must be a valid SQL statement for the target database server. + * + * @param array $options [optional]+ * This array holds one or more key=>value pairs to set + * attribute values for the PDOStatement object that this method + * returns. You would most commonly use this to set the + * PDO::ATTR_CURSOR value to + * PDO::CURSOR_SCROLL to request a scrollable cursor. + * Some drivers have driver specific options that may be set at + * prepare-time. + * + * @return PDOStatement|false If the database server successfully prepares the statement, + * PDO::prepare returns a + * PDOStatement object. + * If the database server cannot successfully prepare the statement, + * PDO::prepare returns FALSE or emits + * PDOException (depending on error handling). + * + *
+ * Emulated prepared statements does not communicate with the database server
+ * so PDO::prepare does not check the statement.
+ */
+ #[TentativeType]
+ public function prepare(
+ #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query,
+ #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $options = []
+ ): PDOStatement|false {}
+
+ /**
+ * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Turns off autocommit mode. While autocommit mode is turned off, + * changes made to the database via the PDO object instance are not committed + * until you end the transaction by calling {@link PDO::commit()}. + * Calling {@link PDO::rollBack()} will roll back all changes to the database and + * return the connection to autocommit mode. + * + *+ * Some databases, including MySQL, automatically issue an implicit COMMIT + * when a database definition language (DDL) statement + * such as DROP TABLE or CREATE TABLE is issued within a transaction. + * The implicit COMMIT will prevent you from rolling back any other changes + * within the transaction boundary. + * + * @link https://php.net/manual/en/pdo.begintransaction.php + * @return bool TRUE on success or FALSE on failure. + * @throws PDOException If there is already a transaction started or + * the driver does not support transactions+ * Note: An exception is raised even when the PDO::ATTR_ERRMODE + * attribute is not PDO::ERRMODE_EXCEPTION. + */ + #[TentativeType] + public function beginTransaction(): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Commits a transaction + * @link https://php.net/manual/en/pdo.commit.php + * @return bool TRUE on success or FALSE on failure. + * @throws PDOException if there is no active transaction. + */ + #[TentativeType] + public function commit(): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Rolls back a transaction + * @link https://php.net/manual/en/pdo.rollback.php + * @return bool TRUE on success or FALSE on failure. + * @throws PDOException if there is no active transaction. + */ + #[TentativeType] + public function rollBack(): bool {} + + /** + * (PHP 5 >= 5.3.3, Bundled pdo_pgsql, PHP 7) + * Checks if inside a transaction + * @link https://php.net/manual/en/pdo.intransaction.php + * @return bool TRUE if a transaction is currently active, and FALSE if not. + */ + #[TentativeType] + public function inTransaction(): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Set an attribute + * @link https://php.net/manual/en/pdo.setattribute.php + * @param int $attribute + * @param mixed $value + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function setAttribute( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value + ): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Execute an SQL statement and return the number of affected rows + * @link https://php.net/manual/en/pdo.exec.php + * @param string $statement + * The SQL statement to prepare and execute. + * + *+ * Data inside the query should be properly escaped. + * + * @return int|false PDO::exec returns the number of rows that were modified + * or deleted by the SQL statement you issued. If no rows were affected, + * PDO::exec returns 0. + * + * This function may + * return Boolean FALSE, but may also return a non-Boolean value which + * evaluates to FALSE. Please read the section on Booleans for more + * information. Use the === + * operator for testing the return value of this + * function. + *
+ * The following example incorrectly relies on the return value of
+ * PDO::exec, wherein a statement that affected 0 rows
+ * results in a call to die:
+ * + * The SQL statement to prepare and execute. + * + *+ * Data inside the query should be properly escaped. + * + * @param int $fetchMode+ * The fetch mode must be one of the PDO::FETCH_* constants. + * + * @param mixed $arg3+ * The second and following parameters are the same as the parameters for PDOStatement::setFetchMode. + * + * @param array $ctorargs [optional]+ * Arguments of custom class constructor when the mode + * parameter is set to PDO::FETCH_CLASS. + * + * @return PDOStatement|false PDO::query returns a PDOStatement object, or FALSE + * on failure. + * @see PDOStatement::setFetchMode For a full description of the second and following parameters. + */ + #[PhpStormStubsElementAvailable(to: '7.4')] + public function query($query, $fetchMode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, $ctorargs = []) {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PHP 8, PECL pdo >= 0.2.0)+ * Executes an SQL statement, returning a result set as a PDOStatement object + * @link https://php.net/manual/en/pdo.query.php + * @param string $query + * The SQL statement to prepare and execute. + * + *+ * Data inside the query should be properly escaped. + * + * @param int|null $fetchMode+ * The fetch mode must be one of the PDO::FETCH_* constants. + * + * @param mixed ...$fetch_mode_args+ * Arguments of custom class constructor when the mode + * parameter is set to PDO::FETCH_CLASS. + * + * @return PDOStatement|false PDO::query returns a PDOStatement object, or FALSE + * on failure. + * @see PDOStatement::setFetchMode For a full description of the second and following parameters. + */ + #[PhpStormStubsElementAvailable('8.0')] + public function query( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $fetchMode = null, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$fetch_mode_args + ) {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)+ * Returns the ID of the last inserted row or sequence value + * @link https://php.net/manual/en/pdo.lastinsertid.php + * @param string $name [optional] + * Name of the sequence object from which the ID should be returned. + * + * @return string|false If a sequence name was not specified for the name + * parameter, PDO::lastInsertId returns a + * string representing the row ID of the last row that was inserted into + * the database. + * + *+ * If a sequence name was specified for the name + * parameter, PDO::lastInsertId returns a + * string representing the last value retrieved from the specified sequence + * object. + * + *
+ * If the PDO driver does not support this capability,
+ * PDO::lastInsertId triggers an
+ * IM001 SQLSTATE.
+ */
+ #[TentativeType]
+ public function lastInsertId(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null): string|false {}
+
+ /**
+ * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * PDO::errorCode only retrieves error codes for operations + * performed directly on the database handle. If you create a PDOStatement + * object through PDO::prepare or + * PDO::query and invoke an error on the statement + * handle, PDO::errorCode will not reflect that error. + * You must call PDOStatement::errorCode to return the error + * code for an operation performed on a particular statement handle. + * + *
+ * Returns NULL if no operation has been run on the database handle.
+ */
+ #[TentativeType]
+ public function errorCode(): ?string {}
+
+ /**
+ * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Element |
+ * Information |
+ * 0 |
+ * SQLSTATE error code (a five characters alphanumeric identifier defined
+ * in the ANSI SQL standard). |
+ * 1 |
+ * Driver-specific error code. |
+ * 2 |
+ * Driver-specific error message. |
+ * + * If the SQLSTATE error code is not set or there is no driver-specific + * error, the elements following element 0 will be set to NULL. + * + *
+ * PDO::errorInfo only retrieves error information for
+ * operations performed directly on the database handle. If you create a
+ * PDOStatement object through PDO::prepare or
+ * PDO::query and invoke an error on the statement
+ * handle, PDO::errorInfo will not reflect the error
+ * from the statement handle. You must call
+ * PDOStatement::errorInfo to return the error
+ * information for an operation performed on a particular statement handle.
+ */
+ #[ArrayShape([0 => "string", 1 => "int", 2 => "string"])]
+ #[TentativeType]
+ public function errorInfo(): array {}
+
+ /**
+ * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) + * One of the PDO::ATTR_* constants. The constants that + * apply to database connections are as follows: + * PDO::ATTR_AUTOCOMMIT + * PDO::ATTR_CASE + * PDO::ATTR_CLIENT_VERSION + * PDO::ATTR_CONNECTION_STATUS + * PDO::ATTR_DRIVER_NAME + * PDO::ATTR_ERRMODE + * PDO::ATTR_ORACLE_NULLS + * PDO::ATTR_PERSISTENT + * PDO::ATTR_PREFETCH + * PDO::ATTR_SERVER_INFO + * PDO::ATTR_SERVER_VERSION + * PDO::ATTR_TIMEOUT + * + * @return mixed A successful call returns the value of the requested PDO attribute. + * An unsuccessful call returns null. + */ + #[TentativeType] + public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $attribute): mixed {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.1)+ * Quotes a string for use in a query. + * @link https://php.net/manual/en/pdo.quote.php + * @param string $string + * The string to be quoted. + * + * @param int $type [optional]+ * Provides a data type hint for drivers that have alternate quoting styles. + * + * @return string|false a quoted string that is theoretically safe to pass into an + * SQL statement. Returns FALSE if the driver does not support quoting in + * this way. + */ + #[TentativeType] + public function quote( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR + ): string|false {} + + final public function __wakeup() {} + + final public function __sleep() {} + + /** + * (PHP 5 >= 5.1.3, PHP 7, PECL pdo >= 1.0.3)+ * Return an array of available PDO drivers + * @link https://php.net/manual/en/pdo.getavailabledrivers.php + * @return array PDO::getAvailableDrivers returns an array of PDO driver names. If + * no drivers are available, it returns an empty array. + */ + #[TentativeType] + public static function getAvailableDrivers(): array {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo_sqlite >= 1.0.0) + * Registers an aggregating User Defined Function for use in SQL statements + * @link https://php.net/manual/en/pdo.sqlitecreateaggregate.php + * @param string $function_name + * The name of the function used in SQL statements. + * + * @param callable $step_func+ * Callback function called for each row of the result set. Your PHP function should accumulate the result and store it in the aggregation context. + * + * @param callable $finalize_func+ * Callback function to aggregate the "stepped" data from each row. Once all the rows have been processed, this function will be called and it should then take the data from the aggregation context and return the result. This callback function should return a type understood by SQLite (i.e. scalar type). + * + * @param int $num_args [optional]+ * Hint to the SQLite parser if the callback function accepts a predetermined number of arguments. + * + * @return bool TRUE on success or FALSE on failure. + */ + public function sqliteCreateAggregate($function_name, $step_func, $finalize_func, $num_args = -1) {} + + /** + * (PHP 5 >= 5.3.11, PHP 7)+ * Registers a User Defined Function for use as a collating function in SQL statements + * @link https://php.net/manual/en/pdo.sqlitecreatecollation.php + * @param string $name + * Name of the SQL collating function to be created or redefined. + * + * @param callable $callback+ * The name of a PHP function or user-defined function to apply as a callback, defining the behavior of the collation. It should accept two strings and return as strcmp() does, i.e. it should return -1, 1, or 0 if the first string sorts before, sorts after, or is equal to the second. + * + * @return bool TRUE on success or FALSE on failure. + */ + public function sqliteCreateCollation($name, $callback) {} /** * (PHP 5 >= 5.1.0, PHP 7, PECL pdo_sqlite >= 1.0.0)@@ -1168,6 +1338,152 @@ public static function getAvailableDrivers () {} * @return bool TRUE on success or FALSE on failure. */ public function sqliteCreateFunction($function_name, $callback, $num_args = -1, $flags = 0) {} + + /** + * (PHP 5 >= 5.3.3, PHP 7, PHP 8) + * Copy data from PHP array into table + * @link https://www.php.net/manual/en/pdo.pgsqlcopyfromarray.php + * @param string $tableName + * String containing table name + * + * @param array $rows+ * Array of strings with fields separated by separator + * + * @param string $separator+ * Separator used in rows array + * + * @param string $nullAs+ * How to interpret null values + * + * @param ?string $fields+ * List of fields to insert + * + * @return bool TRUE on success or FALSE on failure. + */ + public function pgsqlCopyFromArray(string $tableName, array $rows, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool {} + + /** + * (PHP 5 >= 5.3.3, PHP 7, PHP 8)+ * Copy data from file into table + * @link https://www.php.net/manual/en/pdo.pgsqlcopyfromfile.php + * @param string $tableName + * String containing table name + * + * @param string $filename+ * Filename containing data to import + * + * @param string $separator+ * Separator used in file specified by filename + * + * @param string $nullAs+ * How to interpret null values + * + * @param ?string $fields+ * List of fields to insert + * + * @return bool TRUE on success or FALSE on failure. + */ + public function pgsqlCopyFromFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool {} + + /** + * (PHP 5 >= 5.3.3, PHP 7, PHP 8)+ * Copy data from database table into PHP array + * @link https://www.php.net/manual/en/pdo.pgsqlcopytoarray.php + * @param string $tableName + * String containing table name + * + * @param string $separator+ * Separator used in rows + * + * @param string $nullAs+ * How to interpret null values + * + * @param ?string $fields+ * List of fields to insert + * + * @return array|false returns an array of rows, or FALSE on failure. + */ + public function pgsqlCopyToArray(string $tableName, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): array|false {} + + /** + * (PHP 5 >= 5.3.3, PHP 7, PHP 8)+ * Copy data from table into file + * @link https://www.php.net/manual/en/pdo.pgsqlcopytofile.php + * @param string $tableName + * String containing table name + * + * @param string $filename+ * Filename to export data + * + * @param string $separator+ * Separator used in file specified by filename + * + * @param string $nullAs+ * How to interpret null values + * + * @param ?string $fields+ * List of fields to insert + * + * @return bool TRUE on success or FALSE on failure. + */ + public function pgsqlCopyToFile(string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null): bool {} + + /** + * (PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql >= 1.0.2)+ * Creates a new large object + * @link https://www.php.net/manual/en/pdo.pgsqllobcreate.php + * @return string|false returns the OID of the newly created large object on success, + * or FALSE on failure. + */ + public function pgsqlLOBCreate(): string|false {} + + /** + * (PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql >= 1.0.2) + * Opens an existing large object stream + * @link https://www.php.net/manual/en/pdo.pgsqllobopen.php + * @param string $oid + * A large object identifier. + * + * @param string $mode+ * If mode is r, open the stream for reading. If mode is w, open the stream for writing. + * + * @return resource|false returns a stream resource on success or FALSE on failure. + */ + public function pgsqlLOBOpen(string $oid, string $mode = "rb") {} + + /** + * (PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql >= 1.0.2)+ * Deletes the large object + * @link https://www.php.net/manual/en/pdo.pgsqllobunlink.php + * @param string $oid + * A large object identifier. + * + * @return bool TRUE on success or FALSE on failure. + */ + public function pgsqlLOBUnlink(string $oid): bool {} + + /** + * (PHP 5 >= 5.6.0, PHP 7, PHP 8)+ * Get asynchronous notification + * @link https://www.php.net/manual/en/pdo.pgsqlgetnotify.php + * @param int $fetchMode + * The format the result set should be returned as, represented as a PDO::FETCH_* constant. + * + * @param int $timeoutMilliseconds+ * The length of time to wait for a response, in milliseconds. + * + * @return array|false if one or more notifications is pending, returns a single row, + * with fields message and pid, otherwise FALSE. + */ + public function pgsqlGetNotify(int $fetchMode = PDO::FETCH_DEFAULT, int $timeoutMilliseconds = 0): array|false {} + + /** + * (PHP 5 >= 5.6.0, PHP 7, PHP 8)+ * Get the server PID + * @link https://www.php.net/manual/en/pdo.pgsqlgetpid.php + * @return int The server's PID. + */ + public function pgsqlGetPid(): int {} } /** @@ -1176,413 +1492,495 @@ public function sqliteCreateFunction($function_name, $callback, $num_args = -1, * associated result set. * @link https://php.net/manual/en/class.pdostatement.php */ -class PDOStatement implements Traversable { - /** - * @var string - */ - public $queryString; - - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Executes a prepared statement - * @link https://php.net/manual/en/pdostatement.execute.php - * @param array $input_parameters [optional] - * An array of values with as many elements as there are bound - * parameters in the SQL statement being executed. - * All values are treated as PDO::PARAM_STR. - * - *- * You cannot bind multiple values to a single parameter; for example, - * you cannot bind two values to a single named parameter in an IN() - * clause. - * - *- * You cannot bind more values than specified; if more keys exist in - * input_parameters than in the SQL specified - * in the PDO::prepare, then the statement will - * fail and an error is emitted. - * - * @return bool TRUE on success or FALSE on failure. - * @throws \PDOException On error if PDO::ERRMODE_EXCEPTION option is true. - */ - public function execute ($input_parameters = null) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)- * Fetches the next row from a result set - * @link https://php.net/manual/en/pdostatement.fetch.php - * @param int $fetch_style [optional] - * Controls how the next row will be returned to the caller. This value - * must be one of the PDO::FETCH_* constants, - * defaulting to value of PDO::ATTR_DEFAULT_FETCH_MODE - * (which defaults to PDO::FETCH_BOTH). - * - * PDO::FETCH_ASSOC: returns an array indexed by column - * name as returned in your result set - * - * @param int $cursor_orientation [optional]- * For a PDOStatement object representing a scrollable cursor, this - * value determines which row will be returned to the caller. This value - * must be one of the PDO::FETCH_ORI_* constants, - * defaulting to PDO::FETCH_ORI_NEXT. To request a - * scrollable cursor for your PDOStatement object, you must set the - * PDO::ATTR_CURSOR attribute to - * PDO::CURSOR_SCROLL when you prepare the SQL - * statement with PDO::prepare. - * - * @param int $cursor_offset [optional] - * @return mixed The return value of this function on success depends on the fetch type. In - * all cases, FALSE is returned on failure. - */ - public function fetch ($fetch_style = null, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)- * Binds a parameter to the specified variable name - * @link https://php.net/manual/en/pdostatement.bindparam.php - * @param mixed $parameter - * Parameter identifier. For a prepared statement using named - * placeholders, this will be a parameter name of the form - * :name. For a prepared statement using - * question mark placeholders, this will be the 1-indexed position of - * the parameter. - * - * @param mixed $variable- * Name of the PHP variable to bind to the SQL statement parameter. - * - * @param int $data_type [optional]- * Explicit data type for the parameter using the PDO::PARAM_* - * constants. - * To return an INOUT parameter from a stored procedure, - * use the bitwise OR operator to set the PDO::PARAM_INPUT_OUTPUT bits - * for the data_type parameter. - * - * @param int $length [optional]- * Length of the data type. To indicate that a parameter is an OUT - * parameter from a stored procedure, you must explicitly set the - * length. - * - * @param mixed $driver_options [optional]- * - * @return bool TRUE on success or FALSE on failure. - */ - public function bindParam ($parameter, &$variable, $data_type = PDO::PARAM_STR, $length = null, $driver_options = null) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)- * Bind a column to a PHP variable - * @link https://php.net/manual/en/pdostatement.bindcolumn.php - * @param mixed $column - * Number of the column (1-indexed) or name of the column in the result set. - * If using the column name, be aware that the name should match the - * case of the column, as returned by the driver. - * - * @param mixed $param- * Name of the PHP variable to which the column will be bound. - * - * @param int $type [optional]- * Data type of the parameter, specified by the PDO::PARAM_* constants. - * - * @param int $maxlen [optional]- * A hint for pre-allocation. - * - * @param mixed $driverdata [optional]- * Optional parameter(s) for the driver. - * - * @return bool TRUE on success or FALSE on failure. - */ - public function bindColumn ($column, &$param, $type = null, $maxlen = null, $driverdata = null) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)- * Binds a value to a parameter - * @link https://php.net/manual/en/pdostatement.bindvalue.php - * @param mixed $parameter - * Parameter identifier. For a prepared statement using named - * placeholders, this will be a parameter name of the form - * :name. For a prepared statement using - * question mark placeholders, this will be the 1-indexed position of - * the parameter. - * - * @param mixed $value- * The value to bind to the parameter. - * - * @param int $data_type [optional]- * Explicit data type for the parameter using the PDO::PARAM_* - * constants. - * - * @return bool TRUE on success or FALSE on failure. - */ - public function bindValue ($parameter, $value, $data_type = PDO::PARAM_STR) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)- * Returns the number of rows affected by the last SQL statement - * @link https://php.net/manual/en/pdostatement.rowcount.php - * @return int the number of rows. - */ - public function rowCount () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0) - * Returns a single column from the next row of a result set - * @link https://php.net/manual/en/pdostatement.fetchcolumn.php - * @param int $column_number [optional] - * 0-indexed number of the column you wish to retrieve from the row. If - * no value is supplied, PDOStatement::fetchColumn - * fetches the first column. - * - * @return mixed Returns a single column from the next row of a result - * set or FALSE if there are no more rows. - * - *
- * There is no way to return another column from the same row if you
- * use PDOStatement::fetchColumn to retrieve data.
- */
- public function fetchColumn ($column_number = 0) {}
-
- /**
- * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Controls the contents of the returned array as documented in - * PDOStatement::fetch. - * Defaults to value of PDO::ATTR_DEFAULT_FETCH_MODE - * (which defaults to PDO::FETCH_BOTH) - * - *- * To return an array consisting of all values of a single column from - * the result set, specify PDO::FETCH_COLUMN. You - * can specify which column you want with the - * column-index parameter. - * - *- * To fetch only the unique values of a single column from the result set, - * bitwise-OR PDO::FETCH_COLUMN with - * PDO::FETCH_UNIQUE. - * - *- * To return an associative array grouped by the values of a specified - * column, bitwise-OR PDO::FETCH_COLUMN with - * PDO::FETCH_GROUP. - * - * @param mixed $fetch_argument [optional]- * This argument have a different meaning depending on the value of - * the fetch_style parameter: - * - * PDO::FETCH_COLUMN: Returns the indicated 0-indexed - * column. - * - * @param array $ctor_args [optional]- * Arguments of custom class constructor when the fetch_style - * parameter is PDO::FETCH_CLASS. - * - * @return array PDOStatement::fetchAll returns an array containing - * all of the remaining rows in the result set. The array represents each - * row as either an array of column values or an object with properties - * corresponding to each column name. - * - *
- * Using this method to fetch large result sets will result in a heavy
- * demand on system and possibly network resources. Rather than retrieving
- * all of the data and manipulating it in PHP, consider using the database
- * server to manipulate the result sets. For example, use the WHERE and
- * ORDER BY clauses in SQL to restrict results before retrieving and
- * processing them with PHP.
- */
- public function fetchAll ($fetch_style = null, $fetch_argument = null, array $ctor_args = array()) {}
-
- /**
- * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.4) - * Name of the created class. - * - * @param array $ctor_args [optional]- * Elements of this array are passed to the constructor. - * - * @return mixed an instance of the required class with property names that - * correspond to the column names or FALSE on failure. - */ - public function fetchObject ($class_name = "stdClass", array $ctor_args = array()) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)- * Fetch the SQLSTATE associated with the last operation on the statement handle - * @link https://php.net/manual/en/pdostatement.errorcode.php - * @return string Identical to PDO::errorCode, except that - * PDOStatement::errorCode only retrieves error codes - * for operations performed with PDOStatement objects. - */ - public function errorCode () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) - * Fetch extended error information associated with the last operation on the statement handle - * @link https://php.net/manual/en/pdostatement.errorinfo.php - * @return array PDOStatement::errorInfo returns an array of - * error information about the last operation performed by this - * statement handle. The array consists of the following fields: - * Element |
- * Information |
- * 0 |
- * SQLSTATE error code (a five characters alphanumeric identifier defined
- * in the ANSI SQL standard). |
- * 1 |
- * Driver specific error code. |
- * 2 |
- * Driver specific error message. |
- * - * Set a statement attribute - * @link https://php.net/manual/en/pdostatement.setattribute.php - * @param int $attribute - * @param mixed $value - * @return bool TRUE on success or FALSE on failure. - */ - public function setAttribute ($attribute, $value) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) - * Retrieve a statement attribute - * @link https://php.net/manual/en/pdostatement.getattribute.php - * @param int $attribute - * @return mixed the attribute value. - */ - public function getAttribute ($attribute) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) - * Returns the number of columns in the result set - * @link https://php.net/manual/en/pdostatement.columncount.php - * @return int the number of columns in the result set represented by the - * PDOStatement object. If there is no result set, - * PDOStatement::columnCount returns 0. - */ - public function columnCount () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) - * Returns metadata for a column in a result set - * @link https://php.net/manual/en/pdostatement.getcolumnmeta.php - * @param int $column - * The 0-indexed column in the result set. - * - * @return array|false an associative array containing the following values representing - * the metadata for a single column: - * - *
- * Returns FALSE if the requested column does not exist in the result set,
- * or if no result set exists.
- */
- public function getColumnMeta ($column) {}
-
- /**
- * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) - * The fetch mode must be one of the PDO::FETCH_* constants. - * - * @param string|object $classNameObject [optional]- * Class name or object - * - * @param array $ctorarfg [optional]Constructor arguments. - * @return bool TRUE on success or FALSE on failure. - */ - public function setFetchMode ($mode, $classNameObject = null, array $ctorarfg = array()) {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)- * Advances to the next rowset in a multi-rowset statement handle - * @link https://php.net/manual/en/pdostatement.nextrowset.php - * @return bool TRUE on success or FALSE on failure. - */ - public function nextRowset () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0) - * Closes the cursor, enabling the statement to be executed again. - * @link https://php.net/manual/en/pdostatement.closecursor.php - * @return bool TRUE on success or FALSE on failure. - */ - public function closeCursor () {} - - /** - * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0) - * Dump an SQL prepared command - * @link https://php.net/manual/en/pdostatement.debugdumpparams.php - * @return bool No value is returned. - */ - public function debugDumpParams () {} - - final public function __wakeup () {} - - final public function __sleep () {} +class PDOStatement implements IteratorAggregate +{ + /** + * @var string + */ + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] + public $queryString; + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Executes a prepared statement + * @link https://php.net/manual/en/pdostatement.execute.php + * @param array $params [optional] + * An array of values with as many elements as there are bound + * parameters in the SQL statement being executed. + * All values are treated as PDO::PARAM_STR. + * + *+ * You cannot bind multiple values to a single parameter; for example, + * you cannot bind two values to a single named parameter in an IN() + * clause. + * + *+ * You cannot bind more values than specified; if more keys exist in + * input_parameters than in the SQL specified + * in the PDO::prepare, then the statement will + * fail and an error is emitted. + * + * @return bool TRUE on success or FALSE on failure. + * @throws PDOException On error if PDO::ERRMODE_EXCEPTION option is true. + */ + #[TentativeType] + public function execute(#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $params = null): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)+ * Fetches the next row from a result set + * @link https://php.net/manual/en/pdostatement.fetch.php + * @param int $mode [optional] + * Controls how the next row will be returned to the caller. This value + * must be one of the PDO::FETCH_* constants, + * defaulting to value of PDO::ATTR_DEFAULT_FETCH_MODE + * (which defaults to PDO::FETCH_BOTH). + * + *+ * PDO::FETCH_ASSOC: returns an array indexed by column + * name as returned in your result set + * + * @param int $cursorOrientation [optional]+ * For a PDOStatement object representing a scrollable cursor, this + * value determines which row will be returned to the caller. This value + * must be one of the PDO::FETCH_ORI_* constants, + * defaulting to PDO::FETCH_ORI_NEXT. To request a + * scrollable cursor for your PDOStatement object, you must set the + * PDO::ATTR_CURSOR attribute to + * PDO::CURSOR_SCROLL when you prepare the SQL + * statement with PDO::prepare. + * + * @param int $cursorOffset [optional] + * @return mixed The return value of this function on success depends on the fetch type. In + * all cases, FALSE is returned on failure. + */ + #[TentativeType] + public function fetch( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOrientation = PDO::FETCH_ORI_NEXT, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOffset = 0 + ): mixed {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)+ * Binds a parameter to the specified variable name + * @link https://php.net/manual/en/pdostatement.bindparam.php + * @param mixed $param + * Parameter identifier. For a prepared statement using named + * placeholders, this will be a parameter name of the form + * :name. For a prepared statement using + * question mark placeholders, this will be the 1-indexed position of + * the parameter. + * + * @param mixed &$var+ * Name of the PHP variable to bind to the SQL statement parameter. + * + * @param int $type [optional]+ * Explicit data type for the parameter using the PDO::PARAM_* + * constants. + * To return an INOUT parameter from a stored procedure, + * use the bitwise OR operator to set the PDO::PARAM_INPUT_OUTPUT bits + * for the data_type parameter. + * + * @param int $maxLength [optional]+ * Length of the data type. To indicate that a parameter is an OUT + * parameter from a stored procedure, you must explicitly set the + * length. + * + * @param mixed $driverOptions [optional]+ * + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function bindParam( + #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $param, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null + ): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)+ * Bind a column to a PHP variable + * @link https://php.net/manual/en/pdostatement.bindcolumn.php + * @param mixed $column + * Number of the column (1-indexed) or name of the column in the result set. + * If using the column name, be aware that the name should match the + * case of the column, as returned by the driver. + * + * @param mixed &$var+ * Name of the PHP variable to which the column will be bound. + * + * @param int $type [optional]+ * Data type of the parameter, specified by the PDO::PARAM_* constants. + * + * @param int $maxLength [optional]+ * A hint for pre-allocation. + * + * @param mixed $driverOptions [optional]+ * Optional parameter(s) for the driver. + * + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function bindColumn( + #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $column, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null + ): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 1.0.0)+ * Binds a value to a parameter + * @link https://php.net/manual/en/pdostatement.bindvalue.php + * @param mixed $param + * Parameter identifier. For a prepared statement using named + * placeholders, this will be a parameter name of the form + * :name. For a prepared statement using + * question mark placeholders, this will be the 1-indexed position of + * the parameter. + * + * @param mixed $value+ * The value to bind to the parameter. + * + * @param int $type [optional]+ * Explicit data type for the parameter using the PDO::PARAM_* + * constants. + * + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function bindValue( + #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $param, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR + ): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)+ * Returns the number of rows affected by the last SQL statement + * @link https://php.net/manual/en/pdostatement.rowcount.php + * @return int the number of rows. + */ + #[TentativeType] + public function rowCount(): int {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0) + * Returns a single column from the next row of a result set + * @link https://php.net/manual/en/pdostatement.fetchcolumn.php + * @param int $column [optional] + * 0-indexed number of the column you wish to retrieve from the row. If + * no value is supplied, PDOStatement::fetchColumn + * fetches the first column. + * + * @return mixed Returns a single column from the next row of a result + * set or FALSE if there are no more rows. + * + *
+ * There is no way to return another column from the same row if you
+ * use PDOStatement::fetchColumn to retrieve data.
+ */
+ #[TentativeType]
+ public function fetchColumn(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column = 0): mixed {}
+
+ /**
+ * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) + * Controls the contents of the returned array as documented in + * PDOStatement::fetch. + * Defaults to value of PDO::ATTR_DEFAULT_FETCH_MODE + * (which defaults to PDO::FETCH_BOTH) + * + *+ * To return an array consisting of all values of a single column from + * the result set, specify PDO::FETCH_COLUMN. You + * can specify which column you want with the + * column-index parameter. + * + *+ * To fetch only the unique values of a single column from the result set, + * bitwise-OR PDO::FETCH_COLUMN with + * PDO::FETCH_UNIQUE. + * + *+ * To return an associative array grouped by the values of a specified + * column, bitwise-OR PDO::FETCH_COLUMN with + * PDO::FETCH_GROUP. + * + * @param mixed ...$args+ * Arguments of custom class constructor when the fetch_style + * parameter is PDO::FETCH_CLASS. + * + * @return array|false PDOStatement::fetchAll returns an array containing + * all of the remaining rows in the result set. The array represents each + * row as either an array of column values or an object with properties + * corresponding to each column name. + * An empty array is returned if there are zero results to fetch, or false on failure. + * + *
+ * Using this method to fetch large result sets will result in a heavy
+ * demand on system and possibly network resources. Rather than retrieving
+ * all of the data and manipulating it in PHP, consider using the database
+ * server to manipulate the result sets. For example, use the WHERE and
+ * ORDER BY clauses in SQL to restrict results before retrieving and
+ * processing them with PHP.
+ */
+ #[TentativeType]
+ public function fetchAll(
+ #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $fetch_argument = null,
+ #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args
+ ): array {}
+
+ /**
+ * @template T
+ *
+ * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.4)
+ * Name of the created class.
+ *
+ * Elements of this array are passed to the constructor.
+ *
+ * The 0-indexed column in the result set.
+ *
+ * Returns FALSE if the requested column does not exist in the result set,
+ * or if no result set exists.
+ */
+ #[TentativeType]
+ #[ArrayShape([
+ "name" => "string",
+ "len" => "int",
+ "precision" => "int",
+ "oci:decl_type" => "int|string",
+ "native_type" => "string",
+ "scale" => "int",
+ "flags" => "array",
+ "pdo_type" => "int"
+ ])]
+ public function getColumnMeta(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): array|false {}
+
+ /**
+ * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) + * The fetch mode must be one of the PDO::FETCH_* constants. + * + * @param null|string|object $className [optional]+ * Class name or object + * + * @param array $params [optional]Constructor arguments. + * @return bool TRUE on success or FALSE on failure. + */ + #[PhpStormStubsElementAvailable(to: '7.4')] + public function setFetchMode($mode, $className = null, $params = []) {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)+ * Set the default fetch mode for this statement + * @link https://php.net/manual/en/pdostatement.setfetchmode.php + * @param int $mode + * The fetch mode must be one of the PDO::FETCH_* constants. + * + * @param string|object|null $className [optional]+ * Class name or object + * + * @param mixed ...$paramsConstructor arguments. + * @return bool TRUE on success or FALSE on failure. + */ + #[PhpStormStubsElementAvailable('8.0')] + public function setFetchMode($mode, $className = null, ...$params) {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)+ * Advances to the next rowset in a multi-rowset statement handle + * @link https://php.net/manual/en/pdostatement.nextrowset.php + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function nextRowset(): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0) + * Closes the cursor, enabling the statement to be executed again. + * @link https://php.net/manual/en/pdostatement.closecursor.php + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function closeCursor(): bool {} + + /** + * (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.9.0) + * Dump an SQL prepared command + * @link https://php.net/manual/en/pdostatement.debugdumpparams.php + * @return bool|null No value is returned. + */ + #[TentativeType] + public function debugDumpParams(): ?bool {} + + final public function __wakeup() {} + + final public function __sleep() {} + + /** + * @return Iterator + * @since 8.0 + */ + public function getIterator(): Iterator {} } -final class PDORow { +final class PDORow +{ + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] + public $queryString; } /** @@ -1592,7 +1990,7 @@ final class PDORow { * @return array PDO::getAvailableDrivers returns an array of PDO driver names. If * no drivers are available, it returns an empty array. */ -function pdo_drivers () {} +#[Pure] +function pdo_drivers(): array {} // End of PDO v.1.0.4dev -?> diff --git a/Parle/ErrorInfo.php b/Parle/ErrorInfo.php index 96c660bd2..1389b974c 100644 --- a/Parle/ErrorInfo.php +++ b/Parle/ErrorInfo.php @@ -1,9 +1,7 @@ - * Construct a Phar archive object - * @link https://php.net/manual/en/phar.construct.php - * @param string $fname - * Path to an existing Phar archive or to-be-created archive. The file name's - * extension must contain .phar. - * - * @param int $flags [optional]- * Flags to pass to parent class RecursiveDirectoryIterator. - * - * @param string $alias [optional]- * Alias with which this Phar archive should be referred to in calls to stream - * functionality. - * +class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, SeekableIterator, Countable, ArrayAccess +{ + public const BZ2 = 8192; + public const GZ = 4096; + public const NONE = 0; + public const PHAR = 1; + public const TAR = 2; + public const ZIP = 3; + public const COMPRESSED = 61440; + public const PHP = 0; + public const PHPS = 1; + public const MD5 = 1; + public const OPENSSL = 16; + public const SHA1 = 2; + public const SHA256 = 3; + public const SHA512 = 4; + public const OPENSSL_SHA256 = 5; + public const OPENSSL_SHA512 = 6; + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Construct a Phar archive object + * @link https://php.net/manual/en/phar.construct.php + * @param string $filename + * Path to an existing Phar archive or to-be-created archive. The file name's + * extension must contain .phar. + * + * @param int $flags [optional]+ * Flags to pass to parent class RecursiveDirectoryIterator. + * + * @param string $alias [optional]+ * Alias with which this Phar archive should be referred to in calls to stream + * functionality. + * * @throws BadMethodCallException If called twice. * @throws UnexpectedValueException If the phar archive can't be opened. - */ - public function __construct ($fname, $flags = null, $alias = null) {} - - public function __destruct () {} - - /** - * (Unknown)- * Add an empty directory to the phar archive - * @link https://php.net/manual/en/phar.addemptydir.php - * @param string $dirname - * The name of the empty directory to create in the phar archive - * - * @return void no return value, exception is thrown on failure. - */ - public function addEmptyDir ($dirname) {} - - /** - * (Unknown)- * Add a file from the filesystem to the phar archive - * @link https://php.net/manual/en/phar.addfile.php - * @param string $file - * Full or relative path to a file on disk to be added - * to the phar archive. - * - * @param string $localname [optional]- * Path that the file will be stored in the archive. - * - * @return void no return value, exception is thrown on failure. - */ - public function addFile ($file, $localname = null) {} - - /** - * (Unknown)- * Add a file from the filesystem to the phar archive - * @link https://php.net/manual/en/phar.addfromstring.php - * @param string $localname - * Path that the file will be stored in the archive. - * - * @param string $contents- * The file contents to store - * - * @return void no return value, exception is thrown on failure. - */ - public function addFromString ($localname, $contents) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Construct a phar archive from the files within a directory. - * @link https://php.net/manual/en/phar.buildfromdirectory.php - * @param string $base_dir - * The full or relative path to the directory that contains all files - * to add to the archive. - * - * @param string $regex [optional]- * An optional pcre regular expression that is used to filter the - * list of files. Only file paths matching the regular expression - * will be included in the archive. - * - * @return array Phar::buildFromDirectory returns an associative array - * mapping internal path of file to the full path of the file on the - * filesystem. - */ - public function buildFromDirectory ($base_dir, $regex = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Construct a phar archive from an iterator. - * @link https://php.net/manual/en/phar.buildfromiterator.php - * @param Iterator $iter - * Any iterator that either associatively maps phar file to location or - * returns SplFileInfo objects - * - * @param string $base_directory [optional]- * For iterators that return SplFileInfo objects, the portion of each - * file's full path to remove when adding to the phar archive - * - * @return array Phar::buildFromIterator returns an associative array - * mapping internal path of file to the full path of the file on the - * filesystem. - */ - public function buildFromIterator (Iterator $iter, $base_directory = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Compresses all files in the current Phar archive - * @link https://php.net/manual/en/phar.compressfiles.php - * @param int $compression - * Compression must be one of Phar::GZ, - * Phar::BZ2 to add compression, or Phar::NONE - * to remove compression. - * - * @return void No value is returned. - */ - public function compressFiles ($compression) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Decompresses all files in the current Phar archive - * @link https://php.net/manual/en/phar.decompressfiles.php - * @return bool TRUE on success or FALSE on failure. - */ - public function decompressFiles () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0) - * Compresses the entire Phar archive using Gzip or Bzip2 compression - * @link https://php.net/manual/en/phar.compress.php - * @param int $compression - * Compression must be one of Phar::GZ, - * Phar::BZ2 to add compression, or Phar::NONE - * to remove compression. - * - * @param string $extension [optional]- * By default, the extension is .phar.gz - * or .phar.bz2 for compressing phar archives, and - * .phar.tar.gz or .phar.tar.bz2 for - * compressing tar archives. For decompressing, the default file extensions - * are .phar and .phar.tar. - * - * @return object a Phar object. - */ - public function compress ($compression, $extension = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Decompresses the entire Phar archive - * @link https://php.net/manual/en/phar.decompress.php - * @param string $extension [optional] - * For decompressing, the default file extensions - * are .phar and .phar.tar. - * Use this parameter to specify another file extension. Be aware - * that all executable phar archives must contain .phar - * in their filename. - * - * @return object A Phar object is returned. - */ - public function decompress ($extension = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Convert a phar archive to another executable phar archive file format - * @link https://php.net/manual/en/phar.converttoexecutable.php - * @param int $format [optional] - * This should be one of Phar::PHAR, Phar::TAR, - * or Phar::ZIP. If set to NULL, the existing file format - * will be preserved. - * - * @param int $compression [optional]- * This should be one of Phar::NONE for no whole-archive - * compression, Phar::GZ for zlib-based compression, and - * Phar::BZ2 for bzip-based compression. - * - * @param string $extension [optional]- * This parameter is used to override the default file extension for a - * converted archive. Note that all zip- and tar-based phar archives must contain - * .phar in their file extension in order to be processed as a - * phar archive. - * - *- * If converting to a phar-based archive, the default extensions are - * .phar, .phar.gz, or .phar.bz2 - * depending on the specified compression. For tar-based phar archives, the - * default extensions are .phar.tar, .phar.tar.gz, - * and .phar.tar.bz2. For zip-based phar archives, the - * default extension is .phar.zip. - * - * @return Phar The method returns a Phar object on success and throws an - * exception on failure. - */ - public function convertToExecutable ($format = 9021976, $compression = 9021976, $extension = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Convert a phar archive to a non-executable tar or zip file - * @link https://php.net/manual/en/phar.converttodata.php - * @param int $format [optional] - * This should be one of Phar::TAR - * or Phar::ZIP. If set to NULL, the existing file format - * will be preserved. - * - * @param int $compression [optional]- * This should be one of Phar::NONE for no whole-archive - * compression, Phar::GZ for zlib-based compression, and - * Phar::BZ2 for bzip-based compression. - * - * @param string $extension [optional]- * This parameter is used to override the default file extension for a - * converted archive. Note that .phar cannot be used - * anywhere in the filename for a non-executable tar or zip archive. - * - *- * If converting to a tar-based phar archive, the - * default extensions are .tar, .tar.gz, - * and .tar.bz2 depending on specified compression. - * For zip-based archives, the - * default extension is .zip. - * - * @return PharData The method returns a PharData object on success and throws an - * exception on failure. - */ - public function convertToData ($format = 9021976, $compression = 9021976, $extension = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Copy a file internal to the phar archive to another new file within the phar - * @link https://php.net/manual/en/phar.copy.php - * @param string $oldfile - * @param string $newfile - * @return bool returns TRUE on success, but it is safer to encase method call in a - * try/catch block and assume success if no exception is thrown. - */ - public function copy ($oldfile, $newfile) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns the number of entries (files) in the Phar archive - * @link https://php.net/manual/en/phar.count.php - * @return int The number of files contained within this phar, or 0 (the number zero) - * if none. - */ - public function count () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0) - * Delete a file within a phar archive - * @link https://php.net/manual/en/phar.delete.php - * @param string $entry - * Path within an archive to the file to delete. - * - * @return bool returns TRUE on success, but it is better to check for thrown exception, - * and assume success if none is thrown. - */ - public function delete ($entry) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.2.0)- * Deletes the global metadata of the phar - * @link https://php.net/manual/en/phar.delmetadata.php - * @return bool returns TRUE on success, but it is better to check for thrown exception, - * and assume success if none is thrown. - */ - public function delMetadata () {} - - /** - * (Unknown) - * Extract the contents of a phar archive to a directory - * @link https://php.net/manual/en/phar.extractto.php - * @param string $pathto - * Path within an archive to the file to delete. - * - * @param string|array $files [optional]- * The name of a file or directory to extract, or an array of files/directories to extract - * - * @param bool $overwrite [optional]- * Set to TRUE to enable overwriting existing files - * - * @return bool returns TRUE on success, but it is better to check for thrown exception, - * and assume success if none is thrown. - */ - public function extractTo ($pathto, $files = null, $overwrite = false) {} - - /** - * @see setAlias - * @return string - */ - public function getAlias () {} - - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Returns phar archive meta-data - * @link https://php.net/manual/en/phar.getmetadata.php - * @return mixed any PHP variable that can be serialized and is stored as meta-data for the Phar archive, - * or NULL if no meta-data is stored. - */ - public function getMetadata () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Return whether phar was modified - * @link https://php.net/manual/en/phar.getmodified.php - * @return bool TRUE if the phar has been modified since opened, FALSE if not. - */ - public function getModified () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Return MD5/SHA1/SHA256/SHA512/OpenSSL signature of a Phar archive - * @link https://php.net/manual/en/phar.getsignature.php - * @return array Array with the opened archive's signature in hash key and MD5, - * SHA-1, - * SHA-256, SHA-512, or OpenSSL - * in hash_type. This signature is a hash calculated on the - * entire phar's contents, and may be used to verify the integrity of the archive. - * A valid signature is absolutely required of all executable phar archives if the - * phar.require_hash INI variable - * is set to true. - */ - public function getSignature () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Return the PHP loader or bootstrap stub of a Phar archive - * @link https://php.net/manual/en/phar.getstub.php - * @return string a string containing the contents of the bootstrap loader (stub) of - * the current Phar archive. - */ - public function getStub () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Return version info of Phar archive - * @link https://php.net/manual/en/phar.getversion.php - * @return string The opened archive's API version. This is not to be confused with - * the API version that the loaded phar extension will use to create - * new phars. Each Phar archive has the API version hard-coded into - * its manifest. See Phar file format - * documentation for more information. - */ - public function getVersion () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.2.0) - * Returns whether phar has global meta-data - * @link https://php.net/manual/en/phar.hasmetadata.php - * @return bool TRUE if meta-data has been set, and FALSE if not. - */ - public function hasMetadata () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Used to determine whether Phar write operations are being buffered, or are flushing directly to disk - * @link https://php.net/manual/en/phar.isbuffering.php - * @return bool TRUE if the write operations are being buffer, FALSE otherwise. - */ - public function isBuffering () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0) - * Returns Phar::GZ or PHAR::BZ2 if the entire phar archive is compressed (.tar.gz/tar.bz and so on) - * @link https://php.net/manual/en/phar.iscompressed.php - * @return mixed Phar::GZ, Phar::BZ2 or FALSE - */ - public function isCompressed () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0) - * Returns true if the phar archive is based on the tar/phar/zip file format depending on the parameter - * @link https://php.net/manual/en/phar.isfileformat.php - * @param int $format - * Either Phar::PHAR, Phar::TAR, or - * Phar::ZIP to test for the format of the archive. - * - * @return bool TRUE if the phar archive matches the file format requested by the parameter - */ - public function isFileFormat ($format) {} - - /** - * (Unknown)- * Returns true if the phar archive can be modified - * @link https://php.net/manual/en/phar.iswritable.php - * @return bool TRUE if the phar archive can be modified - */ - public function isWritable () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * determines whether a file exists in the phar - * @link https://php.net/manual/en/phar.offsetexists.php - * @param string $offset - * The filename (relative path) to look for in a Phar. - * - * @return bool TRUE if the file exists within the phar, or FALSE if not. - */ - public function offsetExists ($offset) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Gets a PharFileInfo object for a specific file - * @link https://php.net/manual/en/phar.offsetget.php - * @param string $offset - * The filename (relative path) to look for in a Phar. - * - * @return int A PharFileInfo object is returned that can be used to - * iterate over a file's contents or to retrieve information about the current file. - */ - public function offsetGet ($offset) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * set the contents of an internal file to those of an external file - * @link https://php.net/manual/en/phar.offsetset.php - * @param string $offset - * The filename (relative path) to modify in a Phar. - * - * @param string $value- * Content of the file. - * - * @return void No return values. - */ - public function offsetSet ($offset, $value) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * remove a file from a phar - * @link https://php.net/manual/en/phar.offsetunset.php - * @param string $offset - * The filename (relative path) to modify in a Phar. - * - * @return bool TRUE on success or FALSE on failure. - */ - public function offsetUnset ($offset) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.2.1)- * Set the alias for the Phar archive - * @link https://php.net/manual/en/phar.setalias.php - * @param string $alias - * A shorthand string that this archive can be referred to in phar - * stream wrapper access. - * - * @return bool - */ - public function setAlias ($alias) {} - - /** - * (Unknown)- * Used to set the PHP loader or bootstrap stub of a Phar archive to the default loader - * @link https://php.net/manual/en/phar.setdefaultstub.php - * @param string $index [optional] - * Relative path within the phar archive to run if accessed on the command-line - * - * @param string $webindex [optional]- * Relative path within the phar archive to run if accessed through a web browser - * - * @return bool TRUE on success or FALSE on failure. - */ - public function setDefaultStub ($index = null, $webindex = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Sets phar archive meta-data - * @link https://php.net/manual/en/phar.setmetadata.php - * @param mixed $metadata - * Any PHP variable containing information to store that describes the phar archive - * - * @return void No value is returned. - */ - public function setMetadata ($metadata) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.1.0)- * set the signature algorithm for a phar and apply it. - * @link https://php.net/manual/en/phar.setsignaturealgorithm.php - * @param int $sigtype - * One of Phar::MD5, - * Phar::SHA1, Phar::SHA256, - * Phar::SHA512, or Phar::OPENSSL - * - * @param string $privatekey [optional]
- * The contents of an OpenSSL private key, as extracted from a certificate or
- * OpenSSL key file:
- * - * Used to set the PHP loader or bootstrap stub of a Phar archive - * @link https://php.net/manual/en/phar.setstub.php - * @param string $stub - * A string or an open stream handle to use as the executable stub for this - * phar archive. - * - * @param int $len [optional]- * - * @return bool TRUE on success or FALSE on failure. - */ - public function setStub ($stub, $len = -1) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Start buffering Phar write operations, do not modify the Phar object on disk - * @link https://php.net/manual/en/phar.startbuffering.php - * @return void No value is returned. - */ - public function startBuffering () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Stop buffering write requests to the Phar archive, and save changes to disk - * @link https://php.net/manual/en/phar.stopbuffering.php - * @return void No value is returned. - */ - public function stopBuffering () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns the api version - * @link https://php.net/manual/en/phar.apiversion.php - * @return string The API version string as in "1.0.0". - */ - final public static function apiVersion () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns whether phar extension supports compression using either zlib or bzip2 - * @link https://php.net/manual/en/phar.cancompress.php - * @param int $type [optional] - * Either Phar::GZ or Phar::BZ2 can be - * used to test whether compression is possible with a specific compression - * algorithm (zlib or bzip2). - * - * @return bool TRUE if compression/decompression is available, FALSE if not. - */ - final public static function canCompress ($type = 0) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Returns whether phar extension supports writing and creating phars - * @link https://php.net/manual/en/phar.canwrite.php - * @return bool TRUE if write access is enabled, FALSE if it is disabled. - */ - final public static function canWrite () {} - - /** - * (Unknown) - * Create a phar-file format specific stub - * @link https://php.net/manual/en/phar.createdefaultstub.php - * @param string $indexfile [optional] - * @param string $webindexfile [optional] - * @return string a string containing the contents of a customized bootstrap loader (stub) - * that allows the created Phar archive to work with or without the Phar extension - * enabled. - */ - final public static function createDefaultStub ($indexfile = null, $webindexfile = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.2.0) - * Return array of supported compression algorithms - * @link https://php.net/manual/en/phar.getsupportedcompression.php - * @return array an array containing any of Phar::GZ or - * Phar::BZ2, depending on the availability of - * the zlib extension or the - * bz2 extension. - */ - final public static function getSupportedCompression () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.1.0) - * Return array of supported signature types - * @link https://php.net/manual/en/phar.getsupportedsignatures.php - * @return array an array containing any of MD5, SHA-1, - * SHA-256, SHA-512, or OpenSSL. - */ - final public static function getSupportedSignatures () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0) - * instructs phar to intercept fopen, file_get_contents, opendir, and all of the stat-related functions - * @link https://php.net/manual/en/phar.interceptfilefuncs.php - * @return void - */ - final public static function interceptFileFuncs () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.2.0) - * Returns whether the given filename is a valid phar filename - * @link https://php.net/manual/en/phar.isvalidpharfilename.php - * @param string $filename - * The name or full path to a phar archive not yet created - * - * @param bool $executable [optional]- * This parameter determines whether the filename should be treated as - * a phar executable archive, or a data non-executable archive - * - * @return bool TRUE if the filename is valid, FALSE if not. - */ - final public static function isValidPharFilename ($filename, $executable = true) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Loads any phar archive with an alias - * @link https://php.net/manual/en/phar.loadphar.php - * @param string $filename - * the full or relative path to the phar archive to open - * - * @param string $alias [optional]- * The alias that may be used to refer to the phar archive. Note - * that many phar archives specify an explicit alias inside the - * phar archive, and a PharException will be thrown if - * a new alias is specified in this case. - * - * @return bool TRUE on success or FALSE on failure. - */ - final public static function loadPhar ($filename, $alias = null) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Reads the currently executed file (a phar) and registers its manifest - * @link https://php.net/manual/en/phar.mapphar.php - * @param string $alias [optional] - * The alias that can be used in phar:// URLs to - * refer to this archive, rather than its full path. - * - * @param int $dataoffset [optional]- * Unused variable, here for compatibility with PEAR's PHP_Archive. - * - * @return bool TRUE on success or FALSE on failure. - */ - final public static function mapPhar ($alias = null, $dataoffset = 0) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Returns the full path on disk or full phar URL to the currently executing Phar archive - * @link https://php.net/manual/en/phar.running.php - * @param bool $retphar [optional] - * If FALSE, the full path on disk to the phar - * archive is returned. If TRUE, a full phar URL is returned. - * - * @return string the filename if valid, empty string otherwise. - */ - final public static function running ($retphar = true) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Mount an external path or file to a virtual location within the phar archive - * @link https://php.net/manual/en/phar.mount.php - * @param string $pharpath - * The internal path within the phar archive to use as the mounted path location. - * This must be a relative path within the phar archive, and must not already exist. - * - * @param string $externalpath- * A path or URL to an external file or directory to mount within the phar archive - * - * @return void No return. PharException is thrown on failure. - */ - final public static function mount ($pharpath, $externalpath) {} - - /** - * (Unknown)- * Defines a list of up to 4 $_SERVER variables that should be modified for execution - * @link https://php.net/manual/en/phar.mungserver.php - * @param array $munglist - * an array containing as string indices any of - * REQUEST_URI, PHP_SELF, - * SCRIPT_NAME and SCRIPT_FILENAME. - * Other values trigger an exception, and Phar::mungServer - * is case-sensitive. - * - * @return void No return. - */ - final public static function mungServer (array $munglist) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Completely remove a phar archive from disk and from memory - * @link https://php.net/manual/en/phar.unlinkarchive.php - * @param string $archive - * The path on disk to the phar archive. - * - * @return bool TRUE on success or FALSE on failure. - */ - final public static function unlinkArchive ($archive) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * mapPhar for web-based phars. front controller for web applications - * @link https://php.net/manual/en/phar.webphar.php - * @param string $alias [optional] - * The alias that can be used in phar:// URLs to - * refer to this archive, rather than its full path. - * - * @param string $index [optional]- * The location within the phar of the directory index. - * - * @param string $f404 [optional]- * The location of the script to run when a file is not found. This - * script should output the proper HTTP 404 headers. - * - * @param array $mimetypes [optional]
- * An array mapping additional file extensions to MIME type.
- * If the default mapping is sufficient, pass an empty array.
- * By default, these extensions are mapped to these MIME types:
- * - * The rewrites function is passed a string as its only parameter and must return a string or FALSE. - * - *- * If you are using fast-cgi or cgi then the parameter passed to the function is the value of the - * $_SERVER['PATH_INFO'] variable. Otherwise, the parameter passed to the function is the value - * of the $_SERVER['REQUEST_URI'] variable. - * - *- * If a string is returned it is used as the internal file path. If FALSE is returned then webPhar() will - * send a HTTP 403 Denied Code. - * - * @return void No value is returned. - */ - final public static function webPhar ($alias = null, $index = "index.php", $f404 = null, array $mimetypes = null, callable $rewrites = null) {} - - /** - * Returns whether current entry is a directory and not '.' or '..' - * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php - * @param bool $allow_links [optional]- * - * @return bool whether the current entry is a directory, but not '.' or '..' - * @since 5.0 - */ - public function hasChildren ($allow_links = false) {} - - /** - * Returns an iterator for the current entry if it is a directory - * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php - * @return mixed The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator - * constants. - * @since 5.1 - */ - public function getChildren () {} - - /** - * Rewinds back to the beginning - * @link https://php.net/manual/en/filesystemiterator.rewind.php - * @return void No value is returned. - * @since 5.3 - */ - public function rewind () {} - - /** - * Move to the next file - * @link https://php.net/manual/en/filesystemiterator.next.php - * @return void No value is returned. - * @since 5.3 - */ - public function next () {} - - /** - * Retrieve the key for the current file - * @link https://php.net/manual/en/filesystemiterator.key.php - * @return string the pathname or filename depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function key () {} - - /** - * The current file - * @link https://php.net/manual/en/filesystemiterator.current.php - * @return mixed The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function current () {} - - /** - * Check whether current DirectoryIterator position is a valid file - * @link https://php.net/manual/en/directoryiterator.valid.php - * @return bool TRUE if the position is valid, otherwise FALSE - * @since 5.0 - */ - public function valid () {} - - /** - * Seek to a DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.seek.php - * @param int $position- * The zero-based numeric position to seek to. - * - * @return void No value is returned. - * @since 5.3 - */ - public function seek ($position) {} - - public function _bad_state_ex (){} - + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $fileformat = null + ) {} + + public function __destruct() {} + + /** + * (Unknown)+ * Add an empty directory to the phar archive + * @link https://php.net/manual/en/phar.addemptydir.php + * @param string $directory + * The name of the empty directory to create in the phar archive + * + * @return void no return value, exception is thrown on failure. + */ + #[TentativeType] + public function addEmptyDir( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $directory = '', + #[PhpStormStubsElementAvailable(from: '8.0')] string $directory + ): void {} + + /** + * (Unknown)+ * Add a file from the filesystem to the phar archive + * @link https://php.net/manual/en/phar.addfile.php + * @param string $filename + * Full or relative path to a file on disk to be added + * to the phar archive. + * + * @param string $localName [optional]+ * Path that the file will be stored in the archive. + * + * @return void no return value, exception is thrown on failure. + */ + #[TentativeType] + public function addFile( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $localName = null + ): void {} + + /** + * (Unknown)+ * Add a file from the filesystem to the phar archive + * @link https://php.net/manual/en/phar.addfromstring.php + * @param string $localName + * Path that the file will be stored in the archive. + * + * @param string $contents+ * The file contents to store + * + * @return void no return value, exception is thrown on failure. + */ + #[TentativeType] + public function addFromString( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $contents = '', + #[PhpStormStubsElementAvailable(from: '8.0')] string $contents + ): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Construct a phar archive from the files within a directory. + * @link https://php.net/manual/en/phar.buildfromdirectory.php + * @param string $directory + * The full or relative path to the directory that contains all files + * to add to the archive. + * + * @param $pattern $regex [optional]+ * An optional pcre regular expression that is used to filter the + * list of files. Only file paths matching the regular expression + * will be included in the archive. + * + * @return array Phar::buildFromDirectory returns an associative array + * mapping internal path of file to the full path of the file on the + * filesystem. + */ + #[TentativeType] + public function buildFromDirectory( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern = null + ): array {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Construct a phar archive from an iterator. + * @link https://php.net/manual/en/phar.buildfromiterator.php + * @param Traversable $iterator + * Any iterator that either associatively maps phar file to location or + * returns SplFileInfo objects + * + * @param string $baseDirectory [optional]+ * For iterators that return SplFileInfo objects, the portion of each + * file's full path to remove when adding to the phar archive + * + * @return array Phar::buildFromIterator returns an associative array + * mapping internal path of file to the full path of the file on the + * filesystem. + */ + #[TentativeType] + public function buildFromIterator( + Traversable $iterator, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $baseDirectory = null + ): array {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Compresses all files in the current Phar archive + * @link https://php.net/manual/en/phar.compressfiles.php + * @param int $compression + * Compression must be one of Phar::GZ, + * Phar::BZ2 to add compression, or Phar::NONE + * to remove compression. + * + * @return void No value is returned. + */ + #[TentativeType] + public function compressFiles(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Decompresses all files in the current Phar archive + * @link https://php.net/manual/en/phar.decompressfiles.php + * @return bool TRUE on success or FALSE on failure. + */ + public function decompressFiles() {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0) + * Compresses the entire Phar archive using Gzip or Bzip2 compression + * @link https://php.net/manual/en/phar.compress.php + * @param int $compression + * Compression must be one of Phar::GZ, + * Phar::BZ2 to add compression, or Phar::NONE + * to remove compression. + * + * @param string $extension [optional]+ * By default, the extension is .phar.gz + * or .phar.bz2 for compressing phar archives, and + * .phar.tar.gz or .phar.tar.bz2 for + * compressing tar archives. For decompressing, the default file extensions + * are .phar and .phar.tar. + * + * @return static|null a Phar object. + */ + #[TentativeType] + public function compress( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null + ): ?Phar {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Decompresses the entire Phar archive + * @link https://php.net/manual/en/phar.decompress.php + * @param string $extension [optional] + * For decompressing, the default file extensions + * are .phar and .phar.tar. + * Use this parameter to specify another file extension. Be aware + * that all executable phar archives must contain .phar + * in their filename. + * + * @return static|null A Phar object is returned. + */ + #[TentativeType] + public function decompress(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null): ?Phar {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Convert a phar archive to another executable phar archive file format + * @link https://php.net/manual/en/phar.converttoexecutable.php + * @param int $format [optional] + * This should be one of Phar::PHAR, Phar::TAR, + * or Phar::ZIP. If set to NULL, the existing file format + * will be preserved. + * + * @param int $compression [optional]+ * This should be one of Phar::NONE for no whole-archive + * compression, Phar::GZ for zlib-based compression, and + * Phar::BZ2 for bzip-based compression. + * + * @param string $extension [optional]+ * This parameter is used to override the default file extension for a + * converted archive. Note that all zip- and tar-based phar archives must contain + * .phar in their file extension in order to be processed as a + * phar archive. + * + *+ * If converting to a phar-based archive, the default extensions are + * .phar, .phar.gz, or .phar.bz2 + * depending on the specified compression. For tar-based phar archives, the + * default extensions are .phar.tar, .phar.tar.gz, + * and .phar.tar.bz2. For zip-based phar archives, the + * default extension is .phar.zip. + * + * @return Phar|null The method returns a Phar object on success and throws an + * exception on failure. + */ + #[TentativeType] + public function convertToExecutable( + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null + ): ?Phar {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Convert a phar archive to a non-executable tar or zip file + * @link https://php.net/manual/en/phar.converttodata.php + * @param int $format [optional] + * This should be one of Phar::TAR + * or Phar::ZIP. If set to NULL, the existing file format + * will be preserved. + * + * @param int $compression [optional]+ * This should be one of Phar::NONE for no whole-archive + * compression, Phar::GZ for zlib-based compression, and + * Phar::BZ2 for bzip-based compression. + * + * @param string $extension [optional]+ * This parameter is used to override the default file extension for a + * converted archive. Note that .phar cannot be used + * anywhere in the filename for a non-executable tar or zip archive. + * + *+ * If converting to a tar-based phar archive, the + * default extensions are .tar, .tar.gz, + * and .tar.bz2 depending on specified compression. + * For zip-based archives, the + * default extension is .zip. + * + * @return PharData|null The method returns a PharData object on success and throws an + * exception on failure. + */ + #[TentativeType] + public function convertToData( + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null + ): ?PharData {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Copy a file internal to the phar archive to another new file within the phar + * @link https://php.net/manual/en/phar.copy.php + * @param string $to + * @param string $from + * @return bool returns TRUE on success, but it is safer to encase method call in a + * try/catch block and assume success if no exception is thrown. + */ + public function copy( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $to, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $from + ) {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns the number of entries (files) in the Phar archive + * @link https://php.net/manual/en/phar.count.php + * @param int $mode [optional] + * @return int<0,max> The number of files contained within this phar, or 0 (the number zero) + * if none. + */ + #[TentativeType] + public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0) + * Delete a file within a phar archive + * @link https://php.net/manual/en/phar.delete.php + * @param string $localName + * Path within an archive to the file to delete. + * + * @return bool returns TRUE on success, but it is better to check for thrown exception, + * and assume success if none is thrown. + */ + public function delete(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName) {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.2.0)+ * Deletes the global metadata of the phar + * @link https://php.net/manual/en/phar.delmetadata.php + * @return bool returns TRUE on success, but it is better to check for thrown exception, + * and assume success if none is thrown. + */ + public function delMetadata() {} + + /** + * (Unknown) + * Extract the contents of a phar archive to a directory + * @link https://php.net/manual/en/phar.extractto.php + * @param string $directory + * Path within an archive to the file to delete. + * + * @param string|array|null $files [optional]+ * The name of a file or directory to extract, or an array of files/directories to extract + * + * @param bool $overwrite [optional]+ * Set to TRUE to enable overwriting existing files + * + * @return bool returns TRUE on success, but it is better to check for thrown exception, + * and assume success if none is thrown. + */ + #[TentativeType] + public function extractTo( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, + #[LanguageLevelTypeAware(['8.0' => 'array|string|null'], default: '')] $files = null, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $overwrite = false + ): bool {} + + /** + * @return string|null + * @see setAlias + */ + #[TentativeType] + public function getAlias(): ?string {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Returns phar archive meta-data + * @link https://php.net/manual/en/phar.getmetadata.php + * @param array $unserializeOptions [optional] if is set to anything other than the default, + * the resulting metadata won't be cached and this won't return the value from the cache + * @return mixed any PHP variable that can be serialized and is stored as meta-data for the Phar archive, + * or NULL if no meta-data is stored. + */ + #[TentativeType] + public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []): mixed {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Return whether phar was modified + * @link https://php.net/manual/en/phar.getmodified.php + * @return bool TRUE if the phar has been modified since opened, FALSE if not. + */ + #[TentativeType] + public function getModified(): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Return MD5/SHA1/SHA256/SHA512/OpenSSL signature of a Phar archive + * @link https://php.net/manual/en/phar.getsignature.php + * @return array Array with the opened archive's signature in hash key and MD5, + * SHA-1, + * SHA-256, SHA-512, or OpenSSL + * in hash_type. This signature is a hash calculated on the + * entire phar's contents, and may be used to verify the integrity of the archive. + * A valid signature is absolutely required of all executable phar archives if the + * phar.require_hash INI variable + * is set to true. + */ + #[ArrayShape(["hash" => "string", "hash_type" => "string"])] + #[TentativeType] + public function getSignature(): array|false {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Return the PHP loader or bootstrap stub of a Phar archive + * @link https://php.net/manual/en/phar.getstub.php + * @return string a string containing the contents of the bootstrap loader (stub) of + * the current Phar archive. + */ + #[TentativeType] + public function getStub(): string {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Return version info of Phar archive + * @link https://php.net/manual/en/phar.getversion.php + * @return string The opened archive's API version. This is not to be confused with + * the API version that the loaded phar extension will use to create + * new phars. Each Phar archive has the API version hard-coded into + * its manifest. See Phar file format + * documentation for more information. + */ + #[TentativeType] + public function getVersion(): string {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.2.0) + * Returns whether phar has global meta-data + * @link https://php.net/manual/en/phar.hasmetadata.php + * @return bool TRUE if meta-data has been set, and FALSE if not. + */ + #[TentativeType] + public function hasMetadata(): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Used to determine whether Phar write operations are being buffered, or are flushing directly to disk + * @link https://php.net/manual/en/phar.isbuffering.php + * @return bool TRUE if the write operations are being buffer, FALSE otherwise. + */ + #[TentativeType] + public function isBuffering(): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0) + * Returns Phar::GZ or PHAR::BZ2 if the entire phar archive is compressed (.tar.gz/tar.bz and so on) + * @link https://php.net/manual/en/phar.iscompressed.php + * @return mixed Phar::GZ, Phar::BZ2 or FALSE + */ + #[TentativeType] + public function isCompressed(): int|false {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0) + * Returns true if the phar archive is based on the tar/phar/zip file format depending on the parameter + * @link https://php.net/manual/en/phar.isfileformat.php + * @param int $format + * Either Phar::PHAR, Phar::TAR, or + * Phar::ZIP to test for the format of the archive. + * + * @return bool TRUE if the phar archive matches the file format requested by the parameter + */ + #[TentativeType] + public function isFileFormat(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format): bool {} + + /** + * (Unknown)+ * Returns true if the phar archive can be modified + * @link https://php.net/manual/en/phar.iswritable.php + * @return bool TRUE if the phar archive can be modified + */ + #[TentativeType] + public function isWritable(): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * determines whether a file exists in the phar + * @link https://php.net/manual/en/phar.offsetexists.php + * @param string $localName + * The filename (relative path) to look for in a Phar. + * + * @return bool TRUE if the file exists within the phar, or FALSE if not. + */ + #[TentativeType] + public function offsetExists($localName): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Gets a PharFileInfo object for a specific file + * @link https://php.net/manual/en/phar.offsetget.php + * @param string $localName + * The filename (relative path) to look for in a Phar. + * + * @return PharFileInfo A PharFileInfo object is returned that can be used to + * iterate over a file's contents or to retrieve information about the current file. + */ + #[TentativeType] + public function offsetGet($localName): SplFileInfo {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * set the contents of an internal file to those of an external file + * @link https://php.net/manual/en/phar.offsetset.php + * @param string $localName + * The filename (relative path) to modify in a Phar. + * + * @param string $value+ * Content of the file. + * + * @return void No return values. + */ + #[TentativeType] + public function offsetSet($localName, $value): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * remove a file from a phar + * @link https://php.net/manual/en/phar.offsetunset.php + * @param string $localName + * The filename (relative path) to modify in a Phar. + * + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function offsetUnset($localName): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.2.1)+ * Set the alias for the Phar archive + * @link https://php.net/manual/en/phar.setalias.php + * @param string $alias + * A shorthand string that this archive can be referred to in phar + * stream wrapper access. + * + * @return bool + */ + #[TentativeType] + public function setAlias(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $alias): bool {} + + /** + * (Unknown)+ * Used to set the PHP loader or bootstrap stub of a Phar archive to the default loader + * @link https://php.net/manual/en/phar.setdefaultstub.php + * @param string $index [optional] + * Relative path within the phar archive to run if accessed on the command-line + * + * @param string $webIndex [optional]+ * Relative path within the phar archive to run if accessed through a web browser + * + * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function setDefaultStub( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $index = null, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $webIndex = null + ): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Sets phar archive meta-data + * @link https://php.net/manual/en/phar.setmetadata.php + * @param mixed $metadata + * Any PHP variable containing information to store that describes the phar archive + * + * @return void No value is returned. + */ + #[TentativeType] + public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.1.0)+ * set the signature algorithm for a phar and apply it. + * @link https://php.net/manual/en/phar.setsignaturealgorithm.php + * @param int $algo + * One of Phar::MD5, + * Phar::SHA1, Phar::SHA256, + * Phar::SHA512, or Phar::OPENSSL + * + * @param string $privateKey [optional]
+ * The contents of an OpenSSL private key, as extracted from a certificate or
+ * OpenSSL key file:
+ * + * Used to set the PHP loader or bootstrap stub of a Phar archive + * @link https://php.net/manual/en/phar.setstub.php + * @param string $stub + * A string or an open stream handle to use as the executable stub for this + * phar archive. + * + * @param int $length [optional]+ * + * @return bool TRUE on success or FALSE on failure. + */ + public function setStub( + $stub, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = -1 + ) {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Start buffering Phar write operations, do not modify the Phar object on disk + * @link https://php.net/manual/en/phar.startbuffering.php + * @return void No value is returned. + */ + #[TentativeType] + public function startBuffering(): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Stop buffering write requests to the Phar archive, and save changes to disk + * @link https://php.net/manual/en/phar.stopbuffering.php + * @return void No value is returned. + */ + #[TentativeType] + public function stopBuffering(): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns the api version + * @link https://php.net/manual/en/phar.apiversion.php + * @return string The API version string as in "1.0.0". + */ + final public static function apiVersion(): string {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns whether phar extension supports compression using either zlib or bzip2 + * @link https://php.net/manual/en/phar.cancompress.php + * @param int $compression [optional] + * Either Phar::GZ or Phar::BZ2 can be + * used to test whether compression is possible with a specific compression + * algorithm (zlib or bzip2). + * + * @return bool TRUE if compression/decompression is available, FALSE if not. + */ + final public static function canCompress(int $compression = 0): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Returns whether phar extension supports writing and creating phars + * @link https://php.net/manual/en/phar.canwrite.php + * @return bool TRUE if write access is enabled, FALSE if it is disabled. + */ + final public static function canWrite(): bool {} + + /** + * (Unknown) + * Create a phar-file format specific stub + * @link https://php.net/manual/en/phar.createdefaultstub.php + * @param string|null $index [optional] + * @param string|null $webIndex [optional] + * @return string a string containing the contents of a customized bootstrap loader (stub) + * that allows the created Phar archive to work with or without the Phar extension + * enabled. + */ + final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.2.0) + * Return array of supported compression algorithms + * @link https://php.net/manual/en/phar.getsupportedcompression.php + * @return string[] an array containing any of "GZ" or + * "BZ2", depending on the availability of + * the zlib extension or the + * bz2 extension. + */ + final public static function getSupportedCompression(): array {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.1.0) + * Return array of supported signature types + * @link https://php.net/manual/en/phar.getsupportedsignatures.php + * @return string[] an array containing any of "MD5", "SHA-1", + * "SHA-256", "SHA-512", or "OpenSSL". + */ + final public static function getSupportedSignatures(): array {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0) + * instructs phar to intercept fopen, file_get_contents, opendir, and all of the stat-related functions + * @link https://php.net/manual/en/phar.interceptfilefuncs.php + * @return void + */ + final public static function interceptFileFuncs(): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.2.0) + * Returns whether the given filename is a valid phar filename + * @link https://php.net/manual/en/phar.isvalidpharfilename.php + * @param string $filename + * The name or full path to a phar archive not yet created + * + * @param bool $executable [optional]+ * This parameter determines whether the filename should be treated as + * a phar executable archive, or a data non-executable archive + * + * @return bool TRUE if the filename is valid, FALSE if not. + */ + final public static function isValidPharFilename(string $filename, bool $executable = true): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Loads any phar archive with an alias + * @link https://php.net/manual/en/phar.loadphar.php + * @param string $filename + * the full or relative path to the phar archive to open + * + * @param string|null $alias [optional]+ * The alias that may be used to refer to the phar archive. Note + * that many phar archives specify an explicit alias inside the + * phar archive, and a PharException will be thrown if + * a new alias is specified in this case. + * + * @return bool TRUE on success or FALSE on failure. + */ + final public static function loadPhar(string $filename, ?string $alias = null): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Reads the currently executed file (a phar) and registers its manifest + * @link https://php.net/manual/en/phar.mapphar.php + * @param string|null $alias [optional] + * The alias that can be used in phar:// URLs to + * refer to this archive, rather than its full path. + * + * @param int $offset [optional]+ * Unused variable, here for compatibility with PEAR's PHP_Archive. + * + * @return bool TRUE on success or FALSE on failure. + */ + final public static function mapPhar(?string $alias = null, int $offset = 0): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Returns the full path on disk or full phar URL to the currently executing Phar archive + * @link https://php.net/manual/en/phar.running.php + * @param bool $returnPhar + * If FALSE, the full path on disk to the phar + * archive is returned. If TRUE, a full phar URL is returned. + * + * @return string the filename if valid, empty string otherwise. + */ + final public static function running( + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $returnPhar, + #[PhpStormStubsElementAvailable(from: '7.0')] bool $returnPhar = true + ): string {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Mount an external path or file to a virtual location within the phar archive + * @link https://php.net/manual/en/phar.mount.php + * @param string $pharPath + * The internal path within the phar archive to use as the mounted path location. + * This must be a relative path within the phar archive, and must not already exist. + * + * @param string $externalPath+ * A path or URL to an external file or directory to mount within the phar archive + * + * @return void No return. PharException is thrown on failure. + */ + final public static function mount(string $pharPath, string $externalPath): void {} + + /** + * (Unknown)+ * Defines a list of up to 4 $_SERVER variables that should be modified for execution + * @link https://php.net/manual/en/phar.mungserver.php + * @param array $variables + * an array containing as string indices any of + * REQUEST_URI, PHP_SELF, + * SCRIPT_NAME and SCRIPT_FILENAME. + * Other values trigger an exception, and Phar::mungServer + * is case-sensitive. + * + * @return void No return. + */ + final public static function mungServer(array $variables): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Completely remove a phar archive from disk and from memory + * @link https://php.net/manual/en/phar.unlinkarchive.php + * @param string $filename + * The path on disk to the phar archive. + * + * @throws PharException + * @return bool TRUE on success or FALSE on failure. + */ + final public static function unlinkArchive(string $filename): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * mapPhar for web-based phars. front controller for web applications + * @link https://php.net/manual/en/phar.webphar.php + * @param null|string $alias [optional] + * The alias that can be used in phar:// URLs to + * refer to this archive, rather than its full path. + * + * @param string|null $index [optional]+ * The location within the phar of the directory index. + * + * @param null|string $fileNotFoundScript [optional]+ * The location of the script to run when a file is not found. This + * script should output the proper HTTP 404 headers. + * + * @param null|array $mimeTypes [optional]
+ * An array mapping additional file extensions to MIME type.
+ * If the default mapping is sufficient, pass an empty array.
+ * By default, these extensions are mapped to these MIME types:
+ * + * The rewrites function is passed a string as its only parameter and must return a string or FALSE. + * + *+ * If you are using fast-cgi or cgi then the parameter passed to the function is the value of the + * $_SERVER['PATH_INFO'] variable. Otherwise, the parameter passed to the function is the value + * of the $_SERVER['REQUEST_URI'] variable. + * + *+ * If a string is returned it is used as the internal file path. If FALSE is returned then webPhar() will + * send a HTTP 403 Denied Code. + * + * @return void No value is returned. + */ + final public static function webPhar( + ?string $alias = null, + ?string $index = "index.php", + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $fileNotFoundScript = null, + array $mimeTypes = null, + ?callable $rewrite = null + ): void {} + + /** + * Returns whether current entry is a directory and not '.' or '..' + * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php + * @param bool $allow_links [optional]+ * + * @return bool whether the current entry is a directory, but not '.' or '..' + */ + public function hasChildren($allow_links = false) {} + + /** + * Returns an iterator for the current entry if it is a directory + * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php + * @return mixed The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator + * constants. + */ + public function getChildren() {} + + /** + * Rewinds back to the beginning + * @link https://php.net/manual/en/filesystemiterator.rewind.php + * @return void No value is returned. + */ + public function rewind() {} + + /** + * Move to the next file + * @link https://php.net/manual/en/filesystemiterator.next.php + * @return void No value is returned. + */ + public function next() {} + + /** + * Retrieve the key for the current file + * @link https://php.net/manual/en/filesystemiterator.key.php + * @return string the pathname or filename depending on the set flags. + * See the FilesystemIterator constants. + */ + public function key() {} + + /** + * The current file + * @link https://php.net/manual/en/filesystemiterator.current.php + * @return mixed The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator constants. + */ + public function current() {} + + /** + * Check whether current DirectoryIterator position is a valid file + * @link https://php.net/manual/en/directoryiterator.valid.php + * @return bool TRUE if the position is valid, otherwise FALSE + */ + public function valid() {} + + /** + * Seek to a DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.seek.php + * @param int $position+ * The zero-based numeric position to seek to. + * + * @return void No value is returned. + */ + public function seek($position) {} + + public function _bad_state_ex() {} } /** @@ -887,138 +978,141 @@ public function _bad_state_ex (){} * phar.readonly php.ini setting is 1. * @link https://php.net/manual/en/class.phardata.php */ -class PharData extends Phar { - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Construct a non-executable tar or zip archive object - * @link https://php.net/manual/en/phardata.construct.php - * @param string $fname - * Path to an existing tar/zip archive or to-be-created archive - * - * @param int $flags [optional]- * Flags to pass to Phar parent class - * RecursiveDirectoryIterator. - * - * @param string $alias [optional]- * Alias with which this Phar archive should be referred to in calls to stream - * functionality. - * - * @param int $format [optional]- * One of the - * file format constants - * available within the Phar class. - * - */ - public function __construct ($fname, $flags = null, $alias = null, $format = Phar::TAR) {} - - public function offsetExists ($entry) {} - - public function offsetGet ($entry) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * set the contents of a file within the tar/zip to those of an external file or string - * @link https://php.net/manual/en/phardata.offsetset.php - * @param string $offset - * The filename (relative path) to modify in a tar or zip archive. - * - * @param string $value- * Content of the file. - * - * @return void No return values. - */ - public function offsetSet ($offset, $value) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * remove a file from a tar/zip archive - * @link https://php.net/manual/en/phardata.offsetunset.php - * @param string $offset - * The filename (relative path) to modify in the tar/zip archive. - * - * @return bool TRUE on success or FALSE on failure. - */ - public function offsetUnset ($offset) {} - - - /** - * Returns whether current entry is a directory and not '.' or '..' - * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php - * @param bool $allow_links [optional]- * - * @return bool whether the current entry is a directory, but not '.' or '..' - * @since 5.0 - */ - public function hasChildren ($allow_links = false) {} - - /** - * Returns an iterator for the current entry if it is a directory - * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php - * @return mixed The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator - * constants. - * @since 5.1 - */ - public function getChildren () {} - - - /** - * Rewinds back to the beginning - * @link https://php.net/manual/en/filesystemiterator.rewind.php - * @return void No value is returned. - * @since 5.3 - */ - public function rewind () {} - - /** - * Move to the next file - * @link https://php.net/manual/en/filesystemiterator.next.php - * @return void No value is returned. - * @since 5.3 - */ - public function next () {} - - /** - * Retrieve the key for the current file - * @link https://php.net/manual/en/filesystemiterator.key.php - * @return string the pathname or filename depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function key () {} - - /** - * The current file - * @link https://php.net/manual/en/filesystemiterator.current.php - * @return mixed The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function current () {} - - - - /** - * Check whether current DirectoryIterator position is a valid file - * @link https://php.net/manual/en/directoryiterator.valid.php - * @return bool TRUE if the position is valid, otherwise FALSE - * @since 5.0 - */ - public function valid () {} - - /** - * Seek to a DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.seek.php - * @param int $position- * The zero-based numeric position to seek to. - * - * @return void No value is returned. - * @since 5.3 - */ - public function seek ($position) {} - - +class PharData extends Phar +{ + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Construct a non-executable tar or zip archive object + * @link https://php.net/manual/en/phardata.construct.php + * @param string $filename + * Path to an existing tar/zip archive or to-be-created archive + * + * @param int $flags [optional]+ * Flags to pass to Phar parent class + * RecursiveDirectoryIterator. + * + * @param string $alias [optional]+ * Alias with which this Phar archive should be referred to in calls to stream + * functionality. + * + * @param int $format [optional]+ * One of the + * file format constants + * available within the Phar class. + * + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format = Phar::TAR + ) {} + + /** + * @param string $localName + * @return bool + */ + #[TentativeType] + public function offsetExists($localName): bool {} + + /** + * @param string $localName + * @return SplFileInfo + */ + #[TentativeType] + public function offsetGet($localName): SplFileInfo {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * set the contents of a file within the tar/zip to those of an external file or string + * @link https://php.net/manual/en/phardata.offsetset.php + * @param string $localName + * The filename (relative path) to modify in a tar or zip archive. + * + * @param string $value+ * Content of the file. + * + * @return void No return values. + */ + #[TentativeType] + public function offsetSet($localName, $value): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * remove a file from a tar/zip archive + * @link https://php.net/manual/en/phardata.offsetunset.php + * @param string $localName + * The filename (relative path) to modify in the tar/zip archive. + * + * @return void + */ + #[TentativeType] + public function offsetUnset($localName): void {} + + /** + * Returns whether current entry is a directory and not '.' or '..' + * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php + * @param bool $allow_links [optional]+ * + * @return bool whether the current entry is a directory, but not '.' or '..' + */ + public function hasChildren($allow_links = false) {} + + /** + * Returns an iterator for the current entry if it is a directory + * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php + * @return mixed The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator + * constants. + */ + public function getChildren() {} + + /** + * Rewinds back to the beginning + * @link https://php.net/manual/en/filesystemiterator.rewind.php + * @return void No value is returned. + */ + public function rewind() {} + + /** + * Move to the next file + * @link https://php.net/manual/en/filesystemiterator.next.php + * @return void No value is returned. + */ + public function next() {} + + /** + * Retrieve the key for the current file + * @link https://php.net/manual/en/filesystemiterator.key.php + * @return string the pathname or filename depending on the set flags. + * See the FilesystemIterator constants. + */ + public function key() {} + + /** + * The current file + * @link https://php.net/manual/en/filesystemiterator.current.php + * @return mixed The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator constants. + */ + public function current() {} + + /** + * Check whether current DirectoryIterator position is a valid file + * @link https://php.net/manual/en/directoryiterator.valid.php + * @return bool TRUE if the position is valid, otherwise FALSE + */ + public function valid() {} + + /** + * Seek to a DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.seek.php + * @param int $position+ * The zero-based numeric position to seek to. + * + * @return void No value is returned. + */ + public function seek($position) {} } /** @@ -1026,137 +1120,147 @@ public function seek ($position) {} * and attributes of a single file within a phar archive. * @link https://php.net/manual/en/class.pharfileinfo.php */ -class PharFileInfo extends SplFileInfo { - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Construct a Phar entry object - * @link https://php.net/manual/en/pharfileinfo.construct.php - * @param string $entry - * The full url to retrieve a file. If you wish to retrieve the information - * for the file my/file.php from the phar boo.phar, - * the entry should be phar://boo.phar/my/file.php. - * - */ - public function __construct ($entry) {} - - public function __destruct () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Sets file-specific permission bits - * @link https://php.net/manual/en/pharfileinfo.chmod.php - * @param int $permissions - * permissions (see chmod) - * - * @return void No value is returned. - */ - public function chmod ($permissions) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0)- * Compresses the current Phar entry with either zlib or bzip2 compression - * @link https://php.net/manual/en/pharfileinfo.compress.php - * @param int $compression - * @return bool TRUE on success or FALSE on failure. - */ - public function compress ($compression) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 2.0.0) - * Decompresses the current Phar entry within the phar - * @link https://php.net/manual/en/pharfileinfo.decompress.php - * @return bool TRUE on success or FALSE on failure. - */ - public function decompress () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.2.0) - * Deletes the metadata of the entry - * @link https://php.net/manual/en/pharfileinfo.delmetadata.php - * @return bool TRUE if successful, FALSE if the entry had no metadata. - * As with all functionality that modifies the contents of - * a phar, the phar.readonly INI variable - * must be off in order to succeed if the file is within a Phar - * archive. Files within PharData archives do not have - * this restriction. - */ - public function delMetadata () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns the actual size of the file (with compression) inside the Phar archive - * @link https://php.net/manual/en/pharfileinfo.getcompressedsize.php - * @return int The size in bytes of the file within the Phar archive on disk. - */ - public function getCompressedSize () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns CRC32 code or throws an exception if CRC has not been verified - * @link https://php.net/manual/en/pharfileinfo.getcrc32.php - * @return int The crc32 checksum of the file within the Phar archive. - */ - public function getCRC32 () {} - - public function getContent () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns file-specific meta-data saved with a file - * @link https://php.net/manual/en/pharfileinfo.getmetadata.php - * @return mixed any PHP variable that can be serialized and is stored as meta-data for the file, - * or NULL if no meta-data is stored. - */ - public function getMetadata () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns the Phar file entry flags - * @link https://php.net/manual/en/pharfileinfo.getpharflags.php - * @return int The Phar flags (always 0 in the current implementation) - */ - public function getPharFlags () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.2.0) - * Returns the metadata of the entry - * @link https://php.net/manual/en/pharfileinfo.hasmetadata.php - * @return bool FALSE if no metadata is set or is NULL, TRUE if metadata is not NULL - */ - public function hasMetadata () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Returns whether the entry is compressed - * @link https://php.net/manual/en/pharfileinfo.iscompressed.php - * @param int $compression_type [optional] - * One of Phar::GZ or Phar::BZ2, - * defaults to any compression. - * - * @return bool TRUE if the file is compressed within the Phar archive, FALSE if not. - */ - public function isCompressed ($compression_type = 9021976) {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0)- * Returns whether file entry has had its CRC verified - * @link https://php.net/manual/en/pharfileinfo.iscrcchecked.php - * @return bool TRUE if the file has had its CRC verified, FALSE if not. - */ - public function isCRCChecked () {} - - /** - * (PHP >= 5.3.0, PECL phar >= 1.0.0) - * Sets file-specific meta-data saved with a file - * @link https://php.net/manual/en/pharfileinfo.setmetadata.php - * @param mixed $metadata - * Any PHP variable containing information to store alongside a file - * - * @return void No value is returned. - */ - public function setMetadata ($metadata) {} - +class PharFileInfo extends SplFileInfo +{ + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Construct a Phar entry object + * @link https://php.net/manual/en/pharfileinfo.construct.php + * @param string $filename + * The full url to retrieve a file. If you wish to retrieve the information + * for the file my/file.php from the phar boo.phar, + * the entry should be phar://boo.phar/my/file.php. + * + */ + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {} + + public function __destruct() {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Sets file-specific permission bits + * @link https://php.net/manual/en/pharfileinfo.chmod.php + * @param int $perms + * permissions (see chmod) + * + * @return void No value is returned. + */ + #[TentativeType] + public function chmod(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $perms): void {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * Compresses the current Phar entry with either zlib or bzip2 compression + * @link https://php.net/manual/en/pharfileinfo.compress.php + * @param int $compression + * @return bool TRUE on success or FALSE on failure. + */ + public function compress(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $compression) {} + + /** + * (PHP >= 5.3.0, PECL phar >= 2.0.0) + * Decompresses the current Phar entry within the phar + * @link https://php.net/manual/en/pharfileinfo.decompress.php + * @return bool TRUE on success or FALSE on failure. + */ + public function decompress() {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.2.0) + * Deletes the metadata of the entry + * @link https://php.net/manual/en/pharfileinfo.delmetadata.php + * @return bool TRUE if successful, FALSE if the entry had no metadata. + * As with all functionality that modifies the contents of + * a phar, the phar.readonly INI variable + * must be off in order to succeed if the file is within a Phar + * archive. Files within PharData archives do not have + * this restriction. + */ + public function delMetadata() {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns the actual size of the file (with compression) inside the Phar archive + * @link https://php.net/manual/en/pharfileinfo.getcompressedsize.php + * @return int<0, max> The size in bytes of the file within the Phar archive on disk. + */ + #[TentativeType] + public function getCompressedSize(): int {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns CRC32 code or throws an exception if CRC has not been verified + * @link https://php.net/manual/en/pharfileinfo.getcrc32.php + * @return int The crc32 checksum of the file within the Phar archive. + */ + #[TentativeType] + public function getCRC32(): int {} + + #[TentativeType] + public function getContent(): string {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns file-specific meta-data saved with a file + * @link https://php.net/manual/en/pharfileinfo.getmetadata.php + * @param array $unserializeOptions [optional] if is set to anything other than the default, + * the resulting metadata won't be cached and this won't return the value from the cache + * @return mixed any PHP variable that can be serialized and is stored as meta-data for the file, + * or NULL if no meta-data is stored. + */ + #[TentativeType] + public function getMetadata(#[PhpStormStubsElementAvailable(from: '8.0')] array $unserializeOptions = []): mixed {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns the Phar file entry flags + * @link https://php.net/manual/en/pharfileinfo.getpharflags.php + * @return int The Phar flags (always 0 in the current implementation) + */ + #[TentativeType] + public function getPharFlags(): int {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.2.0) + * Returns the metadata of the entry + * @link https://php.net/manual/en/pharfileinfo.hasmetadata.php + * @return bool FALSE if no metadata is set or is NULL, TRUE if metadata is not NULL + */ + #[TentativeType] + public function hasMetadata(): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Returns whether the entry is compressed + * @link https://php.net/manual/en/pharfileinfo.iscompressed.php + * @param int $compression [optional] + * One of Phar::GZ or Phar::BZ2, + * defaults to any compression. + * + * @return bool TRUE if the file is compressed within the Phar archive, FALSE if not. + */ + #[TentativeType] + public function isCompressed(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0)+ * Returns whether file entry has had its CRC verified + * @link https://php.net/manual/en/pharfileinfo.iscrcchecked.php + * @return bool TRUE if the file has had its CRC verified, FALSE if not. + */ + #[TentativeType] + public function isCRCChecked(): bool {} + + /** + * (PHP >= 5.3.0, PECL phar >= 1.0.0) + * Sets file-specific meta-data saved with a file + * @link https://php.net/manual/en/pharfileinfo.setmetadata.php + * @param mixed $metadata + * Any PHP variable containing information to store alongside a file + * + * @return void No value is returned. + */ + #[TentativeType] + public function setMetadata(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $metadata): void {} } // End of Phar v.2.0.1 -?> diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index a5dcedb19..b61fa2b53 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -25,9 +25,12 @@ final class PhpStormStubsMap 'AMQPQueue' => 'amqp/amqp.php', 'AMQPQueueException' => 'amqp/amqp.php', 'AMQPTimestamp' => 'amqp/amqp.php', - 'AMQPValueException' => 'amqp/amqp.php', 'APCIterator' => 'apcu/apcu.php', 'APCUIterator' => 'apcu/apcu.php', + 'AddressInfo' => 'sockets/sockets.php', + 'Aerospike' => 'aerospike/aerospike.php', + 'Aerospike\\Bytes' => 'aerospike/Bytes.php', + 'AllowDynamicProperties' => 'Core/Core_c.php', 'AppendIterator' => 'SPL/SPL.php', 'ArgumentCountError' => 'Core/Core_c.php', 'ArithmeticError' => 'Core/Core_c.php', @@ -35,10 +38,14 @@ final class PhpStormStubsMap 'ArrayIterator' => 'SPL/SPL.php', 'ArrayObject' => 'SPL/SPL.php', 'AssertionError' => 'standard/standard_9.php', + 'Attribute' => 'Core/Core_c.php', + 'BackedEnum' => 'Core/Core_c.php', 'BadFunctionCallException' => 'SPL/SPL.php', 'BadMethodCallException' => 'SPL/SPL.php', + 'BlackfireProbe' => 'blackfire/blackfire.php', 'COM' => 'com_dotnet/com_dotnet.php', 'CURLFile' => 'curl/curl.php', + 'CURLStringFile' => 'curl/CURLStringFile.php', 'CachingIterator' => 'SPL/SPL.php', 'CallbackFilterIterator' => 'SPL/SPL.php', 'Cassandra' => 'cassandra/cassandra.php', @@ -146,58 +153,214 @@ final class PhpStormStubsMap 'Collator' => 'intl/intl.php', 'Collectable' => 'pthreads/pthreads.php', 'CompileError' => 'Core/Core_c.php', - 'Cond' => 'pthreads/pthreads.php', - 'Couchbase\\AnalyticsQuery' => 'couchbase/couchbase.php', - 'Couchbase\\Authenticator' => 'couchbase/couchbase.php', + 'Couchbase\\AnalyticsEncryptionLevel' => 'couchbase/couchbase.php', + 'Couchbase\\AnalyticsException' => 'couchbase/couchbase.php', + 'Couchbase\\AnalyticsIndexManager' => 'couchbase/couchbase.php', + 'Couchbase\\AnalyticsLink' => 'couchbase/couchbase.php', + 'Couchbase\\AnalyticsLinkType' => 'couchbase/couchbase.php', + 'Couchbase\\AnalyticsOptions' => 'couchbase/couchbase.php', + 'Couchbase\\AnalyticsResult' => 'couchbase/couchbase.php', + 'Couchbase\\AppendOptions' => 'couchbase/couchbase.php', + 'Couchbase\\AuthenticationException' => 'couchbase/couchbase.php', + 'Couchbase\\AzureBlobExternalAnalyticsLink' => 'couchbase/couchbase.php', + 'Couchbase\\BadInputException' => 'couchbase/couchbase.php', + 'Couchbase\\BaseException' => 'couchbase/couchbase.php', + 'Couchbase\\BinaryCollection' => 'couchbase/couchbase.php', + 'Couchbase\\BindingsException' => 'couchbase/couchbase.php', 'Couchbase\\BooleanFieldSearchQuery' => 'couchbase/couchbase.php', 'Couchbase\\BooleanSearchQuery' => 'couchbase/couchbase.php', 'Couchbase\\Bucket' => 'couchbase/couchbase.php', 'Couchbase\\BucketManager' => 'couchbase/couchbase.php', - 'Couchbase\\ClassicAuthenticator' => 'couchbase/couchbase.php', + 'Couchbase\\BucketMissingException' => 'couchbase/couchbase.php', + 'Couchbase\\BucketSettings' => 'couchbase/couchbase.php', + 'Couchbase\\CasMismatchException' => 'couchbase/couchbase.php', 'Couchbase\\Cluster' => 'couchbase/couchbase.php', - 'Couchbase\\ClusterManager' => 'couchbase/couchbase.php', + 'Couchbase\\ClusterOptions' => 'couchbase/couchbase.php', + 'Couchbase\\Collection' => 'couchbase/couchbase.php', + 'Couchbase\\CollectionManager' => 'couchbase/couchbase.php', + 'Couchbase\\CollectionMissingException' => 'couchbase/couchbase.php', + 'Couchbase\\CollectionSpec' => 'couchbase/couchbase.php', 'Couchbase\\ConjunctionSearchQuery' => 'couchbase/couchbase.php', + 'Couchbase\\ConnectAnalyticsLinkOptions' => 'couchbase/couchbase.php', + 'Couchbase\\Coordinate' => 'couchbase/couchbase.php', + 'Couchbase\\CouchbaseRemoteAnalyticsLink' => 'couchbase/couchbase.php', + 'Couchbase\\CounterResult' => 'couchbase/couchbase.php', + 'Couchbase\\CreateAnalyticsDatasetOptions' => 'couchbase/couchbase.php', + 'Couchbase\\CreateAnalyticsDataverseOptions' => 'couchbase/couchbase.php', + 'Couchbase\\CreateAnalyticsIndexOptions' => 'couchbase/couchbase.php', + 'Couchbase\\CreateAnalyticsLinkOptions' => 'couchbase/couchbase.php', + 'Couchbase\\CreateQueryIndexOptions' => 'couchbase/couchbase.php', + 'Couchbase\\CreateQueryPrimaryIndexOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DateRangeFacetResult' => 'couchbase/couchbase.php', 'Couchbase\\DateRangeSearchFacet' => 'couchbase/couchbase.php', 'Couchbase\\DateRangeSearchQuery' => 'couchbase/couchbase.php', + 'Couchbase\\DecrementOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DesignDocument' => 'couchbase/couchbase.php', + 'Couchbase\\DisconnectAnalyticsLinkOptions' => 'couchbase/couchbase.php', 'Couchbase\\DisjunctionSearchQuery' => 'couchbase/couchbase.php', + 'Couchbase\\DmlFailureException' => 'couchbase/couchbase.php', 'Couchbase\\DocIdSearchQuery' => 'couchbase/couchbase.php', - 'Couchbase\\Document' => 'couchbase/couchbase.php', - 'Couchbase\\DocumentFragment' => 'couchbase/couchbase.php', - 'Couchbase\\Exception' => 'couchbase/couchbase.php', + 'Couchbase\\DocumentNotFoundException' => 'couchbase/couchbase.php', + 'Couchbase\\DropAnalyticsDatasetOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DropAnalyticsDataverseOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DropAnalyticsIndexOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DropAnalyticsLinkOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DropQueryIndexOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DropQueryPrimaryIndexOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DropUserOptions' => 'couchbase/couchbase.php', + 'Couchbase\\DurabilityException' => 'couchbase/couchbase.php', + 'Couchbase\\DurabilityLevel' => 'couchbase/couchbase.php', + 'Couchbase\\EncryptionSettings' => 'couchbase/couchbase.php', + 'Couchbase\\EvictionPolicy' => 'couchbase/couchbase.php', + 'Couchbase\\ExistsOptions' => 'couchbase/couchbase.php', + 'Couchbase\\ExistsResult' => 'couchbase/couchbase.php', 'Couchbase\\GeoBoundingBoxSearchQuery' => 'couchbase/couchbase.php', 'Couchbase\\GeoDistanceSearchQuery' => 'couchbase/couchbase.php', - 'Couchbase\\LookupInBuilder' => 'couchbase/couchbase.php', + 'Couchbase\\GeoPolygonQuery' => 'couchbase/couchbase.php', + 'Couchbase\\GetAllReplicasOptions' => 'couchbase/couchbase.php', + 'Couchbase\\GetAllUsersOptions' => 'couchbase/couchbase.php', + 'Couchbase\\GetAnalyticsLinksOptions' => 'couchbase/couchbase.php', + 'Couchbase\\GetAndLockOptions' => 'couchbase/couchbase.php', + 'Couchbase\\GetAndTouchOptions' => 'couchbase/couchbase.php', + 'Couchbase\\GetAnyReplicaOptions' => 'couchbase/couchbase.php', + 'Couchbase\\GetOptions' => 'couchbase/couchbase.php', + 'Couchbase\\GetReplicaResult' => 'couchbase/couchbase.php', + 'Couchbase\\GetResult' => 'couchbase/couchbase.php', + 'Couchbase\\GetUserOptions' => 'couchbase/couchbase.php', + 'Couchbase\\Group' => 'couchbase/couchbase.php', + 'Couchbase\\HttpException' => 'couchbase/couchbase.php', + 'Couchbase\\IncrementOptions' => 'couchbase/couchbase.php', + 'Couchbase\\IndexFailureException' => 'couchbase/couchbase.php', + 'Couchbase\\IndexNotFoundException' => 'couchbase/couchbase.php', + 'Couchbase\\InsertOptions' => 'couchbase/couchbase.php', + 'Couchbase\\InvalidConfigurationException' => 'couchbase/couchbase.php', + 'Couchbase\\InvalidRangeException' => 'couchbase/couchbase.php', + 'Couchbase\\InvalidStateException' => 'couchbase/couchbase.php', + 'Couchbase\\KeyDeletedException' => 'couchbase/couchbase.php', + 'Couchbase\\KeyExistsException' => 'couchbase/couchbase.php', + 'Couchbase\\KeyLockedException' => 'couchbase/couchbase.php', + 'Couchbase\\KeyValueException' => 'couchbase/couchbase.php', + 'Couchbase\\KeyspaceNotFoundException' => 'couchbase/couchbase.php', + 'Couchbase\\LoggingMeter' => 'couchbase/couchbase.php', + 'Couchbase\\LookupCountSpec' => 'couchbase/couchbase.php', + 'Couchbase\\LookupExistsSpec' => 'couchbase/couchbase.php', + 'Couchbase\\LookupGetFullSpec' => 'couchbase/couchbase.php', + 'Couchbase\\LookupGetSpec' => 'couchbase/couchbase.php', + 'Couchbase\\LookupInOptions' => 'couchbase/couchbase.php', + 'Couchbase\\LookupInResult' => 'couchbase/couchbase.php', + 'Couchbase\\LookupInSpec' => 'couchbase/couchbase.php', 'Couchbase\\MatchAllSearchQuery' => 'couchbase/couchbase.php', 'Couchbase\\MatchNoneSearchQuery' => 'couchbase/couchbase.php', 'Couchbase\\MatchPhraseSearchQuery' => 'couchbase/couchbase.php', 'Couchbase\\MatchSearchQuery' => 'couchbase/couchbase.php', - 'Couchbase\\MutateInBuilder' => 'couchbase/couchbase.php', + 'Couchbase\\Meter' => 'couchbase/couchbase.php', + 'Couchbase\\MutateArrayAddUniqueSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateArrayAppendSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateArrayInsertSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateArrayPrependSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateCounterSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateInOptions' => 'couchbase/couchbase.php', + 'Couchbase\\MutateInResult' => 'couchbase/couchbase.php', + 'Couchbase\\MutateInSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateInsertSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateRemoveSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateReplaceSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutateUpsertSpec' => 'couchbase/couchbase.php', + 'Couchbase\\MutationResult' => 'couchbase/couchbase.php', 'Couchbase\\MutationState' => 'couchbase/couchbase.php', 'Couchbase\\MutationToken' => 'couchbase/couchbase.php', - 'Couchbase\\N1qlIndex' => 'couchbase/couchbase.php', - 'Couchbase\\N1qlQuery' => 'couchbase/couchbase.php', + 'Couchbase\\NetworkException' => 'couchbase/couchbase.php', + 'Couchbase\\NoopMeter' => 'couchbase/couchbase.php', + 'Couchbase\\NoopTracer' => 'couchbase/couchbase.php', + 'Couchbase\\NumericRangeFacetResult' => 'couchbase/couchbase.php', 'Couchbase\\NumericRangeSearchFacet' => 'couchbase/couchbase.php', 'Couchbase\\NumericRangeSearchQuery' => 'couchbase/couchbase.php', - 'Couchbase\\PasswordAuthenticator' => 'couchbase/couchbase.php', + 'Couchbase\\Origin' => 'couchbase/couchbase.php', + 'Couchbase\\ParsingFailureException' => 'couchbase/couchbase.php', + 'Couchbase\\PartialViewException' => 'couchbase/couchbase.php', + 'Couchbase\\PathExistsException' => 'couchbase/couchbase.php', + 'Couchbase\\PathNotFoundException' => 'couchbase/couchbase.php', 'Couchbase\\PhraseSearchQuery' => 'couchbase/couchbase.php', + 'Couchbase\\PlanningFailureException' => 'couchbase/couchbase.php', 'Couchbase\\PrefixSearchQuery' => 'couchbase/couchbase.php', + 'Couchbase\\PreparedStatementException' => 'couchbase/couchbase.php', + 'Couchbase\\PrependOptions' => 'couchbase/couchbase.php', + 'Couchbase\\QueryErrorException' => 'couchbase/couchbase.php', + 'Couchbase\\QueryException' => 'couchbase/couchbase.php', + 'Couchbase\\QueryIndex' => 'couchbase/couchbase.php', + 'Couchbase\\QueryIndexManager' => 'couchbase/couchbase.php', + 'Couchbase\\QueryMetaData' => 'couchbase/couchbase.php', + 'Couchbase\\QueryOptions' => 'couchbase/couchbase.php', + 'Couchbase\\QueryProfile' => 'couchbase/couchbase.php', + 'Couchbase\\QueryResult' => 'couchbase/couchbase.php', + 'Couchbase\\QueryScanConsistency' => 'couchbase/couchbase.php', + 'Couchbase\\QueryServiceException' => 'couchbase/couchbase.php', 'Couchbase\\QueryStringSearchQuery' => 'couchbase/couchbase.php', + 'Couchbase\\QuotaLimitedException' => 'couchbase/couchbase.php', + 'Couchbase\\RateLimitedException' => 'couchbase/couchbase.php', 'Couchbase\\RegexpSearchQuery' => 'couchbase/couchbase.php', + 'Couchbase\\RemoveOptions' => 'couchbase/couchbase.php', + 'Couchbase\\ReplaceAnalyticsLinkOptions' => 'couchbase/couchbase.php', + 'Couchbase\\ReplaceOptions' => 'couchbase/couchbase.php', + 'Couchbase\\RequestCanceledException' => 'couchbase/couchbase.php', + 'Couchbase\\RequestSpan' => 'couchbase/couchbase.php', + 'Couchbase\\RequestTracer' => 'couchbase/couchbase.php', + 'Couchbase\\Result' => 'couchbase/couchbase.php', + 'Couchbase\\Role' => 'couchbase/couchbase.php', + 'Couchbase\\RoleAndDescription' => 'couchbase/couchbase.php', + 'Couchbase\\RoleAndOrigin' => 'couchbase/couchbase.php', + 'Couchbase\\S3ExternalAnalyticsLink' => 'couchbase/couchbase.php', + 'Couchbase\\Scope' => 'couchbase/couchbase.php', + 'Couchbase\\ScopeMissingException' => 'couchbase/couchbase.php', + 'Couchbase\\ScopeSpec' => 'couchbase/couchbase.php', + 'Couchbase\\SearchException' => 'couchbase/couchbase.php', 'Couchbase\\SearchFacet' => 'couchbase/couchbase.php', + 'Couchbase\\SearchFacetResult' => 'couchbase/couchbase.php', + 'Couchbase\\SearchHighlightMode' => 'couchbase/couchbase.php', + 'Couchbase\\SearchIndex' => 'couchbase/couchbase.php', + 'Couchbase\\SearchIndexManager' => 'couchbase/couchbase.php', + 'Couchbase\\SearchMetaData' => 'couchbase/couchbase.php', + 'Couchbase\\SearchOptions' => 'couchbase/couchbase.php', 'Couchbase\\SearchQuery' => 'couchbase/couchbase.php', - 'Couchbase\\SearchQueryPart' => 'couchbase/couchbase.php', + 'Couchbase\\SearchResult' => 'couchbase/couchbase.php', 'Couchbase\\SearchSort' => 'couchbase/couchbase.php', 'Couchbase\\SearchSortField' => 'couchbase/couchbase.php', 'Couchbase\\SearchSortGeoDistance' => 'couchbase/couchbase.php', 'Couchbase\\SearchSortId' => 'couchbase/couchbase.php', + 'Couchbase\\SearchSortMissing' => 'couchbase/couchbase.php', + 'Couchbase\\SearchSortMode' => 'couchbase/couchbase.php', 'Couchbase\\SearchSortScore' => 'couchbase/couchbase.php', - 'Couchbase\\SpatialViewQuery' => 'couchbase/couchbase.php', + 'Couchbase\\SearchSortType' => 'couchbase/couchbase.php', + 'Couchbase\\ServiceMissingException' => 'couchbase/couchbase.php', + 'Couchbase\\StorageBackend' => 'couchbase/couchbase.php', + 'Couchbase\\StoreSemantics' => 'couchbase/couchbase.php', + 'Couchbase\\SubdocumentException' => 'couchbase/couchbase.php', + 'Couchbase\\TempFailException' => 'couchbase/couchbase.php', + 'Couchbase\\TermFacetResult' => 'couchbase/couchbase.php', 'Couchbase\\TermRangeSearchQuery' => 'couchbase/couchbase.php', 'Couchbase\\TermSearchFacet' => 'couchbase/couchbase.php', 'Couchbase\\TermSearchQuery' => 'couchbase/couchbase.php', - 'Couchbase\\UserSettings' => 'couchbase/couchbase.php', - 'Couchbase\\ViewQuery' => 'couchbase/couchbase.php', - 'Couchbase\\ViewQueryEncodable' => 'couchbase/couchbase.php', + 'Couchbase\\ThresholdLoggingTracer' => 'couchbase/couchbase.php', + 'Couchbase\\TimeoutException' => 'couchbase/couchbase.php', + 'Couchbase\\TouchOptions' => 'couchbase/couchbase.php', + 'Couchbase\\UnlockOptions' => 'couchbase/couchbase.php', + 'Couchbase\\UpsertOptions' => 'couchbase/couchbase.php', + 'Couchbase\\UpsertUserOptions' => 'couchbase/couchbase.php', + 'Couchbase\\User' => 'couchbase/couchbase.php', + 'Couchbase\\UserAndMetadata' => 'couchbase/couchbase.php', + 'Couchbase\\UserManager' => 'couchbase/couchbase.php', + 'Couchbase\\ValueRecorder' => 'couchbase/couchbase.php', + 'Couchbase\\ValueTooBigException' => 'couchbase/couchbase.php', + 'Couchbase\\View' => 'couchbase/couchbase.php', + 'Couchbase\\ViewConsistency' => 'couchbase/couchbase.php', + 'Couchbase\\ViewException' => 'couchbase/couchbase.php', + 'Couchbase\\ViewIndexManager' => 'couchbase/couchbase.php', + 'Couchbase\\ViewMetaData' => 'couchbase/couchbase.php', + 'Couchbase\\ViewOptions' => 'couchbase/couchbase.php', + 'Couchbase\\ViewOrdering' => 'couchbase/couchbase.php', + 'Couchbase\\ViewResult' => 'couchbase/couchbase.php', + 'Couchbase\\ViewRow' => 'couchbase/couchbase.php', + 'Couchbase\\WatchQueryIndexesOptions' => 'couchbase/couchbase.php', 'Couchbase\\WildcardSearchQuery' => 'couchbase/couchbase.php', 'Countable' => 'Core/Core_c.php', 'Crypto\\Base64' => 'crypto/crypto.php', @@ -216,9 +379,13 @@ final class PhpStormStubsMap 'Crypto\\PBKDF2Exception' => 'crypto/crypto.php', 'Crypto\\Rand' => 'crypto/crypto.php', 'Crypto\\RandException' => 'crypto/crypto.php', + 'CurlHandle' => 'curl/curl.php', + 'CurlMultiHandle' => 'curl/curl.php', + 'CurlShareHandle' => 'curl/curl.php', 'DOMAttr' => 'dom/dom_c.php', 'DOMCdataSection' => 'dom/dom_c.php', 'DOMCharacterData' => 'dom/dom_c.php', + 'DOMChildNode' => 'dom/dom_c.php', 'DOMComment' => 'dom/dom_c.php', 'DOMConfiguration' => 'dom/dom_c.php', 'DOMDocument' => 'dom/dom_c.php', @@ -240,6 +407,7 @@ final class PhpStormStubsMap 'DOMNode' => 'dom/dom_c.php', 'DOMNodeList' => 'dom/dom_c.php', 'DOMNotation' => 'dom/dom_c.php', + 'DOMParentNode' => 'dom/dom_c.php', 'DOMProcessingInstruction' => 'dom/dom_c.php', 'DOMStringExtend' => 'dom/dom_c.php', 'DOMStringList' => 'dom/dom_c.php', @@ -254,11 +422,41 @@ final class PhpStormStubsMap 'DateTimeImmutable' => 'date/date_c.php', 'DateTimeInterface' => 'date/date_c.php', 'DateTimeZone' => 'date/date_c.php', + 'Decimal\\Decimal' => 'decimal/decimal.php', + 'DeflateContext' => 'zlib/zlib.php', 'Directory' => 'standard/standard_0.php', 'DirectoryIterator' => 'SPL/SPL_c1.php', 'DivisionByZeroError' => 'Core/Core_c.php', 'DomainException' => 'SPL/SPL.php', + 'Ds\\Collection' => 'ds/ds.php', + 'Ds\\Deque' => 'ds/ds.php', + 'Ds\\Hashable' => 'ds/ds.php', + 'Ds\\Map' => 'ds/ds.php', + 'Ds\\Pair' => 'ds/ds.php', + 'Ds\\PriorityQueue' => 'ds/ds.php', + 'Ds\\Queue' => 'ds/ds.php', + 'Ds\\Sequence' => 'ds/ds.php', + 'Ds\\Set' => 'ds/ds.php', + 'Ds\\Stack' => 'ds/ds.php', + 'Ds\\Vector' => 'ds/ds.php', + 'Elastic\\Apm\\CustomErrorData' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\DistributedTracingData' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\ElasticApm' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\ExecutionSegmentContextInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\ExecutionSegmentInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\SpanContextDbInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\SpanContextDestinationInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\SpanContextHttpInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\SpanContextInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\SpanInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\TransactionBuilderInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\TransactionContextInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\TransactionContextRequestInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\TransactionContextRequestUrlInterface' => 'elastic_apm/elastic_apm.php', + 'Elastic\\Apm\\TransactionInterface' => 'elastic_apm/elastic_apm.php', 'EmptyIterator' => 'SPL/SPL.php', + 'EnchantBroker' => 'enchant/enchant.php', + 'EnchantDictionary' => 'enchant/enchant.php', 'Error' => 'Core/Core_c.php', 'ErrorException' => 'Core/Core_c.php', 'Ev' => 'Ev/Ev.php', @@ -294,6 +492,9 @@ final class PhpStormStubsMap 'FFI\\CType' => 'FFI/FFI.php', 'FFI\\Exception' => 'FFI/FFI.php', 'FFI\\ParserException' => 'FFI/FFI.php', + 'FTP\\Connection' => 'ftp/Connection.php', + 'Fiber' => 'Core/Core_c.php', + 'FiberError' => 'Core/Core_c.php', 'FilesystemIterator' => 'SPL/SPL_c1.php', 'FilterIterator' => 'SPL/SPL.php', 'GEOSGeometry' => 'geos/geos.php', @@ -302,6 +503,8 @@ final class PhpStormStubsMap 'GEOSWKTReader' => 'geos/geos.php', 'GEOSWKTWriter' => 'geos/geos.php', 'GMP' => 'gmp/gmp.php', + 'GdFont' => 'gd/GdFont.php', + 'GdImage' => 'gd/gd.php', 'GearmanClient' => 'gearman/gearman.php', 'GearmanException' => 'gearman/gearman.php', 'GearmanJob' => 'gearman/gearman.php', @@ -345,24 +548,30 @@ final class PhpStormStubsMap 'HttpSocketException' => 'http/http.php', 'HttpUrlException' => 'http/http.php', 'HttpUtil' => 'http/http.php', + 'IMAP\\Connection' => 'imap/Connection.php', 'Imagick' => 'imagick/imagick.php', 'ImagickDraw' => 'imagick/imagick.php', 'ImagickDrawException' => 'imagick/imagick.php', 'ImagickException' => 'imagick/imagick.php', 'ImagickKernel' => 'imagick/imagick.php', + 'ImagickKernelException' => 'imagick/imagick.php', 'ImagickPixel' => 'imagick/imagick.php', 'ImagickPixelException' => 'imagick/imagick.php', 'ImagickPixelIterator' => 'imagick/imagick.php', 'ImagickPixelIteratorException' => 'imagick/imagick.php', 'InfiniteIterator' => 'SPL/SPL.php', + 'InflateContext' => 'zlib/zlib.php', + 'InternalIterator' => 'Core/Core_c.php', 'IntlBreakIterator' => 'intl/intl.php', 'IntlCalendar' => 'intl/intl.php', 'IntlChar' => 'intl/IntlChar.php', 'IntlCodePointBreakIterator' => 'intl/intl.php', 'IntlDateFormatter' => 'intl/intl.php', + 'IntlDatePatternGenerator' => 'intl/IntlDatePatternGenerator.php', 'IntlException' => 'intl/intl.php', 'IntlGregorianCalendar' => 'intl/intl.php', 'IntlIterator' => 'intl/intl.php', + 'IntlPartsIterator' => 'intl/intl.php', 'IntlRuleBasedBreakIterator' => 'intl/intl.php', 'IntlTimeZone' => 'intl/intl.php', 'InvalidArgumentException' => 'SPL/SPL.php', @@ -374,6 +583,9 @@ final class PhpStormStubsMap 'JsonIncrementalParser' => 'json/json.php', 'JsonSerializable' => 'json/json.php', 'Judy' => 'judy/judy.php', + 'LDAP\\Connection' => 'ldap/Connection.php', + 'LDAP\\Result' => 'ldap/Result.php', + 'LDAP\\ResultEntry' => 'ldap/ResultEntry.php', 'LengthException' => 'SPL/SPL.php', 'LevelDB' => 'leveldb/LevelDB.php', 'LevelDBException' => 'leveldb/LevelDB.php', @@ -385,6 +597,15 @@ final class PhpStormStubsMap 'Locale' => 'intl/intl.php', 'LogicException' => 'SPL/SPL.php', 'Lua' => 'lua/lua.php', + 'LuaSandbox' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxError' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxErrorError' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxFatalError' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxFunction' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxMemoryError' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxRuntimeError' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxSyntaxError' => 'LuaSandbox/LuaSandbox.php', + 'LuaSandboxTimeoutError' => 'LuaSandbox/LuaSandbox.php', 'Memcache' => 'memcache/memcache.php', 'MemcachePool' => 'memcache/memcache.php', 'Memcached' => 'memcached/memcached.php', @@ -405,67 +626,85 @@ final class PhpStormStubsMap 'MongoCursorTimeoutException' => 'mongo/mongo.php', 'MongoDB' => 'mongo/mongo.php', 'MongoDBRef' => 'mongo/mongo.php', - 'MongoDB\\BSON\\Binary' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\BinaryInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\DbPointer' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Decimal128' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Decimal128Interface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Int64' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Javascript' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\JavascriptInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\MaxKey' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\MaxKeyInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\MinKey' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\MinKeyInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\ObjectId' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\ObjectIdInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Persistable' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Regex' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\RegexInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Serializable' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Symbol' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Timestamp' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\TimestampInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Type' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\UTCDateTime' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\UTCDateTimeInterface' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Undefined' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\Unserializable' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\BulkWrite' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Command' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Cursor' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\CursorId' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\CursorInterface' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\AuthenticationException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\BulkWriteException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\CommandException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\ConnectionException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\ConnectionTimeoutException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\Exception' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\ExecutionTimeoutException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\InvalidArgumentException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\LogicException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\RuntimeException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\SSLConnectionException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\ServerException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\UnexpectedValueException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\WriteConcernException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Exception\\WriteException' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Manager' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Monitoring\\CommandFailedEvent' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Monitoring\\CommandSubscriber' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Monitoring\\CommandSucceededEvent' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Monitoring\\Subscriber' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Query' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\ReadConcern' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\ReadPreference' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Server' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Session' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\WriteConcern' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\WriteConcernError' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\WriteError' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\WriteResult' => 'mongodb/mongodb.php', + 'MongoDB\\BSON\\Binary' => 'mongodb/BSON/Binary.php', + 'MongoDB\\BSON\\BinaryInterface' => 'mongodb/BSON/BinaryInterface.php', + 'MongoDB\\BSON\\DBPointer' => 'mongodb/BSON/DBPointer.php', + 'MongoDB\\BSON\\Decimal128' => 'mongodb/BSON/Decimal128.php', + 'MongoDB\\BSON\\Decimal128Interface' => 'mongodb/BSON/Decimal128Interface.php', + 'MongoDB\\BSON\\Document' => 'mongodb/BSON/Document.php', + 'MongoDB\\BSON\\Int64' => 'mongodb/BSON/Int64.php', + 'MongoDB\\BSON\\Iterator' => 'mongodb/BSON/Iterator.php', + 'MongoDB\\BSON\\Javascript' => 'mongodb/BSON/Javascript.php', + 'MongoDB\\BSON\\JavascriptInterface' => 'mongodb/BSON/JavascriptInterface.php', + 'MongoDB\\BSON\\MaxKey' => 'mongodb/BSON/MaxKey.php', + 'MongoDB\\BSON\\MaxKeyInterface' => 'mongodb/BSON/MaxKeyInterface.php', + 'MongoDB\\BSON\\MinKey' => 'mongodb/BSON/MinKey.php', + 'MongoDB\\BSON\\MinKeyInterface' => 'mongodb/BSON/MinKeyInterface.php', + 'MongoDB\\BSON\\ObjectId' => 'mongodb/BSON/ObjectId.php', + 'MongoDB\\BSON\\ObjectIdInterface' => 'mongodb/BSON/ObjectIdInterface.php', + 'MongoDB\\BSON\\PackedArray' => 'mongodb/BSON/PackedArray.php', + 'MongoDB\\BSON\\Persistable' => 'mongodb/BSON/Persistable.php', + 'MongoDB\\BSON\\Regex' => 'mongodb/BSON/Regex.php', + 'MongoDB\\BSON\\RegexInterface' => 'mongodb/BSON/RegexInterface.php', + 'MongoDB\\BSON\\Serializable' => 'mongodb/BSON/Serializable.php', + 'MongoDB\\BSON\\Symbol' => 'mongodb/BSON/Symbol.php', + 'MongoDB\\BSON\\Timestamp' => 'mongodb/BSON/Timestamp.php', + 'MongoDB\\BSON\\TimestampInterface' => 'mongodb/BSON/TimestampInterface.php', + 'MongoDB\\BSON\\Type' => 'mongodb/BSON/Type.php', + 'MongoDB\\BSON\\UTCDateTime' => 'mongodb/BSON/UTCDateTime.php', + 'MongoDB\\BSON\\UTCDateTimeInterface' => 'mongodb/BSON/UTCDateTimeInterface.php', + 'MongoDB\\BSON\\Undefined' => 'mongodb/BSON/Undefined.php', + 'MongoDB\\BSON\\Unserializable' => 'mongodb/BSON/Unserializable.php', + 'MongoDB\\Driver\\BulkWrite' => 'mongodb/BulkWrite.php', + 'MongoDB\\Driver\\ClientEncryption' => 'mongodb/ClientEncryption.php', + 'MongoDB\\Driver\\Command' => 'mongodb/Command.php', + 'MongoDB\\Driver\\Cursor' => 'mongodb/Cursor.php', + 'MongoDB\\Driver\\CursorId' => 'mongodb/CursorId.php', + 'MongoDB\\Driver\\CursorInterface' => 'mongodb/CursorInterface.php', + 'MongoDB\\Driver\\Exception\\AuthenticationException' => 'mongodb/Exception/AuthenticationException.php', + 'MongoDB\\Driver\\Exception\\BulkWriteException' => 'mongodb/Exception/BulkWriteException.php', + 'MongoDB\\Driver\\Exception\\CommandException' => 'mongodb/Exception/CommandException.php', + 'MongoDB\\Driver\\Exception\\ConnectionException' => 'mongodb/Exception/ConnectionException.php', + 'MongoDB\\Driver\\Exception\\ConnectionTimeoutException' => 'mongodb/Exception/ConnectionTimeoutException.php', + 'MongoDB\\Driver\\Exception\\EncryptionException' => 'mongodb/Exception/EncryptionException.php', + 'MongoDB\\Driver\\Exception\\Exception' => 'mongodb/Exception/Exception.php', + 'MongoDB\\Driver\\Exception\\ExecutionTimeoutException' => 'mongodb/Exception/ExecutionTimeoutException.php', + 'MongoDB\\Driver\\Exception\\InvalidArgumentException' => 'mongodb/Exception/InvalidArgumentException.php', + 'MongoDB\\Driver\\Exception\\LogicException' => 'mongodb/Exception/LogicException.php', + 'MongoDB\\Driver\\Exception\\RuntimeException' => 'mongodb/Exception/RuntimeException.php', + 'MongoDB\\Driver\\Exception\\SSLConnectionException' => 'mongodb/Exception/SSLConnectionException.php', + 'MongoDB\\Driver\\Exception\\ServerException' => 'mongodb/Exception/ServerException.php', + 'MongoDB\\Driver\\Exception\\UnexpectedValueException' => 'mongodb/Exception/UnexpectedValueException.php', + 'MongoDB\\Driver\\Exception\\WriteConcernException' => 'mongodb/Exception/WriteConcernException.php', + 'MongoDB\\Driver\\Exception\\WriteException' => 'mongodb/Exception/WriteException.php', + 'MongoDB\\Driver\\Manager' => 'mongodb/Manager.php', + 'MongoDB\\Driver\\Monitoring\\CommandFailedEvent' => 'mongodb/Monitoring/CommandFailedEvent.php', + 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent' => 'mongodb/Monitoring/CommandStartedEvent.php', + 'MongoDB\\Driver\\Monitoring\\CommandSubscriber' => 'mongodb/Monitoring/CommandSubscriber.php', + 'MongoDB\\Driver\\Monitoring\\CommandSucceededEvent' => 'mongodb/Monitoring/CommandSucceededEvent.php', + 'MongoDB\\Driver\\Monitoring\\SDAMSubscriber' => 'mongodb/Monitoring/SDAMSubscriber.php', + 'MongoDB\\Driver\\Monitoring\\ServerChangedEvent' => 'mongodb/Monitoring/ServerChangedEvent.php', + 'MongoDB\\Driver\\Monitoring\\ServerClosedEvent' => 'mongodb/Monitoring/ServerClosedEvent.php', + 'MongoDB\\Driver\\Monitoring\\ServerHeartbeatFailedEvent' => 'mongodb/Monitoring/ServerHeartbeatFailedEvent.php', + 'MongoDB\\Driver\\Monitoring\\ServerHeartbeatStartedEvent' => 'mongodb/Monitoring/ServerHeartbeatStartedEvent.php', + 'MongoDB\\Driver\\Monitoring\\ServerHeartbeatSucceededEvent' => 'mongodb/Monitoring/ServerHeartbeatSucceededEvent.php', + 'MongoDB\\Driver\\Monitoring\\ServerOpeningEvent' => 'mongodb/Monitoring/ServerOpeningEvent.php', + 'MongoDB\\Driver\\Monitoring\\Subscriber' => 'mongodb/Monitoring/Subscriber.php', + 'MongoDB\\Driver\\Monitoring\\TopologyChangedEvent' => 'mongodb/Monitoring/TopologyChangedEvent.php', + 'MongoDB\\Driver\\Monitoring\\TopologyClosedEvent' => 'mongodb/Monitoring/TopologyClosedEvent.php', + 'MongoDB\\Driver\\Monitoring\\TopologyOpeningEvent' => 'mongodb/Monitoring/TopologyOpeningEvent.php', + 'MongoDB\\Driver\\Query' => 'mongodb/Query.php', + 'MongoDB\\Driver\\ReadConcern' => 'mongodb/ReadConcern.php', + 'MongoDB\\Driver\\ReadPreference' => 'mongodb/ReadPreference.php', + 'MongoDB\\Driver\\Server' => 'mongodb/Server.php', + 'MongoDB\\Driver\\ServerApi' => 'mongodb/ServerApi.php', + 'MongoDB\\Driver\\ServerDescription' => 'mongodb/ServerDescription.php', + 'MongoDB\\Driver\\Session' => 'mongodb/Session.php', + 'MongoDB\\Driver\\TopologyDescription' => 'mongodb/TopologyDescription.php', + 'MongoDB\\Driver\\WriteConcern' => 'mongodb/WriteConcern.php', + 'MongoDB\\Driver\\WriteConcernError' => 'mongodb/WriteConcernError.php', + 'MongoDB\\Driver\\WriteError' => 'mongodb/WriteError.php', + 'MongoDB\\Driver\\WriteResult' => 'mongodb/WriteResult.php', 'MongoDate' => 'mongo/mongo.php', 'MongoDuplicateKeyException' => 'mongo/mongo.php', 'MongoException' => 'mongo/mongo.php', @@ -488,16 +727,23 @@ final class PhpStormStubsMap 'MongoUpdateBatch' => 'mongo/mongo.php', 'MongoWriteBatch' => 'mongo/mongo.php', 'MongoWriteConcernException' => 'mongo/mongo.php', + 'Mosquitto\\Client' => 'mosquitto-php/mosquitto-php.php', + 'Mosquitto\\Exception' => 'mosquitto-php/mosquitto-php.php', + 'Mosquitto\\Message' => 'mosquitto-php/mosquitto-php.php', 'MultipleIterator' => 'SPL/SPL_c1.php', - 'Mutex' => 'pthreads/pthreads.php', 'NoRewindIterator' => 'SPL/SPL.php', 'Normalizer' => 'intl/intl.php', 'NumberFormatter' => 'intl/intl.php', 'OAuth' => 'oauth/oauth.php', 'OAuthException' => 'oauth/oauth.php', 'OAuthProvider' => 'oauth/oauth.php', + 'OCICollection' => 'oci8/oci8v3.php', + 'OCILob' => 'oci8/oci8v3.php', 'OCI_Collection' => 'oci8/oci8.php', 'OCI_Lob' => 'oci8/oci8.php', + 'OpenSSLAsymmetricKey' => 'openssl/openssl.php', + 'OpenSSLCertificate' => 'openssl/openssl.php', + 'OpenSSLCertificateSigningRequest' => 'openssl/openssl.php', 'OutOfBoundsException' => 'SPL/SPL.php', 'OutOfRangeException' => 'SPL/SPL.php', 'OuterIterator' => 'SPL/SPL.php', @@ -508,6 +754,8 @@ final class PhpStormStubsMap 'PDOException' => 'PDO/PDO.php', 'PDORow' => 'PDO/PDO.php', 'PDOStatement' => 'PDO/PDO.php', + 'PSpell\\Config' => 'pspell/pspell_c.php', + 'PSpell\\Dictionary' => 'pspell/pspell_c.php', 'ParentIterator' => 'SPL/SPL.php', 'Parle\\ErrorInfo' => 'Parle/ErrorInfo.php', 'Parle\\Lexer' => 'Parle/Lexer.php', @@ -519,19 +767,52 @@ final class PhpStormStubsMap 'Parle\\Stack' => 'Parle/Stack.php', 'Parle\\Token' => 'Parle/Token.php', 'ParseError' => 'Core/Core_c.php', + 'PgSql\\Connection' => 'pgsql/pgsql_c.php', + 'PgSql\\Lob' => 'pgsql/pgsql_c.php', + 'PgSql\\Result' => 'pgsql/pgsql_c.php', 'Phar' => 'Phar/Phar.php', 'PharData' => 'Phar/Phar.php', 'PharException' => 'Phar/Phar.php', 'PharFileInfo' => 'Phar/Phar.php', + 'PhpToken' => 'tokenizer/PhpToken.php', 'Pool' => 'pthreads/pthreads.php', 'RRDCreator' => 'rrd/rrd.php', 'RRDGraph' => 'rrd/rrd.php', 'RRDUpdater' => 'rrd/rrd.php', + 'Random\\BrokenRandomEngineError' => 'random/random.php', + 'Random\\CryptoSafeEngine' => 'random/random.php', + 'Random\\Engine' => 'random/random.php', + 'Random\\Engine\\Mt19937' => 'random/random.php', + 'Random\\Engine\\PcgOneseq128XslRr64' => 'random/random.php', + 'Random\\Engine\\Secure' => 'random/random.php', + 'Random\\Engine\\Xoshiro256StarStar' => 'random/random.php', + 'Random\\RandomError' => 'random/random.php', + 'Random\\RandomException' => 'random/random.php', + 'Random\\Randomizer' => 'random/random.php', 'RangeException' => 'SPL/SPL.php', 'RarArchive' => 'rar/rar.php', 'RarEntry' => 'rar/rar.php', 'RarException' => 'rar/rar.php', 'RdKafka' => 'rdkafka/RdKafka.php', + 'RdKafka\\Conf' => 'rdkafka/RdKafka/Conf.php', + 'RdKafka\\Consumer' => 'rdkafka/RdKafka/Consumer.php', + 'RdKafka\\ConsumerTopic' => 'rdkafka/RdKafka/ConsumerTopic.php', + 'RdKafka\\Exception' => 'rdkafka/RdKafka/Exception.php', + 'RdKafka\\KafkaConsumer' => 'rdkafka/RdKafka/KafkaConsumer.php', + 'RdKafka\\KafkaConsumerTopic' => 'rdkafka/RdKafka/KafkaConsumerTopic.php', + 'RdKafka\\KafkaErrorException' => 'rdkafka/RdKafka/KafkaErrorException.php', + 'RdKafka\\Message' => 'rdkafka/RdKafka/Message.php', + 'RdKafka\\Metadata' => 'rdkafka/RdKafka/Metadata.php', + 'RdKafka\\Metadata\\Broker' => 'rdkafka/RdKafka/Metadata/Broker.php', + 'RdKafka\\Metadata\\Collection' => 'rdkafka/RdKafka/Metadata/Collection.php', + 'RdKafka\\Metadata\\Partition' => 'rdkafka/RdKafka/Metadata/Partition.php', + 'RdKafka\\Metadata\\Topic' => 'rdkafka/RdKafka/Metadata/Topic.php', + 'RdKafka\\Producer' => 'rdkafka/RdKafka/Producer.php', + 'RdKafka\\ProducerTopic' => 'rdkafka/RdKafka/ProducerTopic.php', + 'RdKafka\\Queue' => 'rdkafka/RdKafka/Queue.php', + 'RdKafka\\Topic' => 'rdkafka/RdKafka/Topic.php', + 'RdKafka\\TopicConf' => 'rdkafka/RdKafka/TopicConf.php', + 'RdKafka\\TopicPartition' => 'rdkafka/RdKafka/TopicPartition.php', 'RecursiveArrayIterator' => 'SPL/SPL.php', 'RecursiveCachingIterator' => 'SPL/SPL.php', 'RecursiveCallbackFilterIterator' => 'SPL/SPL.php', @@ -542,29 +823,44 @@ final class PhpStormStubsMap 'RecursiveRegexIterator' => 'SPL/SPL.php', 'RecursiveTreeIterator' => 'SPL/SPL.php', 'Redis' => 'redis/Redis.php', - 'RedisArray' => 'redis/Redis.php', + 'RedisArray' => 'redis/RedisArray.php', 'RedisCluster' => 'redis/RedisCluster.php', 'RedisClusterException' => 'redis/RedisCluster.php', 'RedisException' => 'redis/Redis.php', + 'RedisSentinel' => 'redis/RedisSentinel.php', 'Reflection' => 'Reflection/Reflection.php', - 'ReflectionClass' => 'Reflection/Reflection.php', - 'ReflectionClassConstant' => 'Reflection/Reflection.php', - 'ReflectionException' => 'Reflection/Reflection.php', - 'ReflectionExtension' => 'Reflection/Reflection.php', - 'ReflectionFunction' => 'Reflection/Reflection.php', - 'ReflectionFunctionAbstract' => 'Reflection/Reflection.php', - 'ReflectionGenerator' => 'Reflection/Reflection.php', - 'ReflectionMethod' => 'Reflection/Reflection.php', - 'ReflectionNamedType' => 'Reflection/Reflection.php', - 'ReflectionObject' => 'Reflection/Reflection.php', - 'ReflectionParameter' => 'Reflection/Reflection.php', - 'ReflectionProperty' => 'Reflection/Reflection.php', - 'ReflectionReference' => 'Reflection/Reflection.php', - 'ReflectionType' => 'Reflection/Reflection.php', - 'ReflectionZendExtension' => 'Reflection/Reflection.php', - 'Reflector' => 'Reflection/Reflection.php', + 'ReflectionAttribute' => 'Reflection/ReflectionAttribute.php', + 'ReflectionClass' => 'Reflection/ReflectionClass.php', + 'ReflectionClassConstant' => 'Reflection/ReflectionClassConstant.php', + 'ReflectionEnum' => 'Reflection/ReflectionEnum.php', + 'ReflectionEnumBackedCase' => 'Reflection/ReflectionEnumBackedCase.php', + 'ReflectionEnumPureCase' => 'Reflection/ReflectionEnumPureCase.php', + 'ReflectionEnumUnitCase' => 'Reflection/ReflectionEnumUnitCase.php', + 'ReflectionException' => 'Reflection/ReflectionException.php', + 'ReflectionExtension' => 'Reflection/ReflectionExtension.php', + 'ReflectionFiber' => 'Reflection/ReflectionFiber.php', + 'ReflectionFunction' => 'Reflection/ReflectionFunction.php', + 'ReflectionFunctionAbstract' => 'Reflection/ReflectionFunctionAbstract.php', + 'ReflectionGenerator' => 'Reflection/ReflectionGenerator.php', + 'ReflectionIntersectionType' => 'Reflection/ReflectionIntersectionType.php', + 'ReflectionMethod' => 'Reflection/ReflectionMethod.php', + 'ReflectionNamedType' => 'Reflection/ReflectionNamedType.php', + 'ReflectionObject' => 'Reflection/ReflectionObject.php', + 'ReflectionParameter' => 'Reflection/ReflectionParameter.php', + 'ReflectionProperty' => 'Reflection/ReflectionProperty.php', + 'ReflectionReference' => 'Reflection/ReflectionReference.php', + 'ReflectionType' => 'Reflection/ReflectionType.php', + 'ReflectionUnionType' => 'Reflection/ReflectionUnionType.php', + 'ReflectionZendExtension' => 'Reflection/ReflectionZendExtension.php', + 'Reflector' => 'Reflection/Reflector.php', 'RegexIterator' => 'SPL/SPL.php', + 'Relay\\Event' => 'relay/Event.php', + 'Relay\\Exception' => 'relay/Exception.php', + 'Relay\\KeyType' => 'relay/KeyType.php', + 'Relay\\Relay' => 'relay/Relay.php', + 'Relay\\Sentinel' => 'relay/Sentinel.php', 'ResourceBundle' => 'intl/intl.php', + 'ReturnTypeWillChange' => 'Core/Core_c.php', 'RuntimeException' => 'SPL/SPL.php', 'SNMP' => 'snmp/snmp.php', 'SNMPException' => 'snmp/snmp.php', @@ -575,6 +871,8 @@ final class PhpStormStubsMap 'SQLiteException' => 'SQLite/SQLite.php', 'SQLiteResult' => 'SQLite/SQLite.php', 'SQLiteUnbuffered' => 'SQLite/SQLite.php', + 'SVM' => 'svm/SVM.php', + 'SVMModel' => 'svm/SVMModel.php', 'SWFAction' => 'ming/ming.php', 'SWFBitmap' => 'ming/ming.php', 'SWFButton' => 'ming/ming.php', @@ -600,13 +898,33 @@ final class PhpStormStubsMap 'Saxon\\XdmItem' => 'SaxonC/SaxonC.php', 'Saxon\\XdmNode' => 'SaxonC/SaxonC.php', 'Saxon\\XdmValue' => 'SaxonC/SaxonC.php', + 'Saxon\\Xslt30Processor' => 'SaxonC/SaxonC.php', 'Saxon\\XsltProcessor' => 'SaxonC/SaxonC.php', 'SeekableIterator' => 'SPL/SPL.php', + 'SensitiveParameter' => 'Core/Core_c.php', + 'SensitiveParameterValue' => 'Core/Core_c.php', 'Serializable' => 'Core/Core_c.php', 'SessionHandler' => 'session/SessionHandler.php', 'SessionHandlerInterface' => 'session/SessionHandler.php', 'SessionIdInterface' => 'session/SessionHandler.php', 'SessionUpdateTimestampHandlerInterface' => 'session/SessionHandler.php', + 'Shmop' => 'shmop/shmop.php', + 'SimpleKafkaClient' => 'simple_kafka_client/SimpleKafkaClient.php', + 'SimpleKafkaClient\\Configuration' => 'simple_kafka_client/SimpleKafkaClient/Configuration.php', + 'SimpleKafkaClient\\Consumer' => 'simple_kafka_client/SimpleKafkaClient/Consumer.php', + 'SimpleKafkaClient\\ConsumerTopic' => 'simple_kafka_client/SimpleKafkaClient/Topic.php', + 'SimpleKafkaClient\\Exception' => 'simple_kafka_client/SimpleKafkaClient/Exception.php', + 'SimpleKafkaClient\\KafkaErrorException' => 'simple_kafka_client/SimpleKafkaClient/KafkaErrorException.php', + 'SimpleKafkaClient\\Message' => 'simple_kafka_client/SimpleKafkaClient/Message.php', + 'SimpleKafkaClient\\Metadata' => 'simple_kafka_client/SimpleKafkaClient/Metadata.php', + 'SimpleKafkaClient\\Metadata\\Broker' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Broker.php', + 'SimpleKafkaClient\\Metadata\\Collection' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Collection.php', + 'SimpleKafkaClient\\Metadata\\Partition' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Partition.php', + 'SimpleKafkaClient\\Metadata\\Topic' => 'simple_kafka_client/SimpleKafkaClient/Metadata/Topic.php', + 'SimpleKafkaClient\\Producer' => 'simple_kafka_client/SimpleKafkaClient/Producer.php', + 'SimpleKafkaClient\\ProducerTopic' => 'simple_kafka_client/SimpleKafkaClient/Topic.php', + 'SimpleKafkaClient\\Topic' => 'simple_kafka_client/SimpleKafkaClient/Topic.php', + 'SimpleKafkaClient\\TopicPartition' => 'simple_kafka_client/SimpleKafkaClient/TopicPartition.php', 'SimpleXMLElement' => 'SimpleXML/SimpleXML.php', 'SimpleXMLIterator' => 'SimpleXML/SimpleXML.php', 'SoapClient' => 'soap/soap.php', @@ -615,8 +933,30 @@ final class PhpStormStubsMap 'SoapParam' => 'soap/soap.php', 'SoapServer' => 'soap/soap.php', 'SoapVar' => 'soap/soap.php', + 'Socket' => 'sockets/sockets.php', 'SodiumException' => 'sodium/sodium.php', 'SolrClient' => 'solr/SolrClient.php', + 'SolrClientException' => 'solr/Exceptions/SolrClientException.php', + 'SolrCollapseFunction' => 'solr/Queries/SolrCollapseFunction.php', + 'SolrDisMaxQuery' => 'solr/Queries/SolrDisMaxQuery.php', + 'SolrDocument' => 'solr/Documents/SolrDocument.php', + 'SolrDocumentField' => 'solr/Documents/SolrDocumentField.php', + 'SolrException' => 'solr/Exceptions/SolrException.php', + 'SolrGenericResponse' => 'solr/Responses/SolrGenericResponse.php', + 'SolrIllegalArgumentException' => 'solr/Exceptions/SolrIllegalArgumentException.php', + 'SolrIllegalOperationException' => 'solr/Exceptions/SolrIllegalOperationException.php', + 'SolrInputDocument' => 'solr/Documents/SolrInputDocument.php', + 'SolrMissingMandatoryParameterException' => 'solr/Exceptions/SolrMissingMandatoryParameterException.php', + 'SolrModifiableParams' => 'solr/Queries/SolrModifiableParams.php', + 'SolrObject' => 'solr/Utils/SolrObject.php', + 'SolrParams' => 'solr/Queries/SolrParams.php', + 'SolrPingResponse' => 'solr/Responses/SolrPingResponse.php', + 'SolrQuery' => 'solr/Queries/SolrQuery.php', + 'SolrQueryResponse' => 'solr/Responses/SolrQueryResponse.php', + 'SolrResponse' => 'solr/Responses/SolrResponse.php', + 'SolrServerException' => 'solr/Exceptions/SolrServerException.php', + 'SolrUpdateResponse' => 'solr/Responses/SolrUpdateResponse.php', + 'SolrUtils' => 'solr/Utils/SolrUtils.php', 'SplBool' => 'SplType/SplType.php', 'SplDoublyLinkedList' => 'SPL/SPL_c1.php', 'SplEnum' => 'SplType/SplType.php', @@ -638,19 +978,74 @@ final class PhpStormStubsMap 'SplTempFileObject' => 'SPL/SPL_c1.php', 'SplType' => 'SplType/SplType.php', 'Spoofchecker' => 'intl/intl.php', - 'Stackable' => 'pthreads/pthreads.php', 'Stomp' => 'stomp/stomp.php', 'StompException' => 'stomp/stomp.php', 'StompFrame' => 'stomp/stomp.php', + 'Stringable' => 'Core/Core_c.php', 'Svn' => 'svn/svn.php', 'SvnNode' => 'svn/svn.php', 'SvnWc' => 'svn/svn.php', 'SvnWcSchedule' => 'svn/svn.php', + 'Swoole\\Atomic' => 'swoole/Swoole/Atomic.php', + 'Swoole\\Atomic\\Long' => 'swoole/Swoole/Atomic/Long.php', + 'Swoole\\Client' => 'swoole/Swoole/Client.php', + 'Swoole\\Client\\Exception' => 'swoole/Swoole/Client/Exception.php', + 'Swoole\\Connection\\Iterator' => 'swoole/Swoole/Connection/Iterator.php', + 'Swoole\\Coroutine' => 'swoole/Swoole/Coroutine.php', + 'Swoole\\Coroutine\\Channel' => 'swoole/Swoole/Coroutine/Channel.php', + 'Swoole\\Coroutine\\Client' => 'swoole/Swoole/Coroutine/Client.php', + 'Swoole\\Coroutine\\Context' => 'swoole/Swoole/Coroutine/Context.php', + 'Swoole\\Coroutine\\Curl\\Exception' => 'swoole/Swoole/Coroutine/Curl/Exception.php', + 'Swoole\\Coroutine\\Http2\\Client' => 'swoole/Swoole/Coroutine/Http2/Client.php', + 'Swoole\\Coroutine\\Http2\\Client\\Exception' => 'swoole/Swoole/Coroutine/Http2/Client/Exception.php', + 'Swoole\\Coroutine\\Http\\Client' => 'swoole/Swoole/Coroutine/Http/Client.php', + 'Swoole\\Coroutine\\Http\\Client\\Exception' => 'swoole/Swoole/Coroutine/Http/Client/Exception.php', + 'Swoole\\Coroutine\\Http\\Server' => 'swoole/Swoole/Coroutine/Http/Server.php', + 'Swoole\\Coroutine\\Iterator' => 'swoole/Swoole/Coroutine/Iterator.php', + 'Swoole\\Coroutine\\MySQL' => 'swoole/Swoole/Coroutine/MySQL.php', + 'Swoole\\Coroutine\\MySQL\\Exception' => 'swoole/Swoole/Coroutine/MySQL/Exception.php', + 'Swoole\\Coroutine\\MySQL\\Statement' => 'swoole/Swoole/Coroutine/MySQL/Statement.php', + 'Swoole\\Coroutine\\Redis' => 'swoole/Swoole/Coroutine/Redis.php', + 'Swoole\\Coroutine\\Scheduler' => 'swoole/Swoole/Coroutine/Scheduler.php', + 'Swoole\\Coroutine\\Socket' => 'swoole/Swoole/Coroutine/Socket.php', + 'Swoole\\Coroutine\\Socket\\Exception' => 'swoole/Swoole/Coroutine/Socket/Exception.php', + 'Swoole\\Coroutine\\System' => 'swoole/Swoole/Coroutine/System.php', + 'Swoole\\Error' => 'swoole/Swoole/Error.php', + 'Swoole\\Event' => 'swoole/Swoole/Event.php', + 'Swoole\\Exception' => 'swoole/Swoole/Exception.php', + 'Swoole\\ExitException' => 'swoole/Swoole/ExitException.php', + 'Swoole\\Http2\\Request' => 'swoole/Swoole/Http2/Request.php', + 'Swoole\\Http2\\Response' => 'swoole/Swoole/Http2/Response.php', + 'Swoole\\Http\\Request' => 'swoole/Swoole/Http/Request.php', + 'Swoole\\Http\\Response' => 'swoole/Swoole/Http/Response.php', + 'Swoole\\Http\\Server' => 'swoole/Swoole/Http/Server.php', + 'Swoole\\Lock' => 'swoole/Swoole/Lock.php', + 'Swoole\\Process' => 'swoole/Swoole/Process.php', + 'Swoole\\Process\\Pool' => 'swoole/Swoole/Process/Pool.php', + 'Swoole\\Redis\\Server' => 'swoole/Swoole/Redis/Server.php', + 'Swoole\\Runtime' => 'swoole/Swoole/Runtime.php', + 'Swoole\\Server' => 'swoole/Swoole/Server.php', + 'Swoole\\Server\\Event' => 'swoole/Swoole/Server/Event.php', + 'Swoole\\Server\\Packet' => 'swoole/Swoole/Server/Packet.php', + 'Swoole\\Server\\PipeMessage' => 'swoole/Swoole/Server/PipeMessage.php', + 'Swoole\\Server\\Port' => 'swoole/Swoole/Server/Port.php', + 'Swoole\\Server\\StatusInfo' => 'swoole/Swoole/Server/StatusInfo.php', + 'Swoole\\Server\\Task' => 'swoole/Swoole/Server/Task.php', + 'Swoole\\Server\\TaskResult' => 'swoole/Swoole/Server/TaskResult.php', + 'Swoole\\Table' => 'swoole/Swoole/Table.php', + 'Swoole\\Timer' => 'swoole/Swoole/Timer.php', + 'Swoole\\Timer\\Iterator' => 'swoole/Swoole/Timer/Iterator.php', + 'Swoole\\WebSocket\\CloseFrame' => 'swoole/Swoole/WebSocket/CloseFrame.php', + 'Swoole\\WebSocket\\Frame' => 'swoole/Swoole/WebSocket/Frame.php', + 'Swoole\\WebSocket\\Server' => 'swoole/Swoole/WebSocket/Server.php', 'SyncEvent' => 'sync/sync.php', 'SyncMutex' => 'sync/sync.php', 'SyncReaderWriter' => 'sync/sync.php', 'SyncSemaphore' => 'sync/sync.php', 'SyncSharedMemory' => 'sync/sync.php', + 'SysvMessageQueue' => 'sysvmsg/sysvmsg.php', + 'SysvSemaphore' => 'sysvsem/sysvsem.php', + 'SysvSharedMemory' => 'sysvshm/sysvshm.php', 'Thread' => 'pthreads/pthreads.php', 'Threaded' => 'pthreads/pthreads.php', 'Throwable' => 'Core/Core_c.php', @@ -661,14 +1056,21 @@ final class PhpStormStubsMap 'UV' => 'uv/UV.php', 'UnderflowException' => 'SPL/SPL.php', 'UnexpectedValueException' => 'SPL/SPL.php', + 'UnhandledMatchError' => 'Core/Core_c.php', + 'UnitEnum' => 'Core/Core_c.php', 'V8Js' => 'v8js/v8js.php', 'V8JsMemoryLimitException' => 'v8js/v8js.php', 'V8JsScriptException' => 'v8js/v8js.php', 'V8JsTimeLimitException' => 'v8js/v8js.php', 'VARIANT' => 'com_dotnet/com_dotnet.php', + 'ValueError' => 'Core/Core_c.php', 'Volatile' => 'pthreads/pthreads.php', + 'Vtiful\\Kernel\\Excel' => 'xlswriter/xlswriter.php', + 'Vtiful\\Kernel\\Format' => 'xlswriter/xlswriter.php', + 'WeakMap' => 'Core/Core_c.php', 'WeakReference' => 'Core/Core_c.php', 'Worker' => 'pthreads/pthreads.php', + 'XMLParser' => 'xml/xml.php', 'XMLReader' => 'xmlreader/xmlreader.php', 'XMLWriter' => 'xmlwriter/xmlwriter.php', 'XSLTProcessor' => 'xsl/xsl.php', @@ -751,9 +1153,16 @@ final class PhpStormStubsMap 'Yaf_View_Simple' => 'yaf/yaf.php', 'Yar_Client' => 'yar/yar.php', 'Yar_Client_Exception' => 'yar/yar.php', + 'Yar_Client_Packager_Exception' => 'yar/yar.php', + 'Yar_Client_Protocol_Exception' => 'yar/yar.php', + 'Yar_Client_Transport_Exception' => 'yar/yar.php', 'Yar_Concurrent_Client' => 'yar/yar.php', 'Yar_Server' => 'yar/yar.php', 'Yar_Server_Exception' => 'yar/yar.php', + 'Yar_Server_Output_Exception' => 'yar/yar.php', + 'Yar_Server_Packager_Exception' => 'yar/yar.php', + 'Yar_Server_Protocol_Exception' => 'yar/yar.php', + 'Yar_Server_Request_Exception' => 'yar/yar.php', 'ZMQ' => 'zmq/zmq.php', 'ZMQContext' => 'zmq/zmq.php', 'ZMQContextException' => 'zmq/zmq.php', @@ -779,6 +1188,8 @@ final class PhpStormStubsMap '___PHPSTORM_HELPERS\\PS_UNRESERVE_PREFIX_static' => 'standard/_types.php', '___PHPSTORM_HELPERS\\PS_UNRESERVE_PREFIX_this' => 'standard/_types.php', '___PHPSTORM_HELPERS\\object' => 'standard/_types.php', + 'ast\\Metadata' => 'ast/ast.php', + 'ast\\Node' => 'ast/ast.php', 'classObj' => 'mapscript/mapscript.php', 'clusterObj' => 'mapscript/mapscript.php', 'colorObj' => 'mapscript/mapscript.php', @@ -789,6 +1200,7 @@ final class PhpStormStubsMap 'ffmpeg_movie' => 'ffmpeg/ffmpeg.php', 'finfo' => 'fileinfo/fileinfo.php', 'gnupg' => 'gnupg/gnupg.php', + 'gnupg_keylistiterator' => 'gnupg/gnupg.php', 'gridObj' => 'mapscript/mapscript.php', 'hashTableObj' => 'mapscript/mapscript.php', 'http\\Client' => 'http/http3.php', @@ -872,9 +1284,63 @@ final class PhpStormStubsMap 'mysqli_sql_exception' => 'mysqli/mysqli.php', 'mysqli_stmt' => 'mysqli/mysqli.php', 'mysqli_warning' => 'mysqli/mysqli.php', + 'newrelic\\DistributedTracePayload' => 'newrelic/newrelic.php', 'outputformatObj' => 'mapscript/mapscript.php', + 'parallel\\Channel' => 'parallel/parallel/Channel.php', + 'parallel\\Channel\\Error' => 'parallel/parallel/Channel/Error.php', + 'parallel\\Channel\\Error\\Closed' => 'parallel/parallel/Channel/Error/Closed.php', + 'parallel\\Channel\\Error\\Existence' => 'parallel/parallel/Channel/Error/Existence.php', + 'parallel\\Channel\\Error\\IllegalValue' => 'parallel/parallel/Channel/Error/IllegalValue.php', + 'parallel\\Error' => 'parallel/parallel/Error.php', + 'parallel\\Events' => 'parallel/parallel/Events.php', + 'parallel\\Events\\Error' => 'parallel/parallel/Events/Error.php', + 'parallel\\Events\\Error\\Existence' => 'parallel/parallel/Events/Error/Existence.php', + 'parallel\\Events\\Error\\Timeout' => 'parallel/parallel/Events/Error/Timeout.php', + 'parallel\\Events\\Event' => 'parallel/parallel/Events/Event.php', + 'parallel\\Events\\Event\\Error' => 'parallel/parallel/Events/Event/Error.php', + 'parallel\\Events\\Event\\Type' => 'parallel/parallel/Events/Event/Type.php', + 'parallel\\Events\\Input' => 'parallel/parallel/Events/Input.php', + 'parallel\\Events\\Input\\Error' => 'parallel/parallel/Events/Input/Error.php', + 'parallel\\Events\\Input\\Error\\Existence' => 'parallel/parallel/Events/Input/Error/Existence.php', + 'parallel\\Events\\Input\\Error\\IllegalValue' => 'parallel/parallel/Events/Input/Error/IllegalValue.php', + 'parallel\\Future' => 'parallel/parallel/Future.php', + 'parallel\\Future\\Error' => 'parallel/parallel/Future/Error.php', + 'parallel\\Future\\Error\\Cancelled' => 'parallel/parallel/Future/Error/Cancelled.php', + 'parallel\\Future\\Error\\Foreign' => 'parallel/parallel/Future/Error/Foreign.php', + 'parallel\\Future\\Error\\Killed' => 'parallel/parallel/Future/Error/Killed.php', + 'parallel\\Runtime' => 'parallel/parallel/Runtime.php', + 'parallel\\Runtime\\Error' => 'parallel/parallel/Runtime/Error.php', + 'parallel\\Runtime\\Error\\Bootstrap' => 'parallel/parallel/Runtime/Error/Bootstrap.php', + 'parallel\\Runtime\\Error\\Closed' => 'parallel/parallel/Runtime/Error/Closed.php', + 'parallel\\Runtime\\Error\\IllegalFunction' => 'parallel/parallel/Runtime/Error/IllegalFunction.php', + 'parallel\\Runtime\\Error\\IllegalInstruction' => 'parallel/parallel/Runtime/Error/IllegalInstruction.php', + 'parallel\\Runtime\\Error\\IllegalParameter' => 'parallel/parallel/Runtime/Error/IllegalParameter.php', + 'parallel\\Runtime\\Error\\IllegalReturn' => 'parallel/parallel/Runtime/Error/IllegalReturn.php', + 'parallel\\Runtime\\Error\\IllegalVariable' => 'parallel/parallel/Runtime/Error/IllegalVariable.php', + 'parallel\\Runtime\\Error\\Killed' => 'parallel/parallel/Runtime/Error/Killed.php', + 'parallel\\Runtime\\Object\\Unavailable' => 'parallel/parallel/Runtime/Object/Unavailable.php', + 'parallel\\Runtime\\Type\\Unavailable' => 'parallel/parallel/Runtime/Type/Unavailable.php', + 'parallel\\Sync' => 'parallel/parallel/Sync.php', + 'parallel\\Sync\\Error' => 'parallel/parallel/Sync/Error.php', + 'parallel\\Sync\\Error\\IllegalValue' => 'parallel/parallel/Sync/Error/IllegalValue.php', 'php_user_filter' => 'standard/standard_0.php', 'pointObj' => 'mapscript/mapscript.php', + 'pq\\COPY' => 'pq/pq.php', + 'pq\\Cancel' => 'pq/pq.php', + 'pq\\Connection' => 'pq/pq.php', + 'pq\\Converter' => 'pq/pq.php', + 'pq\\Cursor' => 'pq/pq.php', + 'pq\\DateTime' => 'pq/pq.php', + 'pq\\Exception' => 'pq/pq.php', + 'pq\\Exception\\BadMethodCallException' => 'pq/pq.php', + 'pq\\Exception\\DomainException' => 'pq/pq.php', + 'pq\\Exception\\InvalidArgumentException' => 'pq/pq.php', + 'pq\\Exception\\RuntimeException' => 'pq/pq.php', + 'pq\\LOB' => 'pq/pq.php', + 'pq\\Result' => 'pq/pq.php', + 'pq\\Statement' => 'pq/pq.php', + 'pq\\Transaction' => 'pq/pq.php', + 'pq\\Types' => 'pq/pq.php', 'projectionObj' => 'mapscript/mapscript.php', 'querymapObj' => 'mapscript/mapscript.php', 'rectObj' => 'mapscript/mapscript.php', @@ -892,29 +1358,19 @@ final class PhpStormStubsMap ); const FUNCTIONS = array ( - 'Couchbase\\basicDecoderV1' => 'couchbase/couchbase.php', - 'Couchbase\\basicEncoderV1' => 'couchbase/couchbase.php', - 'Couchbase\\defaultDecoder' => 'couchbase/couchbase.php', - 'Couchbase\\defaultEncoder' => 'couchbase/couchbase.php', - 'Couchbase\\fastlzCompress' => 'couchbase/couchbase.php', - 'Couchbase\\fastlzDecompress' => 'couchbase/couchbase.php', - 'Couchbase\\passthruDecoder' => 'couchbase/couchbase.php', - 'Couchbase\\passthruEncoder' => 'couchbase/couchbase.php', - 'Couchbase\\zlibCompress' => 'couchbase/couchbase.php', - 'Couchbase\\zlibDecompress' => 'couchbase/couchbase.php', 'GEOSLineMerge' => 'geos/geos.php', 'GEOSPolygonize' => 'geos/geos.php', 'GEOSRelateMatch' => 'geos/geos.php', 'GEOSSharedPaths' => 'geos/geos.php', 'GEOSVersion' => 'geos/geos.php', - 'MongoDB\\BSON\\fromJSON' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\fromPHP' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\toCanonicalExtendedJSON' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\toJSON' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\toPHP' => 'mongodb/mongodb.php', - 'MongoDB\\BSON\\toRelaxedExtendedJSON' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Monitoring\\addSubscriber' => 'mongodb/mongodb.php', - 'MongoDB\\Driver\\Monitoring\\removeSubscriber' => 'mongodb/mongodb.php', + 'MongoDB\\BSON\\fromJSON' => 'mongodb/BSON/functions.php', + 'MongoDB\\BSON\\fromPHP' => 'mongodb/BSON/functions.php', + 'MongoDB\\BSON\\toCanonicalExtendedJSON' => 'mongodb/BSON/functions.php', + 'MongoDB\\BSON\\toJSON' => 'mongodb/BSON/functions.php', + 'MongoDB\\BSON\\toPHP' => 'mongodb/BSON/functions.php', + 'MongoDB\\BSON\\toRelaxedExtendedJSON' => 'mongodb/BSON/functions.php', + 'MongoDB\\Driver\\Monitoring\\addSubscriber' => 'mongodb/Monitoring/functions.php', + 'MongoDB\\Driver\\Monitoring\\removeSubscriber' => 'mongodb/Monitoring/functions.php', 'PDF_activate_item' => 'pdflib/PDFlib.php', 'PDF_add_launchlink' => 'pdflib/PDFlib.php', 'PDF_add_locallink' => 'pdflib/PDFlib.php', @@ -1148,6 +1604,10 @@ final class PhpStormStubsMap 'Sodium\\randombytes_random16' => 'libsodium/libsodium.php', 'Sodium\\randombytes_uniform' => 'libsodium/libsodium.php', 'Sodium\\version_string' => 'libsodium/libsodium.php', + 'Zstd\\compress' => 'zstd/zstd.php', + 'Zstd\\compress_dict' => 'zstd/zstd.php', + 'Zstd\\uncompress' => 'zstd/zstd.php', + 'Zstd\\uncompress_dict' => 'zstd/zstd.php', '_' => 'gettext/gettext.php', 'abs' => 'standard/standard_3.php', 'accelerator_set_status' => 'zend/zend.php', @@ -1161,7 +1621,7 @@ final class PhpStormStubsMap 'apache_getenv' => 'apache/apache.php', 'apache_lookup_uri' => 'apache/apache.php', 'apache_note' => 'apache/apache.php', - 'apache_request_headers' => 'apache/apache.php', + 'apache_request_headers' => 'standard/standard_4.php', 'apache_reset_timeout' => 'apache/apache.php', 'apache_response_headers' => 'apache/apache.php', 'apache_setenv' => 'apache/apache.php', @@ -1190,10 +1650,12 @@ final class PhpStormStubsMap 'apcu_clear_cache' => 'apcu/apcu.php', 'apcu_dec' => 'apcu/apcu.php', 'apcu_delete' => 'apcu/apcu.php', + 'apcu_enabled' => 'apcu/apcu.php', 'apcu_entry' => 'apcu/apcu.php', 'apcu_exists' => 'apcu/apcu.php', 'apcu_fetch' => 'apcu/apcu.php', 'apcu_inc' => 'apcu/apcu.php', + 'apcu_key_info' => 'apcu/apcu.php', 'apcu_sma_info' => 'apcu/apcu.php', 'apcu_store' => 'apcu/apcu.php', 'ares_gethostbyname' => 'uv/uv_functions.php', @@ -1216,6 +1678,7 @@ final class PhpStormStubsMap 'array_intersect_key' => 'standard/standard_9.php', 'array_intersect_uassoc' => 'standard/standard_9.php', 'array_intersect_ukey' => 'standard/standard_9.php', + 'array_is_list' => 'standard/standard_9.php', 'array_key_exists' => 'standard/standard_9.php', 'array_key_first' => 'standard/standard_9.php', 'array_key_last' => 'standard/standard_9.php', @@ -1255,6 +1718,12 @@ final class PhpStormStubsMap 'asort' => 'standard/standard_8.php', 'assert' => 'standard/standard_9.php', 'assert_options' => 'standard/standard_9.php', + 'ast\\get_kind_name' => 'ast/ast.php', + 'ast\\get_metadata' => 'ast/ast.php', + 'ast\\get_supported_versions' => 'ast/ast.php', + 'ast\\kind_uses_flags' => 'ast/ast.php', + 'ast\\parse_code' => 'ast/ast.php', + 'ast\\parse_file' => 'ast/ast.php', 'atan' => 'standard/standard_3.php', 'atan2' => 'standard/standard_3.php', 'atanh' => 'standard/standard_3.php', @@ -1336,6 +1805,7 @@ final class PhpStormStubsMap 'com_message_pump' => 'com_dotnet/com_dotnet.php', 'com_print_typeinfo' => 'com_dotnet/com_dotnet.php', 'compact' => 'standard/standard_8.php', + 'config_get_hash' => 'xdebug/xdebug.php', 'confirm_pdo_ibm_compiled' => 'pdo_ibm/pdo_ibm.php', 'connection_aborted' => 'standard/standard_4.php', 'connection_status' => 'standard/standard_4.php', @@ -1488,6 +1958,7 @@ final class PhpStormStubsMap 'curl_share_strerror' => 'curl/curl.php', 'curl_strerror' => 'curl/curl.php', 'curl_unescape' => 'curl/curl.php', + 'curl_upkeep' => 'curl/curl.php', 'curl_version' => 'curl/curl.php', 'current' => 'standard/standard_8.php', 'date' => 'date/date.php', @@ -1624,6 +2095,7 @@ final class PhpStormStubsMap 'decbin' => 'standard/standard_3.php', 'dechex' => 'standard/standard_3.php', 'decoct' => 'standard/standard_3.php', + 'defer' => 'swoole/functions.php', 'define' => 'Core/Core.php', 'define_syslog_variables' => 'standard/standard_8.php', 'defined' => 'Core/Core.php', @@ -1631,6 +2103,17 @@ final class PhpStormStubsMap 'deflate_init' => 'zlib/zlib.php', 'deg2rad' => 'standard/standard_3.php', 'dgettext' => 'gettext/gettext.php', + 'dio_close' => 'dio/dio.php', + 'dio_fcntl' => 'dio/dio.php', + 'dio_open' => 'dio/dio.php', + 'dio_raw' => 'dio/dio.php', + 'dio_read' => 'dio/dio.php', + 'dio_seek' => 'dio/dio.php', + 'dio_serial' => 'dio/dio.php', + 'dio_stat' => 'dio/dio.php', + 'dio_tcsetattr' => 'dio/dio.php', + 'dio_truncate' => 'dio/dio.php', + 'dio_write' => 'dio/dio.php', 'dir' => 'standard/standard_7.php', 'dirname' => 'standard/standard_1.php', 'disk_free_space' => 'standard/standard_7.php', @@ -1646,6 +2129,64 @@ final class PhpStormStubsMap 'each' => 'Core/Core.php', 'easter_date' => 'calendar/calendar.php', 'easter_days' => 'calendar/calendar.php', + 'eio_busy' => 'eio/eio.php', + 'eio_cancel' => 'eio/eio.php', + 'eio_chmod' => 'eio/eio.php', + 'eio_chown' => 'eio/eio.php', + 'eio_close' => 'eio/eio.php', + 'eio_custom' => 'eio/eio.php', + 'eio_dup2' => 'eio/eio.php', + 'eio_event_loop' => 'eio/eio.php', + 'eio_fallocate' => 'eio/eio.php', + 'eio_fchmod' => 'eio/eio.php', + 'eio_fchown' => 'eio/eio.php', + 'eio_fdatasync' => 'eio/eio.php', + 'eio_fstat' => 'eio/eio.php', + 'eio_fstatvfs' => 'eio/eio.php', + 'eio_fsync' => 'eio/eio.php', + 'eio_ftruncate' => 'eio/eio.php', + 'eio_futime' => 'eio/eio.php', + 'eio_get_event_stream' => 'eio/eio.php', + 'eio_get_last_error' => 'eio/eio.php', + 'eio_grp' => 'eio/eio.php', + 'eio_grp_add' => 'eio/eio.php', + 'eio_grp_cancel' => 'eio/eio.php', + 'eio_grp_limit' => 'eio/eio.php', + 'eio_link' => 'eio/eio.php', + 'eio_lstat' => 'eio/eio.php', + 'eio_mkdir' => 'eio/eio.php', + 'eio_mknod' => 'eio/eio.php', + 'eio_nop' => 'eio/eio.php', + 'eio_npending' => 'eio/eio.php', + 'eio_nready' => 'eio/eio.php', + 'eio_nreqs' => 'eio/eio.php', + 'eio_nthreads' => 'eio/eio.php', + 'eio_open' => 'eio/eio.php', + 'eio_poll' => 'eio/eio.php', + 'eio_read' => 'eio/eio.php', + 'eio_readahead' => 'eio/eio.php', + 'eio_readdir' => 'eio/eio.php', + 'eio_readlink' => 'eio/eio.php', + 'eio_realpath' => 'eio/eio.php', + 'eio_rename' => 'eio/eio.php', + 'eio_rmdir' => 'eio/eio.php', + 'eio_seek' => 'eio/eio.php', + 'eio_sendfile' => 'eio/eio.php', + 'eio_set_max_idle' => 'eio/eio.php', + 'eio_set_max_parallel' => 'eio/eio.php', + 'eio_set_max_poll_reqs' => 'eio/eio.php', + 'eio_set_max_poll_time' => 'eio/eio.php', + 'eio_set_min_parallel' => 'eio/eio.php', + 'eio_stat' => 'eio/eio.php', + 'eio_statvfs' => 'eio/eio.php', + 'eio_symlink' => 'eio/eio.php', + 'eio_sync' => 'eio/eio.php', + 'eio_sync_file_range' => 'eio/eio.php', + 'eio_syncfs' => 'eio/eio.php', + 'eio_truncate' => 'eio/eio.php', + 'eio_unlink' => 'eio/eio.php', + 'eio_utime' => 'eio/eio.php', + 'eio_write' => 'eio/eio.php', 'enchant_broker_describe' => 'enchant/enchant.php', 'enchant_broker_dict_exists' => 'enchant/enchant.php', 'enchant_broker_free' => 'enchant/enchant.php', @@ -1658,16 +2199,19 @@ final class PhpStormStubsMap 'enchant_broker_request_pwl_dict' => 'enchant/enchant.php', 'enchant_broker_set_dict_path' => 'enchant/enchant.php', 'enchant_broker_set_ordering' => 'enchant/enchant.php', + 'enchant_dict_add' => 'enchant/enchant.php', 'enchant_dict_add_to_personal' => 'enchant/enchant.php', 'enchant_dict_add_to_session' => 'enchant/enchant.php', 'enchant_dict_check' => 'enchant/enchant.php', 'enchant_dict_describe' => 'enchant/enchant.php', 'enchant_dict_get_error' => 'enchant/enchant.php', + 'enchant_dict_is_added' => 'enchant/enchant.php', 'enchant_dict_is_in_session' => 'enchant/enchant.php', 'enchant_dict_quick_check' => 'enchant/enchant.php', 'enchant_dict_store_replacement' => 'enchant/enchant.php', 'enchant_dict_suggest' => 'enchant/enchant.php', 'end' => 'standard/standard_8.php', + 'enum_exists' => 'Core/Core.php', 'ereg' => 'regex/ereg.php', 'ereg_replace' => 'regex/ereg.php', 'eregi' => 'regex/ereg.php', @@ -1713,6 +2257,8 @@ final class PhpStormStubsMap 'exif_tagname' => 'exif/exif.php', 'exif_thumbnail' => 'exif/exif.php', 'exp' => 'standard/standard_3.php', + 'expect_expectl' => 'expect/expect.php', + 'expect_popen' => 'expect/expect.php', 'explode' => 'standard/standard_1.php', 'expm1' => 'standard/standard_3.php', 'extension_loaded' => 'Core/Core.php', @@ -1859,7 +2405,7 @@ final class PhpStormStubsMap 'fann_train_epoch' => 'fann/fann.php', 'fann_train_on_data' => 'fann/fann.php', 'fann_train_on_file' => 'fann/fann.php', - 'fastcgi_finish_request' => 'standard/_standard_manual.php', + 'fastcgi_finish_request' => 'fpm/fpm.php', 'fbird_add_user' => 'interbase/interbase.php', 'fbird_affected_rows' => 'interbase/interbase.php', 'fbird_backup' => 'interbase/interbase.php', @@ -1909,6 +2455,8 @@ final class PhpStormStubsMap 'fbird_trans' => 'interbase/interbase.php', 'fbird_wait_event' => 'interbase/interbase.php', 'fclose' => 'standard/standard_5.php', + 'fdatasync' => 'standard/standard_5.php', + 'fdiv' => 'standard/standard_3.php', 'feof' => 'standard/standard_5.php', 'fflush' => 'standard/standard_5.php', 'fgetc' => 'standard/standard_5.php', @@ -1960,6 +2508,7 @@ final class PhpStormStubsMap 'fseek' => 'standard/standard_5.php', 'fsockopen' => 'standard/standard_7.php', 'fstat' => 'standard/standard_5.php', + 'fsync' => 'standard/standard_5.php', 'ftell' => 'standard/standard_5.php', 'ftok' => 'standard/standard_9.php', 'ftp_alloc' => 'ftp/ftp.php', @@ -2129,6 +2678,7 @@ final class PhpStormStubsMap 'get_class_methods' => 'Core/Core.php', 'get_class_vars' => 'Core/Core.php', 'get_current_user' => 'standard/standard_3.php', + 'get_debug_type' => 'standard/standard_9.php', 'get_declared_classes' => 'Core/Core.php', 'get_declared_interfaces' => 'Core/Core.php', 'get_declared_traits' => 'Core/Core.php', @@ -2148,11 +2698,13 @@ final class PhpStormStubsMap 'get_object_vars' => 'Core/Core.php', 'get_parent_class' => 'Core/Core.php', 'get_required_files' => 'Core/Core.php', + 'get_resource_id' => 'standard/standard_9.php', 'get_resource_type' => 'Core/Core.php', 'get_resources' => 'Core/Core.php', - 'getallheaders' => 'apache/apache.php', + 'getallheaders' => 'standard/standard_4.php', 'getcwd' => 'standard/standard_7.php', 'getdate' => 'date/date.php', + 'getdir' => 'standard/standard_7.php', 'getenv' => 'standard/standard_3.php', 'gethostbyaddr' => 'standard/standard_4.php', 'gethostbyname' => 'standard/standard_4.php', @@ -2169,7 +2721,7 @@ final class PhpStormStubsMap 'getopt' => 'standard/standard_3.php', 'getprotobyname' => 'standard/standard_2.php', 'getprotobynumber' => 'standard/standard_2.php', - 'getrandmax' => 'standard/standard_2.php', + 'getrandmax' => 'random/random.php', 'getrusage' => 'standard/standard_3.php', 'getservbyname' => 'standard/standard_2.php', 'getservbyport' => 'standard/standard_2.php', @@ -2182,6 +2734,7 @@ final class PhpStormStubsMap 'gmp_abs' => 'gmp/gmp.php', 'gmp_add' => 'gmp/gmp.php', 'gmp_and' => 'gmp/gmp.php', + 'gmp_binomial' => 'gmp/gmp.php', 'gmp_clrbit' => 'gmp/gmp.php', 'gmp_cmp' => 'gmp/gmp.php', 'gmp_com' => 'gmp/gmp.php', @@ -2200,12 +2753,15 @@ final class PhpStormStubsMap 'gmp_intval' => 'gmp/gmp.php', 'gmp_invert' => 'gmp/gmp.php', 'gmp_jacobi' => 'gmp/gmp.php', + 'gmp_kronecker' => 'gmp/gmp.php', + 'gmp_lcm' => 'gmp/gmp.php', 'gmp_legendre' => 'gmp/gmp.php', 'gmp_mod' => 'gmp/gmp.php', 'gmp_mul' => 'gmp/gmp.php', 'gmp_neg' => 'gmp/gmp.php', 'gmp_nextprime' => 'gmp/gmp.php', 'gmp_or' => 'gmp/gmp.php', + 'gmp_perfect_power' => 'gmp/gmp.php', 'gmp_perfect_square' => 'gmp/gmp.php', 'gmp_popcount' => 'gmp/gmp.php', 'gmp_pow' => 'gmp/gmp.php', @@ -2228,6 +2784,33 @@ final class PhpStormStubsMap 'gmp_testbit' => 'gmp/gmp.php', 'gmp_xor' => 'gmp/gmp.php', 'gmstrftime' => 'date/date.php', + 'gnupg_adddecryptkey' => 'gnupg/gnupg.php', + 'gnupg_addencryptkey' => 'gnupg/gnupg.php', + 'gnupg_addsignkey' => 'gnupg/gnupg.php', + 'gnupg_cleardecryptkeys' => 'gnupg/gnupg.php', + 'gnupg_clearencryptkeys' => 'gnupg/gnupg.php', + 'gnupg_clearsignkeys' => 'gnupg/gnupg.php', + 'gnupg_decrypt' => 'gnupg/gnupg.php', + 'gnupg_decryptverify' => 'gnupg/gnupg.php', + 'gnupg_deletekey' => 'gnupg/gnupg.php', + 'gnupg_encrypt' => 'gnupg/gnupg.php', + 'gnupg_encryptsign' => 'gnupg/gnupg.php', + 'gnupg_export' => 'gnupg/gnupg.php', + 'gnupg_getengineinfo' => 'gnupg/gnupg.php', + 'gnupg_geterror' => 'gnupg/gnupg.php', + 'gnupg_geterrorinfo' => 'gnupg/gnupg.php', + 'gnupg_getprotocol' => 'gnupg/gnupg.php', + 'gnupg_gettrustlist' => 'gnupg/gnupg.php', + 'gnupg_import' => 'gnupg/gnupg.php', + 'gnupg_init' => 'gnupg/gnupg.php', + 'gnupg_keyinfo' => 'gnupg/gnupg.php', + 'gnupg_listsignatures' => 'gnupg/gnupg.php', + 'gnupg_setarmor' => 'gnupg/gnupg.php', + 'gnupg_seterrormode' => 'gnupg/gnupg.php', + 'gnupg_setsignmode' => 'gnupg/gnupg.php', + 'gnupg_sign' => 'gnupg/gnupg.php', + 'gnupg_verify' => 'gnupg/gnupg.php', + 'go' => 'swoole/functions.php', 'grapheme_extract' => 'intl/intl.php', 'grapheme_stripos' => 'intl/intl.php', 'grapheme_stristr' => 'intl/intl.php', @@ -2413,6 +2996,7 @@ final class PhpStormStubsMap 'imagealphablending' => 'gd/gd.php', 'imageantialias' => 'gd/gd.php', 'imagearc' => 'gd/gd.php', + 'imageavif' => 'gd/gd.php', 'imagebmp' => 'gd/gd.php', 'imagechar' => 'gd/gd.php', 'imagecharup' => 'gd/gd.php', @@ -2439,6 +3023,7 @@ final class PhpStormStubsMap 'imagecopyresampled' => 'gd/gd.php', 'imagecopyresized' => 'gd/gd.php', 'imagecreate' => 'gd/gd.php', + 'imagecreatefromavif' => 'gd/gd.php', 'imagecreatefrombmp' => 'gd/gd.php', 'imagecreatefromgd' => 'gd/gd.php', 'imagecreatefromgd2' => 'gd/gd.php', @@ -2447,6 +3032,7 @@ final class PhpStormStubsMap 'imagecreatefromjpeg' => 'gd/gd.php', 'imagecreatefrompng' => 'gd/gd.php', 'imagecreatefromstring' => 'gd/gd.php', + 'imagecreatefromtga' => 'gd/gd.php', 'imagecreatefromwbmp' => 'gd/gd.php', 'imagecreatefromwebp' => 'gd/gd.php', 'imagecreatefromxbm' => 'gd/gd.php', @@ -2473,7 +3059,10 @@ final class PhpStormStubsMap 'imagegd' => 'gd/gd.php', 'imagegd2' => 'gd/gd.php', 'imagegetclip' => 'gd/gd.php', + 'imagegetinterpolation' => 'gd/gd.php', 'imagegif' => 'gd/gd.php', + 'imagegrabscreen' => 'gd/gd.php', + 'imagegrabwindow' => 'gd/gd.php', 'imageinterlace' => 'gd/gd.php', 'imageistruecolor' => 'gd/gd.php', 'imagejpeg' => 'gd/gd.php', @@ -2547,6 +3136,7 @@ final class PhpStormStubsMap 'imap_header' => 'imap/imap.php', 'imap_headerinfo' => 'imap/imap.php', 'imap_headers' => 'imap/imap.php', + 'imap_is_open' => 'imap/imap.php', 'imap_last_error' => 'imap/imap.php', 'imap_list' => 'imap/imap.php', 'imap_listmailbox' => 'imap/imap.php', @@ -2560,6 +3150,7 @@ final class PhpStormStubsMap 'imap_mailboxmsginfo' => 'imap/imap.php', 'imap_mime_header_decode' => 'imap/imap.php', 'imap_msgno' => 'imap/imap.php', + 'imap_mutf7_to_utf8' => 'imap/imap.php', 'imap_myrights' => 'imap/imap.php', 'imap_num_msg' => 'imap/imap.php', 'imap_num_recent' => 'imap/imap.php', @@ -2592,6 +3183,7 @@ final class PhpStormStubsMap 'imap_utf7_decode' => 'imap/imap.php', 'imap_utf7_encode' => 'imap/imap.php', 'imap_utf8' => 'imap/imap.php', + 'imap_utf8_to_mutf7' => 'imap/imap.php', 'implode' => 'standard/standard_1.php', 'import_request_variables' => 'standard/standard_3.php', 'in_array' => 'standard/standard_8.php', @@ -2604,6 +3196,7 @@ final class PhpStormStubsMap 'ini_alter' => 'standard/standard_4.php', 'ini_get' => 'standard/standard_4.php', 'ini_get_all' => 'standard/standard_4.php', + 'ini_parse_quantity' => 'standard/standard_4.php', 'ini_restore' => 'standard/standard_4.php', 'ini_set' => 'standard/standard_4.php', 'inotify_add_watch' => 'inotify/inotify.php', @@ -2659,6 +3252,7 @@ final class PhpStormStubsMap 'intlcal_set' => 'intl/intl.php', 'intlcal_set_first_day_of_week' => 'intl/intl.php', 'intlcal_set_lenient' => 'intl/intl.php', + 'intlcal_set_minimal_days_in_first_week' => 'intl/intl.php', 'intlcal_set_repeated_wall_time_option' => 'intl/intl.php', 'intlcal_set_skipped_wall_time_option' => 'intl/intl.php', 'intlcal_set_time' => 'intl/intl.php', @@ -2669,8 +3263,10 @@ final class PhpStormStubsMap 'intlgregcal_is_leap_year' => 'intl/intl.php', 'intlgregcal_set_gregorian_change' => 'intl/intl.php', 'intltz_count_equivalent_ids' => 'intl/intl.php', + 'intltz_create_default' => 'intl/intl.php', 'intltz_create_enumeration' => 'intl/intl.php', 'intltz_create_time_zone' => 'intl/intl.php', + 'intltz_create_time_zone_id_enumeration' => 'intl/intl.php', 'intltz_from_date_time_zone' => 'intl/intl.php', 'intltz_getGMT' => 'intl/intl.php', 'intltz_get_canonical_id' => 'intl/intl.php', @@ -2679,10 +3275,15 @@ final class PhpStormStubsMap 'intltz_get_equivalent_id' => 'intl/intl.php', 'intltz_get_error_code' => 'intl/intl.php', 'intltz_get_error_message' => 'intl/intl.php', + 'intltz_get_gmt' => 'intl/intl.php', 'intltz_get_id' => 'intl/intl.php', + 'intltz_get_id_for_windows_id' => 'intl/intl.php', 'intltz_get_offset' => 'intl/intl.php', 'intltz_get_raw_offset' => 'intl/intl.php', + 'intltz_get_region' => 'intl/intl.php', 'intltz_get_tz_data_version' => 'intl/intl.php', + 'intltz_get_unknown' => 'intl/intl.php', + 'intltz_get_windows_id' => 'intl/intl.php', 'intltz_has_same_rules' => 'intl/intl.php', 'intltz_to_date_time_zone' => 'intl/intl.php', 'intltz_use_daylight_time' => 'intl/intl.php', @@ -2749,12 +3350,17 @@ final class PhpStormStubsMap 'json_last_error' => 'json/json.php', 'json_last_error_msg' => 'json/json.php', 'juliantojd' => 'calendar/calendar.php', + 'kafka_err2name' => 'simple_kafka_client/functions.php', + 'kafka_err2str' => 'simple_kafka_client/functions.php', + 'kafka_get_err_descs' => 'simple_kafka_client/functions.php', + 'kafka_offset_tail' => 'simple_kafka_client/functions.php', + 'kafka_thread_cnt' => 'simple_kafka_client/functions.php', 'key' => 'standard/standard_8.php', 'key_exists' => 'standard/standard_9.php', 'krsort' => 'standard/standard_8.php', 'ksort' => 'standard/standard_8.php', 'lcfirst' => 'standard/standard_1.php', - 'lcg_value' => 'standard/standard_8.php', + 'lcg_value' => 'random/random.php', 'lchgrp' => 'standard/standard_7.php', 'lchown' => 'standard/standard_7.php', 'ldap_8859_to_t61' => 'ldap/ldap.php', @@ -2768,6 +3374,7 @@ final class PhpStormStubsMap 'ldap_control_paged_result' => 'ldap/ldap.php', 'ldap_control_paged_result_response' => 'ldap/ldap.php', 'ldap_count_entries' => 'ldap/ldap.php', + 'ldap_count_references' => 'ldap/ldap.php', 'ldap_delete' => 'ldap/ldap.php', 'ldap_delete_ext' => 'ldap/ldap.php', 'ldap_dn2ufn' => 'ldap/ldap.php', @@ -2817,9 +3424,199 @@ final class PhpStormStubsMap 'ldap_t61_to_8859' => 'ldap/ldap.php', 'ldap_unbind' => 'ldap/ldap.php', 'levenshtein' => 'standard/standard_2.php', + 'libvirt_check_version' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_all_domain_stats' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_capabilities' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_emulator' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_encrypted' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_hostname' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_hypervisor' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_information' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_machine_types' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_maxvcpus' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_nic_models' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_secure' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_soundhw_models' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_sysinfo' => 'libvirt-php/libvirt-php.php', + 'libvirt_connect_get_uri' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_attach_device' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_block_commit' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_block_job_abort' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_block_job_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_block_job_set_speed' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_block_resize' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_block_stats' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_change_boot_devices' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_change_memory' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_change_vcpus' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_core_dump' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_create' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_create_xml' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_define_xml' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_destroy' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_detach_device' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_disk_add' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_disk_remove' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_autostart' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_block_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_connect' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_counts' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_disk_devices' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_id' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_interface_devices' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_job_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_metadata' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_network_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_next_dev_ids' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_screen_dimensions' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_screenshot' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_screenshot_api' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_uuid' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_uuid_string' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_get_xml_desc' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_has_current_snapshot' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_interface_addresses' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_interface_stats' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_is_active' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_is_persistent' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_lookup_by_id' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_lookup_by_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_lookup_by_uuid' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_lookup_by_uuid_string' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_managedsave' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_memory_peek' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_memory_stats' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_migrate' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_migrate_to_uri' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_migrate_to_uri2' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_new' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_new_get_vnc' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_nic_add' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_nic_remove' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_qemu_agent_command' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_reboot' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_reset' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_resume' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_send_key_api' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_send_keys' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_send_pointer_event' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_set_autostart' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_set_max_memory' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_set_memory' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_set_memory_flags' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_set_metadata' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_shutdown' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_snapshot_create' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_snapshot_current' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_snapshot_delete' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_snapshot_get_xml' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_snapshot_lookup_by_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_snapshot_revert' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_suspend' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_undefine' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_undefine_flags' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_update_device' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_xml_from_native' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_xml_to_native' => 'libvirt-php/libvirt-php.php', + 'libvirt_domain_xml_xpath' => 'libvirt-php/libvirt-php.php', + 'libvirt_get_iso_images' => 'libvirt-php/libvirt-php.php', + 'libvirt_get_last_error' => 'libvirt-php/libvirt-php.php', + 'libvirt_get_last_error_code' => 'libvirt-php/libvirt-php.php', + 'libvirt_get_last_error_domain' => 'libvirt-php/libvirt-php.php', + 'libvirt_has_feature' => 'libvirt-php/libvirt-php.php', + 'libvirt_image_create' => 'libvirt-php/libvirt-php.php', + 'libvirt_image_remove' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_active_domain_ids' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_active_domains' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_active_storagepools' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_all_networks' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_all_nwfilters' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_domain_resources' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_domain_snapshots' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_domains' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_inactive_domains' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_inactive_storagepools' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_networks' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_nodedevs' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_nwfilters' => 'libvirt-php/libvirt-php.php', + 'libvirt_list_storagepools' => 'libvirt-php/libvirt-php.php', + 'libvirt_logfile_set' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_define_xml' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_active' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_autostart' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_bridge' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_information' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_uuid' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_uuid_string' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_get_xml_desc' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_set_active' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_set_autostart' => 'libvirt-php/libvirt-php.php', + 'libvirt_network_undefine' => 'libvirt-php/libvirt-php.php', + 'libvirt_node_get_cpu_stats' => 'libvirt-php/libvirt-php.php', + 'libvirt_node_get_cpu_stats_for_each_cpu' => 'libvirt-php/libvirt-php.php', + 'libvirt_node_get_free_memory' => 'libvirt-php/libvirt-php.php', + 'libvirt_node_get_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_node_get_mem_stats' => 'libvirt-php/libvirt-php.php', + 'libvirt_nodedev_capabilities' => 'libvirt-php/libvirt-php.php', + 'libvirt_nodedev_get' => 'libvirt-php/libvirt-php.php', + 'libvirt_nodedev_get_information' => 'libvirt-php/libvirt-php.php', + 'libvirt_nodedev_get_xml_desc' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_define_xml' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_get_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_get_uuid' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_get_uuid_string' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_get_xml_desc' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_lookup_by_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_lookup_by_uuid_string' => 'libvirt-php/libvirt-php.php', + 'libvirt_nwfilter_undefine' => 'libvirt-php/libvirt-php.php', + 'libvirt_print_binding_resources' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_build' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_create' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_define_xml' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_delete' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_destroy' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_get_autostart' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_get_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_get_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_get_uuid_string' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_get_volume_count' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_get_xml_desc' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_is_active' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_list_volumes' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_lookup_by_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_lookup_by_uuid_string' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_lookup_by_volume' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_refresh' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_set_autostart' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagepool_undefine' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_create_xml' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_create_xml_from' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_delete' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_download' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_get_info' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_get_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_get_path' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_get_xml_desc' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_lookup_by_name' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_lookup_by_path' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_resize' => 'libvirt-php/libvirt-php.php', + 'libvirt_storagevolume_upload' => 'libvirt-php/libvirt-php.php', + 'libvirt_stream_abort' => 'libvirt-php/libvirt-php.php', + 'libvirt_stream_close' => 'libvirt-php/libvirt-php.php', + 'libvirt_stream_create' => 'libvirt-php/libvirt-php.php', + 'libvirt_stream_finish' => 'libvirt-php/libvirt-php.php', + 'libvirt_stream_recv' => 'libvirt-php/libvirt-php.php', + 'libvirt_stream_send' => 'libvirt-php/libvirt-php.php', + 'libvirt_version' => 'libvirt-php/libvirt-php.php', 'libxml_clear_errors' => 'libxml/libxml.php', 'libxml_disable_entity_loader' => 'libxml/libxml.php', 'libxml_get_errors' => 'libxml/libxml.php', + 'libxml_get_external_entity_loader' => 'libxml/libxml.php', 'libxml_get_last_error' => 'libxml/libxml.php', 'libxml_set_external_entity_loader' => 'libxml/libxml.php', 'libxml_set_streams_context' => 'libxml/libxml.php', @@ -2852,6 +3649,9 @@ final class PhpStormStubsMap 'long2ip' => 'standard/standard_3.php', 'lstat' => 'standard/standard_7.php', 'ltrim' => 'standard/standard_1.php', + 'lzf_compress' => 'lzf/lzf.php', + 'lzf_decompress' => 'lzf/lzf.php', + 'lzf_optimized_for' => 'lzf/lzf.php', 'magic_quotes_runtime' => 'standard/standard_3.php', 'mail' => 'standard/standard_7.php', 'mailparse_determine_best_xfer_encoding' => 'mailparse/mailparse.php', @@ -3007,6 +3807,7 @@ final class PhpStormStubsMap 'meminfo_dump' => 'meminfo/meminfo.php', 'memory_get_peak_usage' => 'standard/standard_4.php', 'memory_get_usage' => 'standard/standard_4.php', + 'memory_reset_peak_usage' => 'standard/standard_4.php', 'metaphone' => 'standard/standard_8.php', 'method_exists' => 'Core/Core.php', 'mhash' => 'hash/hash.php', @@ -3109,9 +3910,9 @@ final class PhpStormStubsMap 'mssql_result' => 'mssql/mssql.php', 'mssql_rows_affected' => 'mssql/mssql.php', 'mssql_select_db' => 'mssql/mssql.php', - 'mt_getrandmax' => 'standard/standard_2.php', - 'mt_rand' => 'standard/standard_2.php', - 'mt_srand' => 'standard/standard_2.php', + 'mt_getrandmax' => 'random/random.php', + 'mt_rand' => 'random/random.php', + 'mt_srand' => 'random/random.php', 'mysql' => 'mysql/mysql.php', 'mysql_affected_rows' => 'mysql/mysql.php', 'mysql_client_encoding' => 'mysql/mysql.php', @@ -3196,10 +3997,12 @@ final class PhpStormStubsMap 'mysqli_error_list' => 'mysqli/mysqli.php', 'mysqli_escape_string' => 'mysqli/mysqli.php', 'mysqli_execute' => 'mysqli/mysqli.php', + 'mysqli_execute_query' => 'mysqli/mysqli.php', 'mysqli_fetch' => 'mysqli/mysqli.php', 'mysqli_fetch_all' => 'mysqli/mysqli.php', 'mysqli_fetch_array' => 'mysqli/mysqli.php', 'mysqli_fetch_assoc' => 'mysqli/mysqli.php', + 'mysqli_fetch_column' => 'mysqli/mysqli.php', 'mysqli_fetch_field' => 'mysqli/mysqli.php', 'mysqli_fetch_field_direct' => 'mysqli/mysqli.php', 'mysqli_fetch_fields' => 'mysqli/mysqli.php', @@ -3451,10 +4254,15 @@ final class PhpStormStubsMap 'ncurses_wstandout' => 'ncurses/ncurses.php', 'ncurses_wvline' => 'ncurses/ncurses.php', 'net_get_interfaces' => 'standard/standard_4.php', + 'newrelic_accept_distributed_trace_headers' => 'newrelic/newrelic.php', + 'newrelic_accept_distributed_trace_payload' => 'newrelic/newrelic.php', + 'newrelic_accept_distributed_trace_payload_httpsafe' => 'newrelic/newrelic.php', 'newrelic_add_custom_parameter' => 'newrelic/newrelic.php', + 'newrelic_add_custom_span_parameter' => 'newrelic/newrelic.php', 'newrelic_add_custom_tracer' => 'newrelic/newrelic.php', 'newrelic_background_job' => 'newrelic/newrelic.php', 'newrelic_capture_params' => 'newrelic/newrelic.php', + 'newrelic_create_distributed_trace_payload' => 'newrelic/newrelic.php', 'newrelic_custom_metric' => 'newrelic/newrelic.php', 'newrelic_disable_autorum' => 'newrelic/newrelic.php', 'newrelic_enable_params' => 'newrelic/newrelic.php', @@ -3462,11 +4270,16 @@ final class PhpStormStubsMap 'newrelic_end_transaction' => 'newrelic/newrelic.php', 'newrelic_get_browser_timing_footer' => 'newrelic/newrelic.php', 'newrelic_get_browser_timing_header' => 'newrelic/newrelic.php', + 'newrelic_get_linking_metadata' => 'newrelic/newrelic.php', + 'newrelic_get_trace_metadata' => 'newrelic/newrelic.php', 'newrelic_ignore_apdex' => 'newrelic/newrelic.php', 'newrelic_ignore_transaction' => 'newrelic/newrelic.php', + 'newrelic_insert_distributed_trace_headers' => 'newrelic/newrelic.php', + 'newrelic_is_sampled' => 'newrelic/newrelic.php', 'newrelic_name_transaction' => 'newrelic/newrelic.php', 'newrelic_notice_error' => 'newrelic/newrelic.php', 'newrelic_record_custom_event' => 'newrelic/newrelic.php', + 'newrelic_record_datastore_segment' => 'newrelic/newrelic.php', 'newrelic_set_appname' => 'newrelic/newrelic.php', 'newrelic_set_user_attributes' => 'newrelic/newrelic.php', 'newrelic_start_transaction' => 'newrelic/newrelic.php', @@ -3474,6 +4287,7 @@ final class PhpStormStubsMap 'ngettext' => 'gettext/gettext.php', 'nl2br' => 'standard/standard_1.php', 'nl_langinfo' => 'standard/standard_2.php', + 'normalizer_get_raw_decomposition' => 'intl/intl.php', 'normalizer_is_normalized' => 'intl/intl.php', 'normalizer_normalize' => 'intl/intl.php', 'number_format' => 'standard/standard_3.php', @@ -3558,8 +4372,10 @@ final class PhpStormStubsMap 'oci_rollback' => 'oci8/oci8.php', 'oci_server_version' => 'oci8/oci8.php', 'oci_set_action' => 'oci8/oci8.php', + 'oci_set_call_timeout' => 'oci8/oci8v3.php', 'oci_set_client_identifier' => 'oci8/oci8.php', 'oci_set_client_info' => 'oci8/oci8.php', + 'oci_set_db_operation' => 'oci8/oci8v3.php', 'oci_set_edition' => 'oci8/oci8.php', 'oci_set_module_name' => 'oci8/oci8.php', 'oci_set_prefetch' => 'oci8/oci8.php', @@ -3670,6 +4486,12 @@ final class PhpStormStubsMap 'opendir' => 'standard/standard_7.php', 'openlog' => 'standard/standard_7.php', 'openssl_cipher_iv_length' => 'openssl/openssl.php', + 'openssl_cipher_key_length' => 'openssl/openssl.php', + 'openssl_cms_decrypt' => 'openssl/openssl.php', + 'openssl_cms_encrypt' => 'openssl/openssl.php', + 'openssl_cms_read' => 'openssl/openssl.php', + 'openssl_cms_sign' => 'openssl/openssl.php', + 'openssl_cms_verify' => 'openssl/openssl.php', 'openssl_csr_export' => 'openssl/openssl.php', 'openssl_csr_export_to_file' => 'openssl/openssl.php', 'openssl_csr_get_public_key' => 'openssl/openssl.php', @@ -3742,6 +4564,8 @@ final class PhpStormStubsMap 'output_cache_stop' => 'zend/zend.php', 'output_reset_rewrite_vars' => 'standard/standard_9.php', 'pack' => 'standard/standard_7.php', + 'pam_auth' => 'pam/pam.php', + 'pam_chpass' => 'pam/pam.php', 'parallel\\bootstrap' => 'parallel/parallel.php', 'parallel\\count' => 'parallel/parallel.php', 'parallel\\run' => 'parallel/parallel.php', @@ -3801,6 +4625,7 @@ final class PhpStormStubsMap 'pg_connection_busy' => 'pgsql/pgsql.php', 'pg_connection_reset' => 'pgsql/pgsql.php', 'pg_connection_status' => 'pgsql/pgsql.php', + 'pg_consume_input' => 'pgsql/pgsql.php', 'pg_convert' => 'pgsql/pgsql.php', 'pg_copy_from' => 'pgsql/pgsql.php', 'pg_copy_to' => 'pgsql/pgsql.php', @@ -3835,6 +4660,7 @@ final class PhpStormStubsMap 'pg_fieldprtlen' => 'pgsql/pgsql.php', 'pg_fieldsize' => 'pgsql/pgsql.php', 'pg_fieldtype' => 'pgsql/pgsql.php', + 'pg_flush' => 'pgsql/pgsql.php', 'pg_free_result' => 'pgsql/pgsql.php', 'pg_freeresult' => 'pgsql/pgsql.php', 'pg_get_notify' => 'pgsql/pgsql.php', @@ -3855,6 +4681,7 @@ final class PhpStormStubsMap 'pg_lo_read_all' => 'pgsql/pgsql.php', 'pg_lo_seek' => 'pgsql/pgsql.php', 'pg_lo_tell' => 'pgsql/pgsql.php', + 'pg_lo_truncate' => 'pgsql/pgsql.php', 'pg_lo_unlink' => 'pgsql/pgsql.php', 'pg_lo_write' => 'pgsql/pgsql.php', 'pg_loclose' => 'pgsql/pgsql.php', @@ -3910,6 +4737,17 @@ final class PhpStormStubsMap 'php_strip_whitespace' => 'standard/standard_4.php', 'php_uname' => 'standard/standard_0.php', 'phpcredits' => 'standard/standard_0.php', + 'phpdbg_break_file' => 'phpdbg/phpdbg.php', + 'phpdbg_break_function' => 'phpdbg/phpdbg.php', + 'phpdbg_break_method' => 'phpdbg/phpdbg.php', + 'phpdbg_break_next' => 'phpdbg/phpdbg.php', + 'phpdbg_clear' => 'phpdbg/phpdbg.php', + 'phpdbg_color' => 'phpdbg/phpdbg.php', + 'phpdbg_end_oplog' => 'phpdbg/phpdbg.php', + 'phpdbg_exec' => 'phpdbg/phpdbg.php', + 'phpdbg_get_executable' => 'phpdbg/phpdbg.php', + 'phpdbg_prompt' => 'phpdbg/phpdbg.php', + 'phpdbg_start_oplog' => 'phpdbg/phpdbg.php', 'phpinfo' => 'standard/standard_0.php', 'phpversion' => 'standard/standard_0.php', 'pi' => 'standard/standard_3.php', @@ -3957,6 +4795,7 @@ final class PhpStormStubsMap 'preg_filter' => 'pcre/pcre.php', 'preg_grep' => 'pcre/pcre.php', 'preg_last_error' => 'pcre/pcre.php', + 'preg_last_error_msg' => 'pcre/pcre.php', 'preg_match' => 'pcre/pcre.php', 'preg_match_all' => 'pcre/pcre.php', 'preg_quote' => 'pcre/pcre.php', @@ -4003,9 +4842,9 @@ final class PhpStormStubsMap 'radius_close' => 'radius/radius.php', 'radius_config' => 'radius/radius.php', 'radius_create_request' => 'radius/radius.php', - 'rand' => 'standard/standard_2.php', - 'random_bytes' => 'standard/CSPRNG.php', - 'random_int' => 'standard/CSPRNG.php', + 'rand' => 'random/random.php', + 'random_bytes' => 'random/random.php', + 'random_int' => 'random/random.php', 'range' => 'standard/standard_8.php', 'rawurldecode' => 'standard/standard_2.php', 'rawurlencode' => 'standard/standard_2.php', @@ -4057,6 +4896,10 @@ final class PhpStormStubsMap 'rewinddir' => 'standard/standard_7.php', 'rmdir' => 'standard/standard_5.php', 'round' => 'standard/standard_3.php', + 'rpmdbinfo' => 'rpminfo/rpminfo.php', + 'rpmdbsearch' => 'rpminfo/rpminfo.php', + 'rpminfo' => 'rpminfo/rpminfo.php', + 'rpmvercmp' => 'rpminfo/rpminfo.php', 'rrd_create' => 'rrd/rrd.php', 'rrd_disconnect' => 'rrd/rrd.php', 'rrd_error' => 'rrd/rrd.php', @@ -4078,6 +4921,8 @@ final class PhpStormStubsMap 'sapi_windows_cp_get' => 'standard/basic.php', 'sapi_windows_cp_is_utf8' => 'standard/basic.php', 'sapi_windows_cp_set' => 'standard/basic.php', + 'sapi_windows_generate_ctrl_event' => 'standard/basic.php', + 'sapi_windows_set_ctrl_handler' => 'standard/basic.php', 'sapi_windows_vt100_support' => 'standard/basic.php', 'scandir' => 'standard/standard_7.php', 'sem_acquire' => 'sysvsem/sysvsem.php', @@ -4149,6 +4994,8 @@ final class PhpStormStubsMap 'sinh' => 'standard/standard_3.php', 'sizeof' => 'standard/standard_9.php', 'sleep' => 'standard/standard_0.php', + 'snappy_compress' => 'snappy/snappy/snappy.php', + 'snappy_uncompress' => 'snappy/snappy/snappy.php', 'snmp2_get' => 'snmp/snmp.php', 'snmp2_getnext' => 'snmp/snmp.php', 'snmp2_real_walk' => 'snmp/snmp.php', @@ -4212,6 +5059,9 @@ final class PhpStormStubsMap 'socket_shutdown' => 'sockets/sockets.php', 'socket_strerror' => 'sockets/sockets.php', 'socket_write' => 'sockets/sockets.php', + 'socket_wsaprotocol_info_export' => 'sockets/sockets.php', + 'socket_wsaprotocol_info_import' => 'sockets/sockets.php', + 'socket_wsaprotocol_info_release' => 'sockets/sockets.php', 'sodium_add' => 'sodium/sodium.php', 'sodium_base642bin' => 'sodium/sodium.php', 'sodium_bin2base64' => 'sodium/sodium.php', @@ -4243,6 +5093,19 @@ final class PhpStormStubsMap 'sodium_crypto_box_seal_open' => 'sodium/sodium.php', 'sodium_crypto_box_secretkey' => 'sodium/sodium.php', 'sodium_crypto_box_seed_keypair' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_add' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_from_hash' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_is_valid_point' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_random' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_add' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_complement' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_invert' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_mul' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_negate' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_random' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_reduce' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_scalar_sub' => 'sodium/sodium.php', + 'sodium_crypto_core_ristretto255_sub' => 'sodium/sodium.php', 'sodium_crypto_generichash' => 'sodium/sodium.php', 'sodium_crypto_generichash_final' => 'sodium/sodium.php', 'sodium_crypto_generichash_init' => 'sodium/sodium.php', @@ -4266,6 +5129,8 @@ final class PhpStormStubsMap 'sodium_crypto_pwhash_str_verify' => 'sodium/sodium.php', 'sodium_crypto_scalarmult' => 'sodium/sodium.php', 'sodium_crypto_scalarmult_base' => 'sodium/sodium.php', + 'sodium_crypto_scalarmult_ristretto255' => 'sodium/sodium.php', + 'sodium_crypto_scalarmult_ristretto255_base' => 'sodium/sodium.php', 'sodium_crypto_secretbox' => 'sodium/sodium.php', 'sodium_crypto_secretbox_keygen' => 'sodium/sodium.php', 'sodium_crypto_secretbox_open' => 'sodium/sodium.php', @@ -4291,6 +5156,10 @@ final class PhpStormStubsMap 'sodium_crypto_sign_verify_detached' => 'sodium/sodium.php', 'sodium_crypto_stream' => 'sodium/sodium.php', 'sodium_crypto_stream_keygen' => 'sodium/sodium.php', + 'sodium_crypto_stream_xchacha20' => 'sodium/sodium.php', + 'sodium_crypto_stream_xchacha20_keygen' => 'sodium/sodium.php', + 'sodium_crypto_stream_xchacha20_xor' => 'sodium/sodium.php', + 'sodium_crypto_stream_xchacha20_xor_ic' => 'sodium/sodium.php', 'sodium_crypto_stream_xor' => 'sodium/sodium.php', 'sodium_hex2bin' => 'sodium/sodium.php', 'sodium_increment' => 'sodium/sodium.php', @@ -4386,7 +5255,7 @@ final class PhpStormStubsMap 'sqlsrv_send_stream_data' => 'sqlsrv/sqlsrv.php', 'sqlsrv_server_info' => 'sqlsrv/sqlsrv.php', 'sqrt' => 'standard/standard_3.php', - 'srand' => 'standard/standard_2.php', + 'srand' => 'random/random.php', 'sscanf' => 'standard/standard_2.php', 'ssh2_auth_agent' => 'ssh2/ssh2.php', 'ssh2_auth_hostbased_file' => 'ssh2/ssh2.php', @@ -4422,6 +5291,74 @@ final class PhpStormStubsMap 'ssh2_shell' => 'ssh2/ssh2.php', 'ssh2_tunnel' => 'ssh2/ssh2.php', 'stat' => 'standard/standard_7.php', + 'stats_absolute_deviation' => 'stats/stats.php', + 'stats_cdf_beta' => 'stats/stats.php', + 'stats_cdf_binomial' => 'stats/stats.php', + 'stats_cdf_cauchy' => 'stats/stats.php', + 'stats_cdf_chisquare' => 'stats/stats.php', + 'stats_cdf_exponential' => 'stats/stats.php', + 'stats_cdf_f' => 'stats/stats.php', + 'stats_cdf_gamma' => 'stats/stats.php', + 'stats_cdf_laplace' => 'stats/stats.php', + 'stats_cdf_logistic' => 'stats/stats.php', + 'stats_cdf_negative_binomial' => 'stats/stats.php', + 'stats_cdf_noncentral_chisquare' => 'stats/stats.php', + 'stats_cdf_noncentral_f' => 'stats/stats.php', + 'stats_cdf_noncentral_t' => 'stats/stats.php', + 'stats_cdf_normal' => 'stats/stats.php', + 'stats_cdf_poisson' => 'stats/stats.php', + 'stats_cdf_t' => 'stats/stats.php', + 'stats_cdf_uniform' => 'stats/stats.php', + 'stats_cdf_weibull' => 'stats/stats.php', + 'stats_covariance' => 'stats/stats.php', + 'stats_dens_beta' => 'stats/stats.php', + 'stats_dens_cauchy' => 'stats/stats.php', + 'stats_dens_chisquare' => 'stats/stats.php', + 'stats_dens_exponential' => 'stats/stats.php', + 'stats_dens_f' => 'stats/stats.php', + 'stats_dens_gamma' => 'stats/stats.php', + 'stats_dens_laplace' => 'stats/stats.php', + 'stats_dens_logistic' => 'stats/stats.php', + 'stats_dens_normal' => 'stats/stats.php', + 'stats_dens_pmf_binomial' => 'stats/stats.php', + 'stats_dens_pmf_hypergeometric' => 'stats/stats.php', + 'stats_dens_pmf_negative_binomial' => 'stats/stats.php', + 'stats_dens_pmf_poisson' => 'stats/stats.php', + 'stats_dens_t' => 'stats/stats.php', + 'stats_dens_uniform' => 'stats/stats.php', + 'stats_dens_weibull' => 'stats/stats.php', + 'stats_harmonic_mean' => 'stats/stats.php', + 'stats_kurtosis' => 'stats/stats.php', + 'stats_rand_gen_beta' => 'stats/stats.php', + 'stats_rand_gen_chisquare' => 'stats/stats.php', + 'stats_rand_gen_exponential' => 'stats/stats.php', + 'stats_rand_gen_f' => 'stats/stats.php', + 'stats_rand_gen_funiform' => 'stats/stats.php', + 'stats_rand_gen_gamma' => 'stats/stats.php', + 'stats_rand_gen_ibinomial' => 'stats/stats.php', + 'stats_rand_gen_ibinomial_negative' => 'stats/stats.php', + 'stats_rand_gen_int' => 'stats/stats.php', + 'stats_rand_gen_ipoisson' => 'stats/stats.php', + 'stats_rand_gen_iuniform' => 'stats/stats.php', + 'stats_rand_gen_noncentral_f' => 'stats/stats.php', + 'stats_rand_gen_noncentral_t' => 'stats/stats.php', + 'stats_rand_gen_normal' => 'stats/stats.php', + 'stats_rand_gen_t' => 'stats/stats.php', + 'stats_rand_get_seeds' => 'stats/stats.php', + 'stats_rand_phrase_to_seeds' => 'stats/stats.php', + 'stats_rand_ranf' => 'stats/stats.php', + 'stats_rand_setall' => 'stats/stats.php', + 'stats_skew' => 'stats/stats.php', + 'stats_standard_deviation' => 'stats/stats.php', + 'stats_stat_binomial_coef' => 'stats/stats.php', + 'stats_stat_correlation' => 'stats/stats.php', + 'stats_stat_factorial' => 'stats/stats.php', + 'stats_stat_independent_t' => 'stats/stats.php', + 'stats_stat_innerproduct' => 'stats/stats.php', + 'stats_stat_paired_t' => 'stats/stats.php', + 'stats_stat_percentile' => 'stats/stats.php', + 'stats_stat_powersum' => 'stats/stats.php', + 'stats_variance' => 'stats/stats.php', 'stomp_abort' => 'stomp/stomp.php', 'stomp_ack' => 'stomp/stomp.php', 'stomp_begin' => 'stomp/stomp.php', @@ -4438,6 +5375,8 @@ final class PhpStormStubsMap 'stomp_subscribe' => 'stomp/stomp.php', 'stomp_unsubscribe' => 'stomp/stomp.php', 'stomp_version' => 'stomp/stomp.php', + 'str_contains' => 'Core/Core.php', + 'str_ends_with' => 'Core/Core.php', 'str_getcsv' => 'standard/standard_2.php', 'str_ireplace' => 'standard/standard_1.php', 'str_pad' => 'standard/standard_2.php', @@ -4446,6 +5385,7 @@ final class PhpStormStubsMap 'str_rot13' => 'standard/standard_9.php', 'str_shuffle' => 'standard/standard_1.php', 'str_split' => 'standard/standard_1.php', + 'str_starts_with' => 'Core/Core.php', 'str_word_count' => 'standard/standard_1.php', 'strcasecmp' => 'Core/Core.php', 'strchr' => 'standard/standard_2.php', @@ -4587,6 +5527,60 @@ final class PhpStormStubsMap 'svn_switch' => 'svn/svn.php', 'svn_unlock' => 'svn/svn.php', 'svn_update' => 'svn/svn.php', + 'swoole_async_dns_lookup_coro' => 'swoole/functions.php', + 'swoole_async_set' => 'swoole/functions.php', + 'swoole_clear_dns_cache' => 'swoole/functions.php', + 'swoole_clear_error' => 'swoole/functions.php', + 'swoole_client_select' => 'swoole/functions.php', + 'swoole_coroutine_create' => 'swoole/functions.php', + 'swoole_coroutine_defer' => 'swoole/functions.php', + 'swoole_coroutine_socketpair' => 'swoole/functions.php', + 'swoole_cpu_num' => 'swoole/functions.php', + 'swoole_errno' => 'swoole/functions.php', + 'swoole_error_log' => 'swoole/functions.php', + 'swoole_error_log_ex' => 'swoole/functions.php', + 'swoole_event_add' => 'swoole/functions.php', + 'swoole_event_cycle' => 'swoole/functions.php', + 'swoole_event_defer' => 'swoole/functions.php', + 'swoole_event_del' => 'swoole/functions.php', + 'swoole_event_dispatch' => 'swoole/functions.php', + 'swoole_event_exit' => 'swoole/functions.php', + 'swoole_event_isset' => 'swoole/functions.php', + 'swoole_event_set' => 'swoole/functions.php', + 'swoole_event_wait' => 'swoole/functions.php', + 'swoole_event_write' => 'swoole/functions.php', + 'swoole_get_local_ip' => 'swoole/functions.php', + 'swoole_get_local_mac' => 'swoole/functions.php', + 'swoole_get_mime_type' => 'swoole/functions.php', + 'swoole_get_object_by_handle' => 'swoole/functions.php', + 'swoole_get_objects' => 'swoole/functions.php', + 'swoole_get_vm_status' => 'swoole/functions.php', + 'swoole_hashcode' => 'swoole/functions.php', + 'swoole_ignore_error' => 'swoole/functions.php', + 'swoole_internal_call_user_shutdown_begin' => 'swoole/functions.php', + 'swoole_last_error' => 'swoole/functions.php', + 'swoole_mime_type_add' => 'swoole/functions.php', + 'swoole_mime_type_delete' => 'swoole/functions.php', + 'swoole_mime_type_exists' => 'swoole/functions.php', + 'swoole_mime_type_get' => 'swoole/functions.php', + 'swoole_mime_type_list' => 'swoole/functions.php', + 'swoole_mime_type_set' => 'swoole/functions.php', + 'swoole_select' => 'swoole/functions.php', + 'swoole_set_process_name' => 'swoole/functions.php', + 'swoole_strerror' => 'swoole/functions.php', + 'swoole_substr_json_decode' => 'swoole/functions.php', + 'swoole_substr_unserialize' => 'swoole/functions.php', + 'swoole_test_kernel_coroutine' => 'swoole/functions.php', + 'swoole_timer_after' => 'swoole/functions.php', + 'swoole_timer_clear' => 'swoole/functions.php', + 'swoole_timer_clear_all' => 'swoole/functions.php', + 'swoole_timer_exists' => 'swoole/functions.php', + 'swoole_timer_info' => 'swoole/functions.php', + 'swoole_timer_list' => 'swoole/functions.php', + 'swoole_timer_set' => 'swoole/functions.php', + 'swoole_timer_stats' => 'swoole/functions.php', + 'swoole_timer_tick' => 'swoole/functions.php', + 'swoole_version' => 'swoole/functions.php', 'sybase_affected_rows' => 'sybase/sybase_ct.php', 'sybase_close' => 'sybase/sybase_ct.php', 'sybase_connect' => 'sybase/sybase_ct.php', @@ -4683,6 +5677,8 @@ final class PhpStormStubsMap 'unserialize' => 'standard/standard_4.php', 'uopz_add_function' => 'uopz/uopz.php', 'uopz_allow_exit' => 'uopz/uopz.php', + 'uopz_call_user_func' => 'uopz/uopz.php', + 'uopz_call_user_func_array' => 'uopz/uopz.php', 'uopz_del_function' => 'uopz/uopz.php', 'uopz_extend' => 'uopz/uopz.php', 'uopz_flags' => 'uopz/uopz.php', @@ -4703,6 +5699,8 @@ final class PhpStormStubsMap 'uopz_unset_hook' => 'uopz/uopz.php', 'uopz_unset_mock' => 'uopz/uopz.php', 'uopz_unset_return' => 'uopz/uopz.php', + 'uploadprogress_get_contents' => 'uploadprogress/uploadprogress.php', + 'uploadprogress_get_info' => 'uploadprogress/uploadprogress.php', 'urldecode' => 'standard/standard_2.php', 'urlencode' => 'standard/standard_2.php', 'use_soap_error_handler' => 'soap/soap.php', @@ -4711,6 +5709,18 @@ final class PhpStormStubsMap 'usort' => 'standard/standard_8.php', 'utf8_decode' => 'standard/basic.php', 'utf8_encode' => 'standard/basic.php', + 'uuid_compare' => 'uuid/uuid_c.php', + 'uuid_create' => 'uuid/uuid_c.php', + 'uuid_generate_md5' => 'uuid/uuid_c.php', + 'uuid_generate_sha1' => 'uuid/uuid_c.php', + 'uuid_is_null' => 'uuid/uuid_c.php', + 'uuid_is_valid' => 'uuid/uuid_c.php', + 'uuid_mac' => 'uuid/uuid_c.php', + 'uuid_parse' => 'uuid/uuid_c.php', + 'uuid_time' => 'uuid/uuid_c.php', + 'uuid_type' => 'uuid/uuid_c.php', + 'uuid_unparse' => 'uuid/uuid_c.php', + 'uuid_variant' => 'uuid/uuid_c.php', 'uv_accept' => 'uv/uv_functions.php', 'uv_ares_init_options' => 'uv/uv_functions.php', 'uv_async_init' => 'uv/uv_functions.php', @@ -5067,6 +6077,7 @@ final class PhpStormStubsMap 'xdebug_call_line' => 'xdebug/xdebug.php', 'xdebug_clear_aggr_profiling_data' => 'xdebug/xdebug.php', 'xdebug_code_coverage_started' => 'xdebug/xdebug.php', + 'xdebug_connect_to_client' => 'xdebug/xdebug.php', 'xdebug_debug_zval' => 'xdebug/xdebug.php', 'xdebug_debug_zval_stdout' => 'xdebug/xdebug.php', 'xdebug_disable' => 'xdebug/xdebug.php', @@ -5079,25 +6090,52 @@ final class PhpStormStubsMap 'xdebug_get_formatted_function_stack' => 'xdebug/xdebug.php', 'xdebug_get_function_count' => 'xdebug/xdebug.php', 'xdebug_get_function_stack' => 'xdebug/xdebug.php', + 'xdebug_get_gc_run_count' => 'xdebug/xdebug.php', + 'xdebug_get_gc_total_collected_roots' => 'xdebug/xdebug.php', + 'xdebug_get_gcstats_filename' => 'xdebug/xdebug.php', 'xdebug_get_headers' => 'xdebug/xdebug.php', 'xdebug_get_monitored_functions' => 'xdebug/xdebug.php', 'xdebug_get_profiler_filename' => 'xdebug/xdebug.php', 'xdebug_get_stack_depth' => 'xdebug/xdebug.php', 'xdebug_get_tracefile_name' => 'xdebug/xdebug.php', + 'xdebug_info' => 'xdebug/xdebug.php', + 'xdebug_is_debugger_active' => 'xdebug/xdebug.php', 'xdebug_is_enabled' => 'xdebug/xdebug.php', 'xdebug_memory_usage' => 'xdebug/xdebug.php', + 'xdebug_notify' => 'xdebug/xdebug.php', 'xdebug_peak_memory_usage' => 'xdebug/xdebug.php', 'xdebug_print_function_stack' => 'xdebug/xdebug.php', + 'xdebug_set_filter' => 'xdebug/xdebug.php', 'xdebug_start_code_coverage' => 'xdebug/xdebug.php', 'xdebug_start_error_collection' => 'xdebug/xdebug.php', 'xdebug_start_function_monitor' => 'xdebug/xdebug.php', + 'xdebug_start_gcstats' => 'xdebug/xdebug.php', 'xdebug_start_trace' => 'xdebug/xdebug.php', 'xdebug_stop_code_coverage' => 'xdebug/xdebug.php', 'xdebug_stop_error_collection' => 'xdebug/xdebug.php', 'xdebug_stop_function_monitor' => 'xdebug/xdebug.php', + 'xdebug_stop_gcstats' => 'xdebug/xdebug.php', 'xdebug_stop_trace' => 'xdebug/xdebug.php', 'xdebug_time_index' => 'xdebug/xdebug.php', 'xdebug_var_dump' => 'xdebug/xdebug.php', + 'xdiff_file_bdiff' => 'xdiff/xdiff.php', + 'xdiff_file_bdiff_size' => 'xdiff/xdiff.php', + 'xdiff_file_bpatch' => 'xdiff/xdiff.php', + 'xdiff_file_diff' => 'xdiff/xdiff.php', + 'xdiff_file_diff_binary' => 'xdiff/xdiff.php', + 'xdiff_file_merge3' => 'xdiff/xdiff.php', + 'xdiff_file_patch' => 'xdiff/xdiff.php', + 'xdiff_file_patch_binary' => 'xdiff/xdiff.php', + 'xdiff_file_rabdiff' => 'xdiff/xdiff.php', + 'xdiff_string_bdiff' => 'xdiff/xdiff.php', + 'xdiff_string_bdiff_size' => 'xdiff/xdiff.php', + 'xdiff_string_bpatch' => 'xdiff/xdiff.php', + 'xdiff_string_diff' => 'xdiff/xdiff.php', + 'xdiff_string_diff_binary' => 'xdiff/xdiff.php', + 'xdiff_string_merge3' => 'xdiff/xdiff.php', + 'xdiff_string_patch' => 'xdiff/xdiff.php', + 'xdiff_string_patch_binary' => 'xdiff/xdiff.php', + 'xdiff_string_rabdiff' => 'xdiff/xdiff.php', 'xhprof_disable' => 'xhprof/xhprof.php', 'xhprof_enable' => 'xhprof/xhprof.php', 'xhprof_sample_disable' => 'xhprof/xhprof.php', @@ -5195,6 +6233,7 @@ final class PhpStormStubsMap 'zend_disk_cache_clear' => 'ZendCache/ZendCache.php', 'zend_disk_cache_delete' => 'ZendCache/ZendCache.php', 'zend_disk_cache_fetch' => 'ZendCache/ZendCache.php', + 'zend_disk_cache_info' => 'ZendCache/ZendCache.php', 'zend_disk_cache_store' => 'ZendCache/ZendCache.php', 'zend_get_id' => 'zend/zend_f.php', 'zend_is_configuration_changed' => 'ZendUtils/ZendUtils.php', @@ -5214,6 +6253,7 @@ final class PhpStormStubsMap 'zend_shm_cache_clear' => 'ZendCache/ZendCache.php', 'zend_shm_cache_delete' => 'ZendCache/ZendCache.php', 'zend_shm_cache_fetch' => 'ZendCache/ZendCache.php', + 'zend_shm_cache_info' => 'ZendCache/ZendCache.php', 'zend_shm_cache_store' => 'ZendCache/ZendCache.php', 'zend_version' => 'Core/Core.php', 'zip_close' => 'zip/zip.php', @@ -5229,6 +6269,14 @@ final class PhpStormStubsMap 'zlib_decode' => 'zlib/zlib.php', 'zlib_encode' => 'zlib/zlib.php', 'zlib_get_coding_type' => 'zlib/zlib.php', + 'zstd_compress' => 'zstd/zstd.php', + 'zstd_compress_dict' => 'zstd/zstd.php', + 'zstd_compress_usingcdict' => 'zstd/zstd.php', + 'zstd_decompress_dict' => 'zstd/zstd.php', + 'zstd_decompress_usingcdict' => 'zstd/zstd.php', + 'zstd_uncompress' => 'zstd/zstd.php', + 'zstd_uncompress_dict' => 'zstd/zstd.php', + 'zstd_uncompress_usingcdict' => 'zstd/zstd.php', ); const CONSTANTS = array ( @@ -5254,6 +6302,13 @@ final class PhpStormStubsMap 'AF_INET' => 'sockets/sockets.php', 'AF_INET6' => 'sockets/sockets.php', 'AF_UNIX' => 'sockets/sockets.php', + 'AI_ADDRCONFIG' => 'sockets/sockets.php', + 'AI_ALL' => 'sockets/sockets.php', + 'AI_CANONNAME' => 'sockets/sockets.php', + 'AI_NUMERICHOST' => 'sockets/sockets.php', + 'AI_NUMERICSERV' => 'sockets/sockets.php', + 'AI_PASSIVE' => 'sockets/sockets.php', + 'AI_V4MAPPED' => 'sockets/sockets.php', 'ALT_DIGITS' => 'standard/standard_defines.php', 'AMQP_AUTOACK' => 'amqp/amqp.php', 'AMQP_AUTODELETE' => 'amqp/amqp.php', @@ -5364,96 +6419,6 @@ final class PhpStormStubsMap 'CONNECTION_ABORTED' => 'standard/standard_defines.php', 'CONNECTION_NORMAL' => 'standard/standard_defines.php', 'CONNECTION_TIMEOUT' => 'standard/standard_defines.php', - 'COUCHBASE_AUTH_CONTINUE' => 'couchbase/toplevel.php', - 'COUCHBASE_AUTH_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_BAD_ENVIRONMENT' => 'couchbase/toplevel.php', - 'COUCHBASE_BUCKET_ENOENT' => 'couchbase/toplevel.php', - 'COUCHBASE_BUSY' => 'couchbase/toplevel.php', - 'COUCHBASE_CLIENT_ENOCONF' => 'couchbase/toplevel.php', - 'COUCHBASE_CLIENT_ENOMEM' => 'couchbase/toplevel.php', - 'COUCHBASE_CLIENT_FEATURE_UNAVAILABLE' => 'couchbase/toplevel.php', - 'COUCHBASE_CONFIG_CACHE_INVALID' => 'couchbase/toplevel.php', - 'COUCHBASE_CONNECT_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_DELTA_BADVAL' => 'couchbase/toplevel.php', - 'COUCHBASE_DLOPEN_FAILED' => 'couchbase/toplevel.php', - 'COUCHBASE_DLSYM_FAILED' => 'couchbase/toplevel.php', - 'COUCHBASE_DUPLICATE_COMMANDS' => 'couchbase/toplevel.php', - 'COUCHBASE_DURABILITY_ETOOMANY' => 'couchbase/toplevel.php', - 'COUCHBASE_DURABILITY_NO_MUTATION_TOKENS' => 'couchbase/toplevel.php', - 'COUCHBASE_E2BIG' => 'couchbase/toplevel.php', - 'COUCHBASE_EBADHANDLE' => 'couchbase/toplevel.php', - 'COUCHBASE_EBUSY' => 'couchbase/toplevel.php', - 'COUCHBASE_ECANTGETPORT' => 'couchbase/toplevel.php', - 'COUCHBASE_ECONNREFUSED' => 'couchbase/toplevel.php', - 'COUCHBASE_ECONNRESET' => 'couchbase/toplevel.php', - 'COUCHBASE_ECTL_BADARG' => 'couchbase/toplevel.php', - 'COUCHBASE_ECTL_UNKNOWN' => 'couchbase/toplevel.php', - 'COUCHBASE_ECTL_UNSUPPMODE' => 'couchbase/toplevel.php', - 'COUCHBASE_EFDLIMITREACHED' => 'couchbase/toplevel.php', - 'COUCHBASE_EINTERNAL' => 'couchbase/toplevel.php', - 'COUCHBASE_EINVAL' => 'couchbase/toplevel.php', - 'COUCHBASE_EINVAL_MCD' => 'couchbase/toplevel.php', - 'COUCHBASE_EMPTY_KEY' => 'couchbase/toplevel.php', - 'COUCHBASE_EMPTY_PATH' => 'couchbase/toplevel.php', - 'COUCHBASE_ENETUNREACH' => 'couchbase/toplevel.php', - 'COUCHBASE_ENOMEM' => 'couchbase/toplevel.php', - 'COUCHBASE_ENO_COMMANDS' => 'couchbase/toplevel.php', - 'COUCHBASE_ERANGE' => 'couchbase/toplevel.php', - 'COUCHBASE_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_ESOCKSHUTDOWN' => 'couchbase/toplevel.php', - 'COUCHBASE_ETIMEDOUT' => 'couchbase/toplevel.php', - 'COUCHBASE_ETMPFAIL' => 'couchbase/toplevel.php', - 'COUCHBASE_HTTP_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_INCOMPLETE_PACKET' => 'couchbase/toplevel.php', - 'COUCHBASE_INVALID_CHAR' => 'couchbase/toplevel.php', - 'COUCHBASE_INVALID_HOST_FORMAT' => 'couchbase/toplevel.php', - 'COUCHBASE_INVALID_USERNAME' => 'couchbase/toplevel.php', - 'COUCHBASE_KEYALREADYEXISTS' => 'couchbase/toplevel.php', - 'COUCHBASE_KEYNOTFOUND' => 'couchbase/toplevel.php', - 'COUCHBASE_KEY_EEXISTS' => 'couchbase/toplevel.php', - 'COUCHBASE_KEY_ENOENT' => 'couchbase/toplevel.php', - 'COUCHBASE_MAP_CHANGED' => 'couchbase/toplevel.php', - 'COUCHBASE_MUTATION_LOST' => 'couchbase/toplevel.php', - 'COUCHBASE_NETWORK_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_NOT_MY_VBUCKET' => 'couchbase/toplevel.php', - 'COUCHBASE_NOT_STORED' => 'couchbase/toplevel.php', - 'COUCHBASE_NOT_SUPPORTED' => 'couchbase/toplevel.php', - 'COUCHBASE_NO_MATCHING_SERVER' => 'couchbase/toplevel.php', - 'COUCHBASE_OPTIONS_CONFLICT' => 'couchbase/toplevel.php', - 'COUCHBASE_PERSISTTO_MASTER' => 'couchbase/toplevel.php', - 'COUCHBASE_PERSISTTO_ONE' => 'couchbase/toplevel.php', - 'COUCHBASE_PERSISTTO_THREE' => 'couchbase/toplevel.php', - 'COUCHBASE_PERSISTTO_TWO' => 'couchbase/toplevel.php', - 'COUCHBASE_PLUGIN_VERSION_MISMATCH' => 'couchbase/toplevel.php', - 'COUCHBASE_PROTOCOL_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_QUERY_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_REPLICATETO_ONE' => 'couchbase/toplevel.php', - 'COUCHBASE_REPLICATETO_THREE' => 'couchbase/toplevel.php', - 'COUCHBASE_REPLICATETO_TWO' => 'couchbase/toplevel.php', - 'COUCHBASE_SASLMECH_UNAVAILABLE' => 'couchbase/toplevel.php', - 'COUCHBASE_SCHEDFAIL_INTERNAL' => 'couchbase/toplevel.php', - 'COUCHBASE_SERVER_BUG' => 'couchbase/toplevel.php', - 'COUCHBASE_SSL_CANTVERIFY' => 'couchbase/toplevel.php', - 'COUCHBASE_SSL_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_BAD_DELTA' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_DOC_E2DEEP' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_DOC_NOTJSON' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_MULTI_FAILURE' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_NUM_ERANGE' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_PATH_E2BIG' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_PATH_EEXISTS' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_PATH_EINVAL' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_PATH_ENOENT' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_PATH_MISMATCH' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_VALUE_CANTINSERT' => 'couchbase/toplevel.php', - 'COUCHBASE_SUBDOC_VALUE_E2DEEP' => 'couchbase/toplevel.php', - 'COUCHBASE_SUCCESS' => 'couchbase/toplevel.php', - 'COUCHBASE_TMPFAIL' => 'couchbase/toplevel.php', - 'COUCHBASE_TOO_MANY_REDIRECTS' => 'couchbase/toplevel.php', - 'COUCHBASE_UNKNOWN_COMMAND' => 'couchbase/toplevel.php', - 'COUCHBASE_UNKNOWN_HOST' => 'couchbase/toplevel.php', - 'COUCHBASE_UNKNOWN_MEMCACHED_ERROR' => 'couchbase/toplevel.php', - 'COUCHBASE_UNKNOWN_SDCMD' => 'couchbase/toplevel.php', 'COUNT_NORMAL' => 'standard/standard_defines.php', 'COUNT_RECURSIVE' => 'standard/standard_defines.php', 'CP_ACP' => 'com_dotnet/com_dotnet.php', @@ -5496,8 +6461,13 @@ final class PhpStormStubsMap 'CUBRID_NO_MORE_DATA' => 'cubrid/cubrid.php', 'CUBRID_NUM' => 'cubrid/cubrid.php', 'CUBRID_OBJECT' => 'cubrid/cubrid.php', + 'CURLALTSVC_H1' => 'curl/curl_d.php', + 'CURLALTSVC_H2' => 'curl/curl_d.php', + 'CURLALTSVC_H3' => 'curl/curl_d.php', + 'CURLALTSVC_READONLYFILE' => 'curl/curl_d.php', 'CURLAUTH_ANY' => 'curl/curl_d.php', 'CURLAUTH_ANYSAFE' => 'curl/curl_d.php', + 'CURLAUTH_AWS_SIGV4' => 'curl/curl_d.php', 'CURLAUTH_BASIC' => 'curl/curl_d.php', 'CURLAUTH_BEARER' => 'curl/curl_d.php', 'CURLAUTH_DIGEST' => 'curl/curl_d.php', @@ -5565,6 +6535,7 @@ final class PhpStormStubsMap 'CURLE_OPERATION_TIMEOUTED' => 'curl/curl_d.php', 'CURLE_OUT_OF_MEMORY' => 'curl/curl_d.php', 'CURLE_PARTIAL_FILE' => 'curl/curl_d.php', + 'CURLE_PROXY' => 'curl/curl_d.php', 'CURLE_READ_ERROR' => 'curl/curl_d.php', 'CURLE_RECV_ERROR' => 'curl/curl_d.php', 'CURLE_SEND_ERROR' => 'curl/curl_d.php', @@ -5590,6 +6561,7 @@ final class PhpStormStubsMap 'CURLFTPAUTH_DEFAULT' => 'curl/curl_d.php', 'CURLFTPAUTH_SSL' => 'curl/curl_d.php', 'CURLFTPAUTH_TLS' => 'curl/curl_d.php', + 'CURLFTPMETHOD_DEFAULT' => 'curl/curl_d.php', 'CURLFTPMETHOD_MULTICWD' => 'curl/curl_d.php', 'CURLFTPMETHOD_NOCWD' => 'curl/curl_d.php', 'CURLFTPMETHOD_SINGLECWD' => 'curl/curl_d.php', @@ -5607,6 +6579,8 @@ final class PhpStormStubsMap 'CURLGSSAPI_DELEGATION_POLICY_FLAG' => 'curl/curl_d.php', 'CURLHEADER_SEPARATE' => 'curl/curl_d.php', 'CURLHEADER_UNIFIED' => 'curl/curl_d.php', + 'CURLHSTS_ENABLE' => 'curl/curl_d.php', + 'CURLHSTS_READONLYFILE' => 'curl/curl_d.php', 'CURLINFO_APPCONNECT_TIME' => 'curl/curl_d.php', 'CURLINFO_APPCONNECT_TIME_T' => 'curl/curl_d.php', 'CURLINFO_CERTINFO' => 'curl/curl_d.php', @@ -5619,6 +6593,7 @@ final class PhpStormStubsMap 'CURLINFO_CONTENT_LENGTH_UPLOAD_T' => 'curl/curl_d.php', 'CURLINFO_CONTENT_TYPE' => 'curl/curl_d.php', 'CURLINFO_COOKIELIST' => 'curl/curl_d.php', + 'CURLINFO_EFFECTIVE_METHOD' => 'curl/curl_d.php', 'CURLINFO_EFFECTIVE_URL' => 'curl/curl_d.php', 'CURLINFO_FILETIME' => 'curl/curl_d.php', 'CURLINFO_FILETIME_T' => 'curl/curl_d.php', @@ -5643,13 +6618,16 @@ final class PhpStormStubsMap 'CURLINFO_PRIVATE' => 'curl/curl_d.php', 'CURLINFO_PROTOCOL' => 'curl/curl_d.php', 'CURLINFO_PROXYAUTH_AVAIL' => 'curl/curl_d.php', + 'CURLINFO_PROXY_ERROR' => 'curl/curl_d.php', 'CURLINFO_PROXY_SSL_VERIFYRESULT' => 'curl/curl_d.php', 'CURLINFO_REDIRECT_COUNT' => 'curl/curl_d.php', 'CURLINFO_REDIRECT_TIME' => 'curl/curl_d.php', 'CURLINFO_REDIRECT_TIME_T' => 'curl/curl_d.php', 'CURLINFO_REDIRECT_URL' => 'curl/curl_d.php', + 'CURLINFO_REFERER' => 'curl/curl_d.php', 'CURLINFO_REQUEST_SIZE' => 'curl/curl_d.php', 'CURLINFO_RESPONSE_CODE' => 'curl/curl_d.php', + 'CURLINFO_RETRY_AFTER' => 'curl/curl_d.php', 'CURLINFO_RTSP_CLIENT_CSEQ' => 'curl/curl_d.php', 'CURLINFO_RTSP_CSEQ_RECV' => 'curl/curl_d.php', 'CURLINFO_RTSP_SERVER_CSEQ' => 'curl/curl_d.php', @@ -5672,6 +6650,7 @@ final class PhpStormStubsMap 'CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php', 'CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php', 'CURLMOPT_MAXCONNECTS' => 'curl/curl_d.php', + 'CURLMOPT_MAX_CONCURRENT_STREAMS' => 'curl/curl_d.php', 'CURLMOPT_MAX_HOST_CONNECTIONS' => 'curl/curl_d.php', 'CURLMOPT_MAX_PIPELINE_LENGTH' => 'curl/curl_d.php', 'CURLMOPT_MAX_TOTAL_CONNECTIONS' => 'curl/curl_d.php', @@ -5689,11 +6668,15 @@ final class PhpStormStubsMap 'CURLOPT_ACCEPTTIMEOUT_MS' => 'curl/curl_d.php', 'CURLOPT_ACCEPT_ENCODING' => 'curl/curl_d.php', 'CURLOPT_ADDRESS_SCOPE' => 'curl/curl_d.php', + 'CURLOPT_ALTSVC' => 'curl/curl_d.php', + 'CURLOPT_ALTSVC_CTRL' => 'curl/curl_d.php', 'CURLOPT_APPEND' => 'curl/curl_d.php', 'CURLOPT_AUTOREFERER' => 'curl/curl_d.php', + 'CURLOPT_AWS_SIGV4' => 'curl/curl_d.php', 'CURLOPT_BINARYTRANSFER' => 'curl/curl_d.php', 'CURLOPT_BUFFERSIZE' => 'curl/curl_d.php', 'CURLOPT_CAINFO' => 'curl/curl_d.php', + 'CURLOPT_CAINFO_BLOB' => 'curl/curl_d.php', 'CURLOPT_CAPATH' => 'curl/curl_d.php', 'CURLOPT_CERTINFO' => 'curl/curl_d.php', 'CURLOPT_CLOSEPOLICY' => 'curl/curl_d.php', @@ -5719,6 +6702,10 @@ final class PhpStormStubsMap 'CURLOPT_DNS_SERVERS' => 'curl/curl_d.php', 'CURLOPT_DNS_SHUFFLE_ADDRESSES' => 'curl/curl_d.php', 'CURLOPT_DNS_USE_GLOBAL_CACHE' => 'curl/curl_d.php', + 'CURLOPT_DOH_SSL_VERIFYHOST' => 'curl/curl_d.php', + 'CURLOPT_DOH_SSL_VERIFYPEER' => 'curl/curl_d.php', + 'CURLOPT_DOH_SSL_VERIFYSTATUS' => 'curl/curl_d.php', + 'CURLOPT_DOH_URL' => 'curl/curl_d.php', 'CURLOPT_EGDSOCKET' => 'curl/curl_d.php', 'CURLOPT_ENCODING' => 'curl/curl_d.php', 'CURLOPT_EXPECT_100_TIMEOUT_MS' => 'curl/curl_d.php', @@ -5751,6 +6738,9 @@ final class PhpStormStubsMap 'CURLOPT_HEADER' => 'curl/curl_d.php', 'CURLOPT_HEADERFUNCTION' => 'curl/curl_d.php', 'CURLOPT_HEADEROPT' => 'curl/curl_d.php', + 'CURLOPT_HSTS' => 'curl/curl_d.php', + 'CURLOPT_HSTS_CTRL' => 'curl/curl_d.php', + 'CURLOPT_HTTP09_ALLOWED' => 'curl/curl_d.php', 'CURLOPT_HTTP200ALIASES' => 'curl/curl_d.php', 'CURLOPT_HTTPAUTH' => 'curl/curl_d.php', 'CURLOPT_HTTPGET' => 'curl/curl_d.php', @@ -5765,6 +6755,7 @@ final class PhpStormStubsMap 'CURLOPT_INTERFACE' => 'curl/curl_d.php', 'CURLOPT_IPRESOLVE' => 'curl/curl_d.php', 'CURLOPT_ISSUERCERT' => 'curl/curl_d.php', + 'CURLOPT_ISSUERCERT_BLOB' => 'curl/curl_d.php', 'CURLOPT_KEEP_SENDING_ON_ERROR' => 'curl/curl_d.php', 'CURLOPT_KEYPASSWD' => 'curl/curl_d.php', 'CURLOPT_KRB4LEVEL' => 'curl/curl_d.php', @@ -5777,8 +6768,12 @@ final class PhpStormStubsMap 'CURLOPT_MAIL_AUTH' => 'curl/curl_d.php', 'CURLOPT_MAIL_FROM' => 'curl/curl_d.php', 'CURLOPT_MAIL_RCPT' => 'curl/curl_d.php', + 'CURLOPT_MAIL_RCPT_ALLLOWFAILS' => 'curl/curl_d.php', + 'CURLOPT_MAXAGE_CONN' => 'curl/curl_d.php', 'CURLOPT_MAXCONNECTS' => 'curl/curl_d.php', 'CURLOPT_MAXFILESIZE' => 'curl/curl_d.php', + 'CURLOPT_MAXFILESIZE_LARGE' => 'curl/curl_d.php', + 'CURLOPT_MAXLIFETIME_CONN' => 'curl/curl_d.php', 'CURLOPT_MAXREDIRS' => 'curl/curl_d.php', 'CURLOPT_MAX_RECV_SPEED_LARGE' => 'curl/curl_d.php', 'CURLOPT_MAX_SEND_SPEED_LARGE' => 'curl/curl_d.php', @@ -5815,15 +6810,20 @@ final class PhpStormStubsMap 'CURLOPT_PROXYUSERNAME' => 'curl/curl_d.php', 'CURLOPT_PROXYUSERPWD' => 'curl/curl_d.php', 'CURLOPT_PROXY_CAINFO' => 'curl/curl_d.php', + 'CURLOPT_PROXY_CAINFO_BLOB' => 'curl/curl_d.php', 'CURLOPT_PROXY_CAPATH' => 'curl/curl_d.php', 'CURLOPT_PROXY_CRLFILE' => 'curl/curl_d.php', + 'CURLOPT_PROXY_ISSUERCERT' => 'curl/curl_d.php', + 'CURLOPT_PROXY_ISSUERCERT_BLOB' => 'curl/curl_d.php', 'CURLOPT_PROXY_KEYPASSWD' => 'curl/curl_d.php', 'CURLOPT_PROXY_PINNEDPUBLICKEY' => 'curl/curl_d.php', 'CURLOPT_PROXY_SERVICE_NAME' => 'curl/curl_d.php', 'CURLOPT_PROXY_SSLCERT' => 'curl/curl_d.php', 'CURLOPT_PROXY_SSLCERTTYPE' => 'curl/curl_d.php', + 'CURLOPT_PROXY_SSLCERT_BLOB' => 'curl/curl_d.php', 'CURLOPT_PROXY_SSLKEY' => 'curl/curl_d.php', 'CURLOPT_PROXY_SSLKEYTYPE' => 'curl/curl_d.php', + 'CURLOPT_PROXY_SSLKEY_BLOB' => 'curl/curl_d.php', 'CURLOPT_PROXY_SSLVERSION' => 'curl/curl_d.php', 'CURLOPT_PROXY_SSL_CIPHER_LIST' => 'curl/curl_d.php', 'CURLOPT_PROXY_SSL_OPTIONS' => 'curl/curl_d.php', @@ -5853,6 +6853,7 @@ final class PhpStormStubsMap 'CURLOPT_RTSP_STREAM_URI' => 'curl/curl_d.php', 'CURLOPT_RTSP_TRANSPORT' => 'curl/curl_d.php', 'CURLOPT_SAFE_UPLOAD' => 'curl/curl_d.php', + 'CURLOPT_SASL_AUTHZID' => 'curl/curl_d.php', 'CURLOPT_SASL_IR' => 'curl/curl_d.php', 'CURLOPT_SERVICE_NAME' => 'curl/curl_d.php', 'CURLOPT_SHARE' => 'curl/curl_d.php', @@ -5862,19 +6863,23 @@ final class PhpStormStubsMap 'CURLOPT_SSH_AUTH_TYPES' => 'curl/curl_d.php', 'CURLOPT_SSH_COMPRESSION' => 'curl/curl_d.php', 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' => 'curl/curl_d.php', + 'CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256' => 'curl/curl_d.php', 'CURLOPT_SSH_KNOWNHOSTS' => 'curl/curl_d.php', 'CURLOPT_SSH_PRIVATE_KEYFILE' => 'curl/curl_d.php', 'CURLOPT_SSH_PUBLIC_KEYFILE' => 'curl/curl_d.php', 'CURLOPT_SSLCERT' => 'curl/curl_d.php', 'CURLOPT_SSLCERTPASSWD' => 'curl/curl_d.php', 'CURLOPT_SSLCERTTYPE' => 'curl/curl_d.php', + 'CURLOPT_SSLCERT_BLOB' => 'curl/curl_d.php', 'CURLOPT_SSLENGINE' => 'curl/curl_d.php', 'CURLOPT_SSLENGINE_DEFAULT' => 'curl/curl_d.php', 'CURLOPT_SSLKEY' => 'curl/curl_d.php', 'CURLOPT_SSLKEYPASSWD' => 'curl/curl_d.php', 'CURLOPT_SSLKEYTYPE' => 'curl/curl_d.php', + 'CURLOPT_SSLKEY_BLOB' => 'curl/curl_d.php', 'CURLOPT_SSLVERSION' => 'curl/curl_d.php', 'CURLOPT_SSL_CIPHER_LIST' => 'curl/curl_d.php', + 'CURLOPT_SSL_EC_CURVES' => 'curl/curl_d.php', 'CURLOPT_SSL_ENABLE_ALPN' => 'curl/curl_d.php', 'CURLOPT_SSL_ENABLE_NPN' => 'curl/curl_d.php', 'CURLOPT_SSL_FALSESTART' => 'curl/curl_d.php', @@ -5907,7 +6912,9 @@ final class PhpStormStubsMap 'CURLOPT_TRANSFER_ENCODING' => 'curl/curl_d.php', 'CURLOPT_UNIX_SOCKET_PATH' => 'curl/curl_d.php', 'CURLOPT_UNRESTRICTED_AUTH' => 'curl/curl_d.php', + 'CURLOPT_UPKEEP_INTERVAL_MS' => 'curl/curl_d.php', 'CURLOPT_UPLOAD' => 'curl/curl_d.php', + 'CURLOPT_UPLOAD_BUFFERSIZE' => 'curl/curl_d.php', 'CURLOPT_URL' => 'curl/curl_d.php', 'CURLOPT_USERAGENT' => 'curl/curl_d.php', 'CURLOPT_USERNAME' => 'curl/curl_d.php', @@ -5917,6 +6924,7 @@ final class PhpStormStubsMap 'CURLOPT_WILDCARDMATCH' => 'curl/curl_d.php', 'CURLOPT_WRITEFUNCTION' => 'curl/curl_d.php', 'CURLOPT_WRITEHEADER' => 'curl/curl_d.php', + 'CURLOPT_XFERINFOFUNCTION' => 'curl/curl_d.php', 'CURLOPT_XOAUTH2_BEARER' => 'curl/curl_d.php', 'CURLPAUSE_ALL' => 'curl/curl_d.php', 'CURLPAUSE_CONT' => 'curl/curl_d.php', @@ -5939,6 +6947,7 @@ final class PhpStormStubsMap 'CURLPROTO_IMAPS' => 'curl/curl_d.php', 'CURLPROTO_LDAP' => 'curl/curl_d.php', 'CURLPROTO_LDAPS' => 'curl/curl_d.php', + 'CURLPROTO_MQTT' => 'curl/curl_d.php', 'CURLPROTO_POP3' => 'curl/curl_d.php', 'CURLPROTO_POP3S' => 'curl/curl_d.php', 'CURLPROTO_RTMP' => 'curl/curl_d.php', @@ -5963,6 +6972,40 @@ final class PhpStormStubsMap 'CURLPROXY_SOCKS4A' => 'curl/curl_d.php', 'CURLPROXY_SOCKS5' => 'curl/curl_d.php', 'CURLPROXY_SOCKS5_HOSTNAME' => 'curl/curl_d.php', + 'CURLPX_BAD_ADDRESS_TYPE' => 'curl/curl_d.php', + 'CURLPX_BAD_VERSION' => 'curl/curl_d.php', + 'CURLPX_CLOSED' => 'curl/curl_d.php', + 'CURLPX_GSSAPI' => 'curl/curl_d.php', + 'CURLPX_GSSAPI_PERMSG' => 'curl/curl_d.php', + 'CURLPX_GSSAPI_PROTECTION' => 'curl/curl_d.php', + 'CURLPX_IDENTD' => 'curl/curl_d.php', + 'CURLPX_IDENTD_DIFFER' => 'curl/curl_d.php', + 'CURLPX_LONG_HOSTNAME' => 'curl/curl_d.php', + 'CURLPX_LONG_PASSWD' => 'curl/curl_d.php', + 'CURLPX_LONG_USER' => 'curl/curl_d.php', + 'CURLPX_NO_AUTH' => 'curl/curl_d.php', + 'CURLPX_OK' => 'curl/curl_d.php', + 'CURLPX_RECV_ADDRESS' => 'curl/curl_d.php', + 'CURLPX_RECV_AUTH' => 'curl/curl_d.php', + 'CURLPX_RECV_CONNECT' => 'curl/curl_d.php', + 'CURLPX_RECV_REQACK' => 'curl/curl_d.php', + 'CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED' => 'curl/curl_d.php', + 'CURLPX_REPLY_COMMAND_NOT_SUPPORTED' => 'curl/curl_d.php', + 'CURLPX_REPLY_CONNECTION_REFUSED' => 'curl/curl_d.php', + 'CURLPX_REPLY_GENERAL_SERVER_FAILURE' => 'curl/curl_d.php', + 'CURLPX_REPLY_HOST_UNREACHABLE' => 'curl/curl_d.php', + 'CURLPX_REPLY_NETWORK_UNREACHABLE' => 'curl/curl_d.php', + 'CURLPX_REPLY_NOT_ALLOWED' => 'curl/curl_d.php', + 'CURLPX_REPLY_TTL_EXPIRED' => 'curl/curl_d.php', + 'CURLPX_REPLY_UNASSIGNED' => 'curl/curl_d.php', + 'CURLPX_REQUEST_FAILED' => 'curl/curl_d.php', + 'CURLPX_RESOLVE_HOST' => 'curl/curl_d.php', + 'CURLPX_SEND_AUTH' => 'curl/curl_d.php', + 'CURLPX_SEND_CONNECT' => 'curl/curl_d.php', + 'CURLPX_SEND_REQUEST' => 'curl/curl_d.php', + 'CURLPX_UNKNOWN_FAIL' => 'curl/curl_d.php', + 'CURLPX_UNKNOWN_MODE' => 'curl/curl_d.php', + 'CURLPX_USER_REJECTED' => 'curl/curl_d.php', 'CURLSHOPT_NONE' => 'curl/curl_d.php', 'CURLSHOPT_SHARE' => 'curl/curl_d.php', 'CURLSHOPT_UNSHARE' => 'curl/curl_d.php', @@ -5976,7 +7019,11 @@ final class PhpStormStubsMap 'CURLSSH_AUTH_PASSWORD' => 'curl/curl_d.php', 'CURLSSH_AUTH_PUBLICKEY' => 'curl/curl_d.php', 'CURLSSLOPT_ALLOW_BEAST' => 'curl/curl_d.php', + 'CURLSSLOPT_AUTO_CLIENT_CERT' => 'curl/curl_d.php', + 'CURLSSLOPT_NATIVE_CA' => 'curl/curl_d.php', + 'CURLSSLOPT_NO_PARTIALCHAIN' => 'curl/curl_d.php', 'CURLSSLOPT_NO_REVOKE' => 'curl/curl_d.php', + 'CURLSSLOPT_REVOKE_BEST_EFFORT' => 'curl/curl_d.php', 'CURLUSESSL_ALL' => 'curl/curl_d.php', 'CURLUSESSL_CONTROL' => 'curl/curl_d.php', 'CURLUSESSL_NONE' => 'curl/curl_d.php', @@ -6041,14 +7088,18 @@ final class PhpStormStubsMap 'CURL_TIMECOND_LASTMOD' => 'curl/curl_d.php', 'CURL_TIMECOND_NONE' => 'curl/curl_d.php', 'CURL_TLSAUTH_SRP' => 'curl/curl_d.php', + 'CURL_VERSION_ALTSVC' => 'curl/curl_d.php', 'CURL_VERSION_ASYNCHDNS' => 'curl/curl_d.php', 'CURL_VERSION_BROTLI' => 'curl/curl_d.php', 'CURL_VERSION_CONV' => 'curl/curl_d.php', 'CURL_VERSION_CURLDEBUG' => 'curl/curl_d.php', 'CURL_VERSION_DEBUG' => 'curl/curl_d.php', + 'CURL_VERSION_GSASL' => 'curl/curl_d.php', 'CURL_VERSION_GSSAPI' => 'curl/curl_d.php', 'CURL_VERSION_GSSNEGOTIATE' => 'curl/curl_d.php', + 'CURL_VERSION_HSTS' => 'curl/curl_d.php', 'CURL_VERSION_HTTP2' => 'curl/curl_d.php', + 'CURL_VERSION_HTTP3' => 'curl/curl_d.php', 'CURL_VERSION_HTTPS_PROXY' => 'curl/curl_d.php', 'CURL_VERSION_IDN' => 'curl/curl_d.php', 'CURL_VERSION_IPV6' => 'curl/curl_d.php', @@ -6064,20 +7115,15 @@ final class PhpStormStubsMap 'CURL_VERSION_SSL' => 'curl/curl_d.php', 'CURL_VERSION_SSPI' => 'curl/curl_d.php', 'CURL_VERSION_TLSAUTH_SRP' => 'curl/curl_d.php', + 'CURL_VERSION_UNICODE' => 'curl/curl_d.php', 'CURL_VERSION_UNIX_SOCKETS' => 'curl/curl_d.php', + 'CURL_VERSION_ZSTD' => 'curl/curl_d.php', 'CURL_WRITEFUNC_PAUSE' => 'curl/curl_d.php', + 'CURRENCY_SYMBOL' => 'standard/standard_defines.php', 'CYAN' => 'winbinder/winbinder.php', 'Calendar' => 'winbinder/winbinder.php', 'CheckBox' => 'winbinder/winbinder.php', 'ComboBox' => 'winbinder/winbinder.php', - 'Couchbase\\ENCODER_COMPRESSION_FASTLZ' => 'couchbase/couchbase.php', - 'Couchbase\\ENCODER_COMPRESSION_NONE' => 'couchbase/couchbase.php', - 'Couchbase\\ENCODER_COMPRESSION_ZLIB' => 'couchbase/couchbase.php', - 'Couchbase\\ENCODER_FORMAT_IGBINARY' => 'couchbase/couchbase.php', - 'Couchbase\\ENCODER_FORMAT_JSON' => 'couchbase/couchbase.php', - 'Couchbase\\ENCODER_FORMAT_PHP' => 'couchbase/couchbase.php', - 'Couchbase\\HAVE_IGBINARY' => 'couchbase/couchbase.php', - 'Couchbase\\HAVE_ZLIB' => 'couchbase/couchbase.php', 'DARKBLUE' => 'winbinder/winbinder.php', 'DARKCYAN' => 'winbinder/winbinder.php', 'DARKGRAY' => 'winbinder/winbinder.php', @@ -6088,6 +7134,7 @@ final class PhpStormStubsMap 'DATE_ATOM' => 'date/date_d.php', 'DATE_COOKIE' => 'date/date_d.php', 'DATE_ISO8601' => 'date/date_d.php', + 'DATE_ISO8601_EXPANDED' => 'date/date_d.php', 'DATE_RFC1036' => 'date/date_d.php', 'DATE_RFC1123' => 'date/date_d.php', 'DATE_RFC2822' => 'date/date_d.php', @@ -6125,8 +7172,11 @@ final class PhpStormStubsMap 'DB2_PASSTHRU' => 'ibm_db2/ibm_db2.php', 'DB2_SCROLLABLE' => 'ibm_db2/ibm_db2.php', 'DB2_XML' => 'ibm_db2/ibm_db2.php', + 'DBA_LMDB_NO_SUB_DIR' => 'dba/dba.php', + 'DBA_LMDB_USE_SUB_DIR' => 'dba/dba.php', 'DEBUG_BACKTRACE_IGNORE_ARGS' => 'Core/Core_d.php', 'DEBUG_BACKTRACE_PROVIDE_OBJECT' => 'Core/Core_d.php', + 'DECIMAL_POINT' => 'standard/standard_defines.php', 'DEFAULT_INCLUDE_PATH' => 'Core/Core_d.php', 'DIRECTORY_SEPARATOR' => 'standard/standard_defines.php', 'DISP_E_DIVBYZERO' => 'com_dotnet/com_dotnet.php', @@ -6165,6 +7215,60 @@ final class PhpStormStubsMap 'DOM_WRONG_DOCUMENT_ERR' => 'dom/dom.php', 'D_FMT' => 'standard/standard_defines.php', 'D_T_FMT' => 'standard/standard_defines.php', + 'EIO_DEBUG' => 'eio/eio.php', + 'EIO_DT_BLK' => 'eio/eio.php', + 'EIO_DT_CHR' => 'eio/eio.php', + 'EIO_DT_CMP' => 'eio/eio.php', + 'EIO_DT_DIR' => 'eio/eio.php', + 'EIO_DT_DOOR' => 'eio/eio.php', + 'EIO_DT_FIFO' => 'eio/eio.php', + 'EIO_DT_LNK' => 'eio/eio.php', + 'EIO_DT_MAX' => 'eio/eio.php', + 'EIO_DT_MPB' => 'eio/eio.php', + 'EIO_DT_MPC' => 'eio/eio.php', + 'EIO_DT_NAM' => 'eio/eio.php', + 'EIO_DT_NWK' => 'eio/eio.php', + 'EIO_DT_REG' => 'eio/eio.php', + 'EIO_DT_SOCK' => 'eio/eio.php', + 'EIO_DT_UNKNOWN' => 'eio/eio.php', + 'EIO_DT_WHT' => 'eio/eio.php', + 'EIO_FALLOC_FL_KEEP_SIZE' => 'eio/eio.php', + 'EIO_O_APPEND' => 'eio/eio.php', + 'EIO_O_CREAT' => 'eio/eio.php', + 'EIO_O_EXCL' => 'eio/eio.php', + 'EIO_O_FSYNC' => 'eio/eio.php', + 'EIO_O_NONBLOCK' => 'eio/eio.php', + 'EIO_O_RDONLY' => 'eio/eio.php', + 'EIO_O_RDWR' => 'eio/eio.php', + 'EIO_O_TRUNC' => 'eio/eio.php', + 'EIO_O_WRONLY' => 'eio/eio.php', + 'EIO_PRI_DEFAULT' => 'eio/eio.php', + 'EIO_PRI_MAX' => 'eio/eio.php', + 'EIO_PRI_MIN' => 'eio/eio.php', + 'EIO_READDIR_DENTS' => 'eio/eio.php', + 'EIO_READDIR_DIRS_FIRST' => 'eio/eio.php', + 'EIO_READDIR_FOUND_UNKNOWN' => 'eio/eio.php', + 'EIO_READDIR_STAT_ORDER' => 'eio/eio.php', + 'EIO_SEEK_CUR' => 'eio/eio.php', + 'EIO_SEEK_END' => 'eio/eio.php', + 'EIO_SEEK_SET' => 'eio/eio.php', + 'EIO_SYNC_FILE_RANGE_WAIT_AFTER' => 'eio/eio.php', + 'EIO_SYNC_FILE_RANGE_WAIT_BEFORE' => 'eio/eio.php', + 'EIO_SYNC_FILE_RANGE_WRITE' => 'eio/eio.php', + 'EIO_S_IFBLK' => 'eio/eio.php', + 'EIO_S_IFCHR' => 'eio/eio.php', + 'EIO_S_IFIFO' => 'eio/eio.php', + 'EIO_S_IFREG' => 'eio/eio.php', + 'EIO_S_IFSOCK' => 'eio/eio.php', + 'EIO_S_IRGRP' => 'eio/eio.php', + 'EIO_S_IROTH' => 'eio/eio.php', + 'EIO_S_IRUSR' => 'eio/eio.php', + 'EIO_S_IWGRP' => 'eio/eio.php', + 'EIO_S_IWOTH' => 'eio/eio.php', + 'EIO_S_IWUSR' => 'eio/eio.php', + 'EIO_S_IXGRP' => 'eio/eio.php', + 'EIO_S_IXOTH' => 'eio/eio.php', + 'EIO_S_IXUSR' => 'eio/eio.php', 'ENC7BIT' => 'imap/imap.php', 'ENC8BIT' => 'imap/imap.php', 'ENCBASE64' => 'imap/imap.php', @@ -6187,6 +7291,7 @@ final class PhpStormStubsMap 'ERA_D_FMT' => 'standard/standard_defines.php', 'ERA_D_T_FMT' => 'standard/standard_defines.php', 'ERA_T_FMT' => 'standard/standard_defines.php', + 'ERA_YEAR' => 'standard/standard_defines.php', 'EVBUFFER_EOF' => 'libevent/libevent.php', 'EVBUFFER_ERROR' => 'libevent/libevent.php', 'EVBUFFER_READ' => 'libevent/libevent.php', @@ -6200,6 +7305,12 @@ final class PhpStormStubsMap 'EV_TIMEOUT' => 'libevent/libevent.php', 'EV_WRITE' => 'libevent/libevent.php', 'EXIF_USE_MBSTRING' => 'exif/exif.php', + 'EXP_EOF' => 'expect/expect.php', + 'EXP_EXACT' => 'expect/expect.php', + 'EXP_FULLBUFFER' => 'expect/expect.php', + 'EXP_GLOB' => 'expect/expect.php', + 'EXP_REGEXP' => 'expect/expect.php', + 'EXP_TIMEOUT' => 'expect/expect.php', 'EXTR_IF_EXISTS' => 'standard/standard_defines.php', 'EXTR_OVERWRITE' => 'standard/standard_defines.php', 'EXTR_PREFIX_ALL' => 'standard/standard_defines.php', @@ -6276,6 +7387,7 @@ final class PhpStormStubsMap 'FANN_TRAIN_RPROP' => 'fann/fann.php', 'FANN_TRAIN_SARPROP' => 'fann/fann.php', 'FANN_VERSION' => 'fann/fann.php', + 'FILEINFO_APPLE' => 'fileinfo/fileinfo.php', 'FILEINFO_CONTINUE' => 'fileinfo/fileinfo.php', 'FILEINFO_DEVICES' => 'fileinfo/fileinfo.php', 'FILEINFO_EXTENSION' => 'fileinfo/fileinfo.php', @@ -6305,6 +7417,7 @@ final class PhpStormStubsMap 'FILTER_FLAG_ENCODE_AMP' => 'filter/filter.php', 'FILTER_FLAG_ENCODE_HIGH' => 'filter/filter.php', 'FILTER_FLAG_ENCODE_LOW' => 'filter/filter.php', + 'FILTER_FLAG_GLOBAL_RANGE' => 'filter/filter.php', 'FILTER_FLAG_HOSTNAME' => 'filter/filter.php', 'FILTER_FLAG_HOST_REQUIRED' => 'filter/filter.php', 'FILTER_FLAG_IPV4' => 'filter/filter.php', @@ -6335,6 +7448,7 @@ final class PhpStormStubsMap 'FILTER_SANITIZE_STRIPPED' => 'filter/filter.php', 'FILTER_SANITIZE_URL' => 'filter/filter.php', 'FILTER_UNSAFE_RAW' => 'filter/filter.php', + 'FILTER_VALIDATE_BOOL' => 'filter/filter.php', 'FILTER_VALIDATE_BOOLEAN' => 'filter/filter.php', 'FILTER_VALIDATE_DOMAIN' => 'filter/filter.php', 'FILTER_VALIDATE_EMAIL' => 'filter/filter.php', @@ -6358,6 +7472,7 @@ final class PhpStormStubsMap 'FPE_FLTUND' => 'pcntl/pcntl.php', 'FPE_INTDIV' => 'pcntl/pcntl.php', 'FPE_INTOVF' => 'pcntl/pcntl.php', + 'FRAC_DIGITS' => 'standard/standard_defines.php', 'FTA_BOLD' => 'winbinder/winbinder.php', 'FTA_ITALIC' => 'winbinder/winbinder.php', 'FTA_NORMAL' => 'winbinder/winbinder.php', @@ -6380,6 +7495,18 @@ final class PhpStormStubsMap 'FT_PEEK' => 'imap/imap.php', 'FT_PREFETCHTEXT' => 'imap/imap.php', 'FT_UID' => 'imap/imap.php', + 'F_DUPFD' => 'dio/dio_d.php', + 'F_GETFD' => 'dio/dio_d.php', + 'F_GETFL' => 'dio/dio_d.php', + 'F_GETLK' => 'dio/dio_d.php', + 'F_GETOWN' => 'dio/dio_d.php', + 'F_RDLCK' => 'dio/dio_d.php', + 'F_SETFL' => 'dio/dio_d.php', + 'F_SETLK' => 'dio/dio_d.php', + 'F_SETLKW' => 'dio/dio_d.php', + 'F_SETOWN' => 'dio/dio_d.php', + 'F_UNLCK' => 'dio/dio_d.php', + 'F_WRLCK' => 'dio/dio_d.php', 'Frame' => 'winbinder/winbinder.php', 'GD_BUNDLED' => 'gd/gd.php', 'GD_EXTRA_VERSION' => 'gd/gd.php', @@ -6594,6 +7721,7 @@ final class PhpStormStubsMap 'GMP_BIG_ENDIAN' => 'gmp/gmp.php', 'GMP_LITTLE_ENDIAN' => 'gmp/gmp.php', 'GMP_LSW_FIRST' => 'gmp/gmp.php', + 'GMP_MPIR_VERSION' => 'gmp/gmp.php', 'GMP_MSW_FIRST' => 'gmp/gmp.php', 'GMP_NATIVE_ENDIAN' => 'gmp/gmp.php', 'GMP_ROUND_MINUSINF' => 'gmp/gmp.php', @@ -6603,6 +7731,17 @@ final class PhpStormStubsMap 'GNUPG_ERROR_EXCEPTION' => 'gnupg/gnupg.php', 'GNUPG_ERROR_SILENT' => 'gnupg/gnupg.php', 'GNUPG_ERROR_WARNING' => 'gnupg/gnupg.php', + 'GNUPG_GPGME_VERSION' => 'gnupg/gnupg.php', + 'GNUPG_PK_DSA' => 'gnupg/gnupg.php', + 'GNUPG_PK_ECC' => 'gnupg/gnupg.php', + 'GNUPG_PK_ECDH' => 'gnupg/gnupg.php', + 'GNUPG_PK_ECDSA' => 'gnupg/gnupg.php', + 'GNUPG_PK_EDDSA' => 'gnupg/gnupg.php', + 'GNUPG_PK_ELG' => 'gnupg/gnupg.php', + 'GNUPG_PK_ELG_E' => 'gnupg/gnupg.php', + 'GNUPG_PK_RSA' => 'gnupg/gnupg.php', + 'GNUPG_PK_RSA_E' => 'gnupg/gnupg.php', + 'GNUPG_PK_RSA_S' => 'gnupg/gnupg.php', 'GNUPG_PROTOCOL_CMS' => 'gnupg/gnupg.php', 'GNUPG_PROTOCOL_OpenPGP' => 'gnupg/gnupg.php', 'GNUPG_SIGSUM_BAD_POLICY' => 'gnupg/gnupg.php', @@ -6629,6 +7768,7 @@ final class PhpStormStubsMap 'GRAPHEME_EXTR_MAXBYTES' => 'intl/intl.php', 'GRAPHEME_EXTR_MAXCHARS' => 'intl/intl.php', 'GREEN' => 'winbinder/winbinder.php', + 'GROUPING' => 'standard/standard_defines.php', 'Gauge' => 'winbinder/winbinder.php', 'Grpc\\CALL_ERROR' => 'grpc/grpc.php', 'Grpc\\CALL_ERROR_ALREADY_ACCEPTED' => 'grpc/grpc.php', @@ -6904,6 +8044,7 @@ final class PhpStormStubsMap 'ILL_ILLTRP' => 'pcntl/pcntl.php', 'ILL_PRVOPC' => 'pcntl/pcntl.php', 'ILL_PRVREG' => 'pcntl/pcntl.php', + 'IMAGETYPE_AVIF' => 'standard/standard_defines.php', 'IMAGETYPE_BMP' => 'standard/standard_defines.php', 'IMAGETYPE_COUNT' => 'standard/standard_defines.php', 'IMAGETYPE_GIF' => 'standard/standard_defines.php', @@ -6942,6 +8083,7 @@ final class PhpStormStubsMap 'IMG_ARC_NOFILL' => 'gd/gd.php', 'IMG_ARC_PIE' => 'gd/gd.php', 'IMG_ARC_ROUNDED' => 'gd/gd.php', + 'IMG_AVIF' => 'gd/gd.php', 'IMG_BELL' => 'gd/gd.php', 'IMG_BESSEL' => 'gd/gd.php', 'IMG_BICUBIC' => 'gd/gd.php', @@ -6978,6 +8120,7 @@ final class PhpStormStubsMap 'IMG_FILTER_MEAN_REMOVAL' => 'gd/gd.php', 'IMG_FILTER_NEGATE' => 'gd/gd.php', 'IMG_FILTER_PIXELATE' => 'gd/gd.php', + 'IMG_FILTER_SCATTER' => 'gd/gd.php', 'IMG_FILTER_SELECTIVE_BLUR' => 'gd/gd.php', 'IMG_FILTER_SMOOTH' => 'gd/gd.php', 'IMG_FLIP_BOTH' => 'gd/gd.php', @@ -6999,9 +8142,11 @@ final class PhpStormStubsMap 'IMG_POWER' => 'gd/gd.php', 'IMG_QUADRATIC' => 'gd/gd.php', 'IMG_SINC' => 'gd/gd.php', + 'IMG_TGA' => 'gd/gd.php', 'IMG_TRIANGLE' => 'gd/gd.php', 'IMG_WBMP' => 'gd/gd.php', 'IMG_WEBP' => 'gd/gd.php', + 'IMG_WEBP_LOSSLESS' => 'gd/gd.php', 'IMG_WEIGHTED4' => 'gd/gd.php', 'IMG_XPM' => 'gd/gd.php', 'INF' => 'standard/standard_defines.php', @@ -7032,6 +8177,8 @@ final class PhpStormStubsMap 'INTL_IDNA_VARIANT_2003' => 'intl/intl.php', 'INTL_IDNA_VARIANT_UTS46' => 'intl/intl.php', 'INTL_MAX_LOCALE_LEN' => 'intl/intl.php', + 'INT_CURR_SYMBOL' => 'standard/standard_defines.php', + 'INT_FRAC_DIGITS' => 'standard/standard_defines.php', 'IN_ACCESS' => 'inotify/inotify.php', 'IN_ALL_EVENTS' => 'inotify/inotify.php', 'IN_ATTRIB' => 'inotify/inotify.php', @@ -7099,6 +8246,7 @@ final class PhpStormStubsMap 'JSON_ERROR_INF_OR_NAN' => 'json/json.php', 'JSON_ERROR_INVALID_PROPERTY_NAME' => 'json/json.php', 'JSON_ERROR_NONE' => 'json/json.php', + 'JSON_ERROR_NON_BACKED_ENUM' => 'json/json.php', 'JSON_ERROR_RECURSION' => 'json/json.php', 'JSON_ERROR_STATE_MISMATCH' => 'json/json.php', 'JSON_ERROR_SYNTAX' => 'json/json.php', @@ -7137,6 +8285,8 @@ final class PhpStormStubsMap 'LC_NUMERIC' => 'standard/standard_defines.php', 'LC_TIME' => 'standard/standard_defines.php', 'LDAP_CONTROL_ASSERT' => 'ldap/ldap.php', + 'LDAP_CONTROL_AUTHZID_REQUEST' => 'ldap/ldap.php', + 'LDAP_CONTROL_AUTHZID_RESPONSE' => 'ldap/ldap.php', 'LDAP_CONTROL_DONTUSECOPY' => 'ldap/ldap.php', 'LDAP_CONTROL_MANAGEDSAIT' => 'ldap/ldap.php', 'LDAP_CONTROL_PAGEDRESULTS' => 'ldap/ldap.php', @@ -7261,44 +8411,46 @@ final class PhpStormStubsMap 'LIBXML_XINCLUDE' => 'libxml/libxml.php', 'LIBXSLT_DOTTED_VERSION' => 'xsl/xsl.php', 'LIBXSLT_VERSION' => 'xsl/xsl.php', + 'LIBZSTD_VERSION_NUMBER' => 'zstd/zstd.php', + 'LIBZSTD_VERSION_STRING' => 'zstd/zstd.php', 'LIGHTGRAY' => 'winbinder/winbinder.php', 'LOCK_EX' => 'standard/standard_defines.php', 'LOCK_NB' => 'standard/standard_defines.php', 'LOCK_SH' => 'standard/standard_defines.php', 'LOCK_UN' => 'standard/standard_defines.php', - 'LOG_ALERT' => 'Core/Core_d.php', - 'LOG_AUTH' => 'Core/Core_d.php', - 'LOG_AUTHPRIV' => 'Core/Core_d.php', - 'LOG_CONS' => 'Core/Core_d.php', - 'LOG_CRIT' => 'Core/Core_d.php', - 'LOG_CRON' => 'Core/Core_d.php', - 'LOG_DAEMON' => 'Core/Core_d.php', - 'LOG_DEBUG' => 'Core/Core_d.php', - 'LOG_EMERG' => 'Core/Core_d.php', - 'LOG_ERR' => 'Core/Core_d.php', - 'LOG_INFO' => 'Core/Core_d.php', - 'LOG_KERN' => 'Core/Core_d.php', - 'LOG_LOCAL0' => 'Core/Core_d.php', - 'LOG_LOCAL1' => 'Core/Core_d.php', - 'LOG_LOCAL2' => 'Core/Core_d.php', - 'LOG_LOCAL3' => 'Core/Core_d.php', - 'LOG_LOCAL4' => 'Core/Core_d.php', - 'LOG_LOCAL5' => 'Core/Core_d.php', - 'LOG_LOCAL6' => 'Core/Core_d.php', - 'LOG_LOCAL7' => 'Core/Core_d.php', - 'LOG_LPR' => 'Core/Core_d.php', - 'LOG_MAIL' => 'Core/Core_d.php', - 'LOG_NDELAY' => 'Core/Core_d.php', - 'LOG_NEWS' => 'Core/Core_d.php', - 'LOG_NOTICE' => 'Core/Core_d.php', - 'LOG_NOWAIT' => 'Core/Core_d.php', - 'LOG_ODELAY' => 'Core/Core_d.php', - 'LOG_PERROR' => 'Core/Core_d.php', - 'LOG_PID' => 'Core/Core_d.php', - 'LOG_SYSLOG' => 'Core/Core_d.php', - 'LOG_USER' => 'Core/Core_d.php', - 'LOG_UUCP' => 'Core/Core_d.php', - 'LOG_WARNING' => 'Core/Core_d.php', + 'LOG_ALERT' => 'standard/standard_defines.php', + 'LOG_AUTH' => 'standard/standard_defines.php', + 'LOG_AUTHPRIV' => 'standard/standard_defines.php', + 'LOG_CONS' => 'standard/standard_defines.php', + 'LOG_CRIT' => 'standard/standard_defines.php', + 'LOG_CRON' => 'standard/standard_defines.php', + 'LOG_DAEMON' => 'standard/standard_defines.php', + 'LOG_DEBUG' => 'standard/standard_defines.php', + 'LOG_EMERG' => 'standard/standard_defines.php', + 'LOG_ERR' => 'standard/standard_defines.php', + 'LOG_INFO' => 'standard/standard_defines.php', + 'LOG_KERN' => 'standard/standard_defines.php', + 'LOG_LOCAL0' => 'standard/standard_defines.php', + 'LOG_LOCAL1' => 'standard/standard_defines.php', + 'LOG_LOCAL2' => 'standard/standard_defines.php', + 'LOG_LOCAL3' => 'standard/standard_defines.php', + 'LOG_LOCAL4' => 'standard/standard_defines.php', + 'LOG_LOCAL5' => 'standard/standard_defines.php', + 'LOG_LOCAL6' => 'standard/standard_defines.php', + 'LOG_LOCAL7' => 'standard/standard_defines.php', + 'LOG_LPR' => 'standard/standard_defines.php', + 'LOG_MAIL' => 'standard/standard_defines.php', + 'LOG_NDELAY' => 'standard/standard_defines.php', + 'LOG_NEWS' => 'standard/standard_defines.php', + 'LOG_NOTICE' => 'standard/standard_defines.php', + 'LOG_NOWAIT' => 'standard/standard_defines.php', + 'LOG_ODELAY' => 'standard/standard_defines.php', + 'LOG_PERROR' => 'standard/standard_defines.php', + 'LOG_PID' => 'standard/standard_defines.php', + 'LOG_SYSLOG' => 'standard/standard_defines.php', + 'LOG_USER' => 'standard/standard_defines.php', + 'LOG_UUCP' => 'standard/standard_defines.php', + 'LOG_WARNING' => 'standard/standard_defines.php', 'Label' => 'winbinder/winbinder.php', 'ListBox' => 'winbinder/winbinder.php', 'ListView' => 'winbinder/winbinder.php', @@ -7334,6 +8486,7 @@ final class PhpStormStubsMap 'MCRYPT_CRYPT' => 'mcrypt/mcrypt.php', 'MCRYPT_DECRYPT' => 'mcrypt/mcrypt.php', 'MCRYPT_DES' => 'mcrypt/mcrypt.php', + 'MCRYPT_DES_COMPAT' => 'mcrypt/mcrypt.php', 'MCRYPT_DEV_RANDOM' => 'mcrypt/mcrypt.php', 'MCRYPT_DEV_URANDOM' => 'mcrypt/mcrypt.php', 'MCRYPT_ENCRYPT' => 'mcrypt/mcrypt.php', @@ -7351,7 +8504,11 @@ final class PhpStormStubsMap 'MCRYPT_PANAMA' => 'mcrypt/mcrypt.php', 'MCRYPT_RAND' => 'mcrypt/mcrypt.php', 'MCRYPT_RC2' => 'mcrypt/mcrypt.php', + 'MCRYPT_RC4' => 'mcrypt/mcrypt.php', 'MCRYPT_RC6' => 'mcrypt/mcrypt.php', + 'MCRYPT_RC6_128' => 'mcrypt/mcrypt.php', + 'MCRYPT_RC6_192' => 'mcrypt/mcrypt.php', + 'MCRYPT_RC6_256' => 'mcrypt/mcrypt.php', 'MCRYPT_RIJNDAEL_128' => 'mcrypt/mcrypt.php', 'MCRYPT_RIJNDAEL_192' => 'mcrypt/mcrypt.php', 'MCRYPT_RIJNDAEL_256' => 'mcrypt/mcrypt.php', @@ -7359,6 +8516,9 @@ final class PhpStormStubsMap 'MCRYPT_SAFER64' => 'mcrypt/mcrypt.php', 'MCRYPT_SAFERPLUS' => 'mcrypt/mcrypt.php', 'MCRYPT_SERPENT' => 'mcrypt/mcrypt.php', + 'MCRYPT_SERPENT_128' => 'mcrypt/mcrypt.php', + 'MCRYPT_SERPENT_192' => 'mcrypt/mcrypt.php', + 'MCRYPT_SERPENT_256' => 'mcrypt/mcrypt.php', 'MCRYPT_SKIPJACK' => 'mcrypt/mcrypt.php', 'MCRYPT_THREEWAY' => 'mcrypt/mcrypt.php', 'MCRYPT_TRIPLEDES' => 'mcrypt/mcrypt.php', @@ -7390,6 +8550,9 @@ final class PhpStormStubsMap 'MHASH_MD2' => 'hash/hash.php', 'MHASH_MD4' => 'hash/hash.php', 'MHASH_MD5' => 'hash/hash.php', + 'MHASH_MURMUR3A' => 'hash/hash.php', + 'MHASH_MURMUR3C' => 'hash/hash.php', + 'MHASH_MURMUR3F' => 'hash/hash.php', 'MHASH_RIPEMD128' => 'hash/hash.php', 'MHASH_RIPEMD160' => 'hash/hash.php', 'MHASH_RIPEMD256' => 'hash/hash.php', @@ -7404,9 +8567,15 @@ final class PhpStormStubsMap 'MHASH_TIGER128' => 'hash/hash.php', 'MHASH_TIGER160' => 'hash/hash.php', 'MHASH_WHIRLPOOL' => 'hash/hash.php', + 'MHASH_XXH128' => 'hash/hash.php', + 'MHASH_XXH3' => 'hash/hash.php', + 'MHASH_XXH32' => 'hash/hash.php', + 'MHASH_XXH64' => 'hash/hash.php', 'MING_NEW' => 'ming/ming.php', 'MING_ZLIB' => 'ming/ming.php', 'MK_E_UNAVAILABLE' => 'com_dotnet/com_dotnet.php', + 'MONGODB_STABILITY' => 'mongodb/mongodb.php', + 'MONGODB_VERSION' => 'mongodb/mongodb.php', 'MON_1' => 'standard/standard_defines.php', 'MON_10' => 'standard/standard_defines.php', 'MON_11' => 'standard/standard_defines.php', @@ -7419,6 +8588,9 @@ final class PhpStormStubsMap 'MON_7' => 'standard/standard_defines.php', 'MON_8' => 'standard/standard_defines.php', 'MON_9' => 'standard/standard_defines.php', + 'MON_DECIMAL_POINT' => 'standard/standard_defines.php', + 'MON_GROUPING' => 'standard/standard_defines.php', + 'MON_THOUSANDS_SEP' => 'standard/standard_defines.php', 'MQSERIES_MQACT_NONE' => 'mqseries/mqseries.php', 'MQSERIES_MQAT_AIX' => 'mqseries/mqseries.php', 'MQSERIES_MQAT_BATCH' => 'mqseries/mqseries.php', @@ -8759,6 +9931,7 @@ final class PhpStormStubsMap 'MSG_TRUNC' => 'sockets/sockets.php', 'MSG_WAITALL' => 'sockets/sockets.php', 'MSG_WAITFORONE' => 'sockets/sockets.php', + 'MSG_ZEROCOPY' => 'sockets/sockets.php', 'MSSQL_ASSOC' => 'mssql/mssql.php', 'MSSQL_BOTH' => 'mssql/mssql.php', 'MSSQL_NUM' => 'mssql/mssql.php', @@ -8900,8 +10073,8 @@ final class PhpStormStubsMap 'MS_WMSERR' => 'mapscript/mapscript.php', 'MS_XY' => 'mapscript/mapscript.php', 'MS_YES' => 'mapscript/mapscript.php', - 'MT_RAND_MT19937' => 'SPL/SPL.php', - 'MT_RAND_PHP' => 'SPL/SPL.php', + 'MT_RAND_MT19937' => 'standard/standard_defines.php', + 'MT_RAND_PHP' => 'standard/standard_defines.php', 'MYSQLI_ASSOC' => 'mysqli/mysqli.php', 'MYSQLI_ASYNC' => 'mysqli/mysqli.php', 'MYSQLI_AUTO_INCREMENT_FLAG' => 'mysqli/mysqli.php', @@ -8926,6 +10099,7 @@ final class PhpStormStubsMap 'MYSQLI_ENUM_FLAG' => 'mysqli/mysqli.php', 'MYSQLI_GROUP_FLAG' => 'mysqli/mysqli.php', 'MYSQLI_INIT_COMMAND' => 'mysqli/mysqli.php', + 'MYSQLI_IS_MARIADB' => 'mysqli/mysqli.php', 'MYSQLI_MULTIPLE_KEY_FLAG' => 'mysqli/mysqli.php', 'MYSQLI_NOT_NULL_FLAG' => 'mysqli/mysqli.php', 'MYSQLI_NO_DATA' => 'mysqli/mysqli.php', @@ -8936,6 +10110,7 @@ final class PhpStormStubsMap 'MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS' => 'mysqli/mysqli.php', 'MYSQLI_OPT_CONNECT_TIMEOUT' => 'mysqli/mysqli.php', 'MYSQLI_OPT_INT_AND_FLOAT_NATIVE' => 'mysqli/mysqli.php', + 'MYSQLI_OPT_LOAD_DATA_LOCAL_DIR' => 'mysqli/mysqli.php', 'MYSQLI_OPT_LOCAL_INFILE' => 'mysqli/mysqli.php', 'MYSQLI_OPT_NET_CMD_BUFFER_SIZE' => 'mysqli/mysqli.php', 'MYSQLI_OPT_NET_READ_BUFFER_SIZE' => 'mysqli/mysqli.php', @@ -8950,6 +10125,7 @@ final class PhpStormStubsMap 'MYSQLI_REFRESH_HOSTS' => 'mysqli/mysqli.php', 'MYSQLI_REFRESH_LOG' => 'mysqli/mysqli.php', 'MYSQLI_REFRESH_MASTER' => 'mysqli/mysqli.php', + 'MYSQLI_REFRESH_REPLICA' => 'mysqli/mysqli.php', 'MYSQLI_REFRESH_SLAVE' => 'mysqli/mysqli.php', 'MYSQLI_REFRESH_STATUS' => 'mysqli/mysqli.php', 'MYSQLI_REFRESH_TABLES' => 'mysqli/mysqli.php', @@ -9224,6 +10400,7 @@ final class PhpStormStubsMap 'NCURSES_KEY_UNDO' => 'ncurses/ncurses.php', 'NCURSES_KEY_UP' => 'ncurses/ncurses.php', 'NCURSES_REPORT_MOUSE_POSITION' => 'ncurses/ncurses.php', + 'NEGATIVE_SIGN' => 'standard/standard_defines.php', 'NIL' => 'imap/imap.php', 'NOCOLOR' => 'winbinder/winbinder.php', 'NOEXPR' => 'standard/standard_defines.php', @@ -9234,6 +10411,9 @@ final class PhpStormStubsMap 'NORM_IGNORESYMBOLS' => 'com_dotnet/com_dotnet.php', 'NORM_IGNOREWIDTH' => 'com_dotnet/com_dotnet.php', 'NOSTR' => 'standard/standard_defines.php', + 'N_CS_PRECEDES' => 'standard/standard_defines.php', + 'N_SEP_BY_SPACE' => 'standard/standard_defines.php', + 'N_SIGN_POSN' => 'standard/standard_defines.php', 'NakedWindow' => 'winbinder/winbinder.php', 'OAUTH_AUTH_TYPE_AUTHORIZATION' => 'oauth/oauth.php', 'OAUTH_AUTH_TYPE_FORM' => 'oauth/oauth.php', @@ -9322,8 +10502,19 @@ final class PhpStormStubsMap 'OPENSSL_CIPHER_RC2_128' => 'openssl/openssl.php', 'OPENSSL_CIPHER_RC2_40' => 'openssl/openssl.php', 'OPENSSL_CIPHER_RC2_64' => 'openssl/openssl.php', + 'OPENSSL_CMS_BINARY' => 'openssl/openssl.php', + 'OPENSSL_CMS_DETACHED' => 'openssl/openssl.php', + 'OPENSSL_CMS_NOATTR' => 'openssl/openssl.php', + 'OPENSSL_CMS_NOCERTS' => 'openssl/openssl.php', + 'OPENSSL_CMS_NOINTERN' => 'openssl/openssl.php', + 'OPENSSL_CMS_NOSIGS' => 'openssl/openssl.php', + 'OPENSSL_CMS_NOVERIFY' => 'openssl/openssl.php', + 'OPENSSL_CMS_TEXT' => 'openssl/openssl.php', 'OPENSSL_DEFAULT_STREAM_CIPHERS' => 'openssl/openssl.php', 'OPENSSL_DONT_ZERO_PAD_KEY' => 'openssl/openssl.php', + 'OPENSSL_ENCODING_DER' => 'openssl/openssl.php', + 'OPENSSL_ENCODING_PEM' => 'openssl/openssl.php', + 'OPENSSL_ENCODING_SMIME' => 'openssl/openssl.php', 'OPENSSL_KEYTYPE_DH' => 'openssl/openssl.php', 'OPENSSL_KEYTYPE_DSA' => 'openssl/openssl.php', 'OPENSSL_KEYTYPE_EC' => 'openssl/openssl.php', @@ -9346,6 +10537,18 @@ final class PhpStormStubsMap 'OP_SECURE' => 'imap/imap.php', 'OP_SHORTCACHE' => 'imap/imap.php', 'OP_SILENT' => 'imap/imap.php', + 'O_APPEND' => 'dio/dio_d.php', + 'O_ASYNC' => 'dio/dio_d.php', + 'O_CREAT' => 'dio/dio_d.php', + 'O_EXCL' => 'dio/dio_d.php', + 'O_NDELAY' => 'dio/dio_d.php', + 'O_NOCTTY' => 'dio/dio_d.php', + 'O_NONBLOCK' => 'dio/dio_d.php', + 'O_RDONLY' => 'dio/dio_d.php', + 'O_RDWR' => 'dio/dio_d.php', + 'O_SYNC' => 'dio/dio_d.php', + 'O_TRUNC' => 'dio/dio_d.php', + 'O_WRONLY' => 'dio/dio_d.php', 'PASSWORD_ARGON2I' => 'standard/password.php', 'PASSWORD_ARGON2ID' => 'standard/password.php', 'PASSWORD_ARGON2_DEFAULT_MEMORY_COST' => 'standard/password.php', @@ -9355,6 +10558,7 @@ final class PhpStormStubsMap 'PASSWORD_BCRYPT' => 'standard/password.php', 'PASSWORD_BCRYPT_DEFAULT_COST' => 'standard/password.php', 'PASSWORD_DEFAULT' => 'standard/password.php', + 'PATHINFO_ALL' => 'standard/standard_defines.php', 'PATHINFO_BASENAME' => 'standard/standard_defines.php', 'PATHINFO_DIRNAME' => 'standard/standard_defines.php', 'PATHINFO_EXTENSION' => 'standard/standard_defines.php', @@ -9407,18 +10611,24 @@ final class PhpStormStubsMap 'PGSQL_CONV_IGNORE_NOT_NULL' => 'pgsql/pgsql.php', 'PGSQL_COPY_IN' => 'pgsql/pgsql.php', 'PGSQL_COPY_OUT' => 'pgsql/pgsql.php', + 'PGSQL_DIAG_COLUMN_NAME' => 'pgsql/pgsql.php', + 'PGSQL_DIAG_CONSTRAINT_NAME' => 'pgsql/pgsql.php', 'PGSQL_DIAG_CONTEXT' => 'pgsql/pgsql.php', + 'PGSQL_DIAG_DATATYPE_NAME' => 'pgsql/pgsql.php', 'PGSQL_DIAG_INTERNAL_POSITION' => 'pgsql/pgsql.php', 'PGSQL_DIAG_INTERNAL_QUERY' => 'pgsql/pgsql.php', 'PGSQL_DIAG_MESSAGE_DETAIL' => 'pgsql/pgsql.php', 'PGSQL_DIAG_MESSAGE_HINT' => 'pgsql/pgsql.php', 'PGSQL_DIAG_MESSAGE_PRIMARY' => 'pgsql/pgsql.php', + 'PGSQL_DIAG_SCHEMA_NAME' => 'pgsql/pgsql.php', 'PGSQL_DIAG_SEVERITY' => 'pgsql/pgsql.php', + 'PGSQL_DIAG_SEVERITY_NONLOCALIZED' => 'pgsql/pgsql.php', 'PGSQL_DIAG_SOURCE_FILE' => 'pgsql/pgsql.php', 'PGSQL_DIAG_SOURCE_FUNCTION' => 'pgsql/pgsql.php', 'PGSQL_DIAG_SOURCE_LINE' => 'pgsql/pgsql.php', 'PGSQL_DIAG_SQLSTATE' => 'pgsql/pgsql.php', 'PGSQL_DIAG_STATEMENT_POSITION' => 'pgsql/pgsql.php', + 'PGSQL_DIAG_TABLE_NAME' => 'pgsql/pgsql.php', 'PGSQL_DML_ASYNC' => 'pgsql/pgsql.php', 'PGSQL_DML_ESCAPE' => 'pgsql/pgsql.php', 'PGSQL_DML_EXEC' => 'pgsql/pgsql.php', @@ -9453,10 +10663,10 @@ final class PhpStormStubsMap 'PGSQL_TRANSACTION_UNKNOWN' => 'pgsql/pgsql.php', 'PGSQL_TUPLES_OK' => 'pgsql/pgsql.php', 'PHP_AMQP_MAX_CHANNELS' => 'amqp/amqp.php', - 'PHP_BINARY' => 'standard/standard_defines.php', + 'PHP_BINARY' => 'Core/Core_d.php', 'PHP_BINARY_READ' => 'sockets/sockets.php', 'PHP_BINDIR' => 'Core/Core_d.php', - 'PHP_CLI_PROCESS_TITLE' => 'standard/standard_defines.php', + 'PHP_CLI_PROCESS_TITLE' => 'Core/Core_d.php', 'PHP_CONFIG_FILE_PATH' => 'Core/Core_d.php', 'PHP_CONFIG_FILE_SCAN_DIR' => 'Core/Core_d.php', 'PHP_DATADIR' => 'Core/Core_d.php', @@ -9475,25 +10685,25 @@ final class PhpStormStubsMap 'PHP_LIBDIR' => 'Core/Core_d.php', 'PHP_LOCALSTATEDIR' => 'Core/Core_d.php', 'PHP_MAJOR_VERSION' => 'Core/Core_d.php', - 'PHP_MANDIR' => 'standard/standard_defines.php', + 'PHP_MANDIR' => 'Core/Core_d.php', 'PHP_MAXPATHLEN' => 'Core/Core_d.php', 'PHP_MINOR_VERSION' => 'Core/Core_d.php', 'PHP_NORMAL_READ' => 'sockets/sockets.php', 'PHP_OS' => 'Core/Core_d.php', 'PHP_OS_FAMILY' => 'Core/Core_d.php', - 'PHP_OUTPUT_HANDLER_CLEAN' => 'standard/standard_defines.php', - 'PHP_OUTPUT_HANDLER_CLEANABLE' => 'standard/standard_defines.php', + 'PHP_OUTPUT_HANDLER_CLEAN' => 'Core/Core_d.php', + 'PHP_OUTPUT_HANDLER_CLEANABLE' => 'Core/Core_d.php', 'PHP_OUTPUT_HANDLER_CONT' => 'Core/Core_d.php', - 'PHP_OUTPUT_HANDLER_DISABLED' => 'standard/standard_defines.php', + 'PHP_OUTPUT_HANDLER_DISABLED' => 'Core/Core_d.php', 'PHP_OUTPUT_HANDLER_END' => 'Core/Core_d.php', - 'PHP_OUTPUT_HANDLER_FINAL' => 'standard/standard_defines.php', - 'PHP_OUTPUT_HANDLER_FLUSH' => 'standard/standard_defines.php', - 'PHP_OUTPUT_HANDLER_FLUSHABLE' => 'standard/standard_defines.php', - 'PHP_OUTPUT_HANDLER_REMOVABLE' => 'standard/standard_defines.php', + 'PHP_OUTPUT_HANDLER_FINAL' => 'Core/Core_d.php', + 'PHP_OUTPUT_HANDLER_FLUSH' => 'Core/Core_d.php', + 'PHP_OUTPUT_HANDLER_FLUSHABLE' => 'Core/Core_d.php', + 'PHP_OUTPUT_HANDLER_REMOVABLE' => 'Core/Core_d.php', 'PHP_OUTPUT_HANDLER_START' => 'Core/Core_d.php', - 'PHP_OUTPUT_HANDLER_STARTED' => 'standard/standard_defines.php', - 'PHP_OUTPUT_HANDLER_STDFLAGS' => 'standard/standard_defines.php', - 'PHP_OUTPUT_HANDLER_WRITE' => 'standard/standard_defines.php', + 'PHP_OUTPUT_HANDLER_STARTED' => 'Core/Core_d.php', + 'PHP_OUTPUT_HANDLER_STDFLAGS' => 'Core/Core_d.php', + 'PHP_OUTPUT_HANDLER_WRITE' => 'Core/Core_d.php', 'PHP_PREFIX' => 'Core/Core_d.php', 'PHP_QUERY_RFC1738' => 'standard/standard_defines.php', 'PHP_QUERY_RFC3986' => 'standard/standard_defines.php', @@ -9519,6 +10729,11 @@ final class PhpStormStubsMap 'PHP_URL_USER' => 'standard/standard_defines.php', 'PHP_VERSION' => 'Core/Core_d.php', 'PHP_VERSION_ID' => 'Core/Core_d.php', + 'PHP_WINDOWS_EVENT_CTRL_BREAK' => 'Core/Core_d.php', + 'PHP_WINDOWS_EVENT_CTRL_C' => 'Core/Core_d.php', + 'PHP_WINDOWS_NT_DOMAIN_CONTROLLER' => 'Core/Core_d.php', + 'PHP_WINDOWS_NT_SERVER' => 'Core/Core_d.php', + 'PHP_WINDOWS_NT_WORKSTATION' => 'Core/Core_d.php', 'PHP_WINDOWS_VERSION_BUILD' => 'Core/Core_d.php', 'PHP_WINDOWS_VERSION_MAJOR' => 'Core/Core_d.php', 'PHP_WINDOWS_VERSION_MINOR' => 'Core/Core_d.php', @@ -9551,6 +10766,7 @@ final class PhpStormStubsMap 'POLL_MSG' => 'pcntl/pcntl.php', 'POLL_OUT' => 'pcntl/pcntl.php', 'POLL_PRI' => 'pcntl/pcntl.php', + 'POSITIVE_SIGN' => 'standard/standard_defines.php', 'POSIX_F_OK' => 'posix/posix.php', 'POSIX_RLIMIT_AS' => 'posix/posix.php', 'POSIX_RLIMIT_CORE' => 'posix/posix.php', @@ -9614,6 +10830,9 @@ final class PhpStormStubsMap 'PTHREADS_INHERIT_INCLUDES' => 'pthreads/pthreads.php', 'PTHREADS_INHERIT_INI' => 'pthreads/pthreads.php', 'PTHREADS_INHERIT_NONE' => 'pthreads/pthreads.php', + 'P_CS_PRECEDES' => 'standard/standard_defines.php', + 'P_SEP_BY_SPACE' => 'standard/standard_defines.php', + 'P_SIGN_POSN' => 'standard/standard_defines.php', 'PopupWindow' => 'winbinder/winbinder.php', 'PushButton' => 'winbinder/winbinder.php', 'RADIUS_ACCESS_ACCEPT' => 'radius/radius.php', @@ -9749,7 +10968,7 @@ final class PhpStormStubsMap 'RADIUS_MICROSOFT_MS_RAS_VERSION' => 'radius/radius.php', 'RADIUS_MICROSOFT_MS_SECONDARY_DNS_SERVER' => 'radius/radius.php', 'RADIUS_MICROSOFT_MS_SECONDARY_NBNS_SERVER' => 'radius/radius.php', - 'RADIUS_MPPE_KEY_LEN ' => 'radius/radius.php', + 'RADIUS_MPPE_KEY_LEN' => 'radius/radius.php', 'RADIUS_NAS_IDENTIFIER' => 'radius/radius.php', 'RADIUS_NAS_IPV6_ADDRESS' => 'radius/radius.php', 'RADIUS_NAS_IP_ADDRESS' => 'radius/radius.php', @@ -9813,31 +11032,61 @@ final class PhpStormStubsMap 'RD_KAFKA_LOG_PRINT' => 'rdkafka/constants.php', 'RD_KAFKA_LOG_SYSLOG' => 'rdkafka/constants.php', 'RD_KAFKA_LOG_SYSLOG_PRINT' => 'rdkafka/constants.php', + 'RD_KAFKA_MSG_F_BLOCK' => 'rdkafka/constants.php', 'RD_KAFKA_MSG_PARTITIONER_CONSISTENT' => 'rdkafka/constants.php', + 'RD_KAFKA_MSG_PARTITIONER_CONSISTENT_RANDOM' => 'rdkafka/constants.php', + 'RD_KAFKA_MSG_PARTITIONER_MURMUR2' => 'rdkafka/constants.php', + 'RD_KAFKA_MSG_PARTITIONER_MURMUR2_RANDOM' => 'rdkafka/constants.php', 'RD_KAFKA_MSG_PARTITIONER_RANDOM' => 'rdkafka/constants.php', 'RD_KAFKA_OFFSET_BEGINNING' => 'rdkafka/constants.php', 'RD_KAFKA_OFFSET_END' => 'rdkafka/constants.php', + 'RD_KAFKA_OFFSET_INVALID' => 'rdkafka/constants.php', 'RD_KAFKA_OFFSET_STORED' => 'rdkafka/constants.php', 'RD_KAFKA_PARTITION_UA' => 'rdkafka/constants.php', 'RD_KAFKA_PRODUCER' => 'rdkafka/constants.php', + 'RD_KAFKA_PURGE_F_INFLIGHT' => 'rdkafka/constants.php', + 'RD_KAFKA_PURGE_F_NON_BLOCKING' => 'rdkafka/constants.php', + 'RD_KAFKA_PURGE_F_QUEUE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_CONFIG' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_GROUP_ID' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_MSG' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_PARTITIONS' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_INVALID_RECORD' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_REQUEST' => 'rdkafka/constants.php', @@ -9846,40 +11095,66 @@ final class PhpStormStubsMap 'RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_INVALID_TXN_STATE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_NOT_CONTROLLER' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_NOT_COORDINATOR' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_NO_ERROR' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_POLICY_VIOLATION' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_PRODUCER_FENCED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_SECURITY_DISABLED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_UNKNOWN' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__APPLICATION' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__AUTHENTICATION' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__BAD_COMPRESSION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__BAD_MSG' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__BEGIN' => 'rdkafka/constants.php', @@ -9889,7 +11164,11 @@ final class PhpStormStubsMap 'RD_KAFKA_RESP_ERR__END' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__FAIL' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__FATAL' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__FENCED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__FS' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__INCONSISTENT' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__INTR' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__INVALID_ARG' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__INVALID_TYPE' => 'rdkafka/constants.php', @@ -9897,18 +11176,24 @@ final class PhpStormStubsMap 'RD_KAFKA_RESP_ERR__ISR_INSUFF' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__KEY_SERIALIZATION' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__MSG_TIMED_OUT' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__NODE_UPDATE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__NOENT' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__NOOP' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__NOT_CONFIGURED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__NO_OFFSET' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__OUTDATED' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__PARTIAL' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__PARTITION_EOF' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__PURGE_INFLIGHT' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__PURGE_QUEUE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__QUEUE_FULL' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__READ_ONLY' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__RESOLVE' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__RETRY' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__SSL' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__STATE' => 'rdkafka/constants.php', @@ -9916,6 +11201,7 @@ final class PhpStormStubsMap 'RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__TRANSPORT' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__UNDERFLOW' => 'rdkafka/constants.php', + 'RD_KAFKA_RESP_ERR__UNKNOWN_BROKER' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__UNKNOWN_GROUP' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION' => 'rdkafka/constants.php', 'RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL' => 'rdkafka/constants.php', @@ -9928,6 +11214,277 @@ final class PhpStormStubsMap 'RD_KAFKA_VERSION' => 'rdkafka/constants.php', 'READLINE_LIB' => 'readline/readline.php', 'RED' => 'winbinder/winbinder.php', + 'RPMMIRE_DEFAULT' => 'rpminfo/rpminfo.php', + 'RPMMIRE_GLOB' => 'rpminfo/rpminfo.php', + 'RPMMIRE_REGEX' => 'rpminfo/rpminfo.php', + 'RPMMIRE_STRCMP' => 'rpminfo/rpminfo.php', + 'RPMSENSE_ANY' => 'rpminfo/rpminfo.php', + 'RPMSENSE_CONFIG' => 'rpminfo/rpminfo.php', + 'RPMSENSE_EQUAL' => 'rpminfo/rpminfo.php', + 'RPMSENSE_FIND_PROVIDES' => 'rpminfo/rpminfo.php', + 'RPMSENSE_FIND_REQUIRES' => 'rpminfo/rpminfo.php', + 'RPMSENSE_GREATER' => 'rpminfo/rpminfo.php', + 'RPMSENSE_INTERP' => 'rpminfo/rpminfo.php', + 'RPMSENSE_KEYRING' => 'rpminfo/rpminfo.php', + 'RPMSENSE_LESS' => 'rpminfo/rpminfo.php', + 'RPMSENSE_MISSINGOK' => 'rpminfo/rpminfo.php', + 'RPMSENSE_POSTTRANS' => 'rpminfo/rpminfo.php', + 'RPMSENSE_PREREQ' => 'rpminfo/rpminfo.php', + 'RPMSENSE_PRETRANS' => 'rpminfo/rpminfo.php', + 'RPMSENSE_RPMLIB' => 'rpminfo/rpminfo.php', + 'RPMSENSE_SCRIPT_POST' => 'rpminfo/rpminfo.php', + 'RPMSENSE_SCRIPT_POSTUN' => 'rpminfo/rpminfo.php', + 'RPMSENSE_SCRIPT_PRE' => 'rpminfo/rpminfo.php', + 'RPMSENSE_SCRIPT_PREUN' => 'rpminfo/rpminfo.php', + 'RPMSENSE_SCRIPT_VERIFY' => 'rpminfo/rpminfo.php', + 'RPMSENSE_TRIGGERIN' => 'rpminfo/rpminfo.php', + 'RPMSENSE_TRIGGERPOSTUN' => 'rpminfo/rpminfo.php', + 'RPMSENSE_TRIGGERPREIN' => 'rpminfo/rpminfo.php', + 'RPMSENSE_TRIGGERUN' => 'rpminfo/rpminfo.php', + 'RPMTAG_ARCH' => 'rpminfo/rpminfo.php', + 'RPMTAG_ARCHIVESIZE' => 'rpminfo/rpminfo.php', + 'RPMTAG_BASENAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_BUGURL' => 'rpminfo/rpminfo.php', + 'RPMTAG_BUILDARCHS' => 'rpminfo/rpminfo.php', + 'RPMTAG_BUILDHOST' => 'rpminfo/rpminfo.php', + 'RPMTAG_BUILDTIME' => 'rpminfo/rpminfo.php', + 'RPMTAG_C' => 'rpminfo/rpminfo.php', + 'RPMTAG_CHANGELOGNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_CHANGELOGTEXT' => 'rpminfo/rpminfo.php', + 'RPMTAG_CHANGELOGTIME' => 'rpminfo/rpminfo.php', + 'RPMTAG_CLASSDICT' => 'rpminfo/rpminfo.php', + 'RPMTAG_CONFLICTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_CONFLICTNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_CONFLICTNEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_CONFLICTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_CONFLICTVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_COOKIE' => 'rpminfo/rpminfo.php', + 'RPMTAG_DBINSTANCE' => 'rpminfo/rpminfo.php', + 'RPMTAG_DEPENDSDICT' => 'rpminfo/rpminfo.php', + 'RPMTAG_DESCRIPTION' => 'rpminfo/rpminfo.php', + 'RPMTAG_DIRINDEXES' => 'rpminfo/rpminfo.php', + 'RPMTAG_DIRNAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_DISTRIBUTION' => 'rpminfo/rpminfo.php', + 'RPMTAG_DISTTAG' => 'rpminfo/rpminfo.php', + 'RPMTAG_DISTURL' => 'rpminfo/rpminfo.php', + 'RPMTAG_DSAHEADER' => 'rpminfo/rpminfo.php', + 'RPMTAG_E' => 'rpminfo/rpminfo.php', + 'RPMTAG_ENCODING' => 'rpminfo/rpminfo.php', + 'RPMTAG_ENHANCEFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_ENHANCENAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_ENHANCENEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_ENHANCES' => 'rpminfo/rpminfo.php', + 'RPMTAG_ENHANCEVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_EPOCH' => 'rpminfo/rpminfo.php', + 'RPMTAG_EPOCHNUM' => 'rpminfo/rpminfo.php', + 'RPMTAG_EVR' => 'rpminfo/rpminfo.php', + 'RPMTAG_EXCLUDEARCH' => 'rpminfo/rpminfo.php', + 'RPMTAG_EXCLUDEOS' => 'rpminfo/rpminfo.php', + 'RPMTAG_EXCLUSIVEARCH' => 'rpminfo/rpminfo.php', + 'RPMTAG_EXCLUSIVEOS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILECAPS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILECLASS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILECOLORS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILECONTEXTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEDEPENDSN' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEDEPENDSX' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEDEVICES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEDIGESTALGO' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEDIGESTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEGROUPNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEINODES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILELANGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILELINKTOS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEMD5S' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEMODES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEMTIMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILENAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILENLINKS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEPROVIDE' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILERDEVS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEREQUIRE' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILESIGNATURELENGTH' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILESIGNATURES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILESIZES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILESTATES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERCONDS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERINDEX' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERPRIORITIES' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERSCRIPTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERSCRIPTPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERSCRIPTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERTYPE' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILETRIGGERVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEUSERNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_FILEVERIFYFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_FSCONTEXTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_GIF' => 'rpminfo/rpminfo.php', + 'RPMTAG_GROUP' => 'rpminfo/rpminfo.php', + 'RPMTAG_HDRID' => 'rpminfo/rpminfo.php', + 'RPMTAG_HEADERCOLOR' => 'rpminfo/rpminfo.php', + 'RPMTAG_HEADERI18NTABLE' => 'rpminfo/rpminfo.php', + 'RPMTAG_HEADERIMAGE' => 'rpminfo/rpminfo.php', + 'RPMTAG_HEADERIMMUTABLE' => 'rpminfo/rpminfo.php', + 'RPMTAG_HEADERREGIONS' => 'rpminfo/rpminfo.php', + 'RPMTAG_HEADERSIGNATURES' => 'rpminfo/rpminfo.php', + 'RPMTAG_ICON' => 'rpminfo/rpminfo.php', + 'RPMTAG_INSTALLCOLOR' => 'rpminfo/rpminfo.php', + 'RPMTAG_INSTALLTID' => 'rpminfo/rpminfo.php', + 'RPMTAG_INSTALLTIME' => 'rpminfo/rpminfo.php', + 'RPMTAG_INSTFILENAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_INSTPREFIXES' => 'rpminfo/rpminfo.php', + 'RPMTAG_LICENSE' => 'rpminfo/rpminfo.php', + 'RPMTAG_LONGARCHIVESIZE' => 'rpminfo/rpminfo.php', + 'RPMTAG_LONGFILESIZES' => 'rpminfo/rpminfo.php', + 'RPMTAG_LONGSIGSIZE' => 'rpminfo/rpminfo.php', + 'RPMTAG_LONGSIZE' => 'rpminfo/rpminfo.php', + 'RPMTAG_MODULARITYLABEL' => 'rpminfo/rpminfo.php', + 'RPMTAG_N' => 'rpminfo/rpminfo.php', + 'RPMTAG_NAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_NEVR' => 'rpminfo/rpminfo.php', + 'RPMTAG_NEVRA' => 'rpminfo/rpminfo.php', + 'RPMTAG_NOPATCH' => 'rpminfo/rpminfo.php', + 'RPMTAG_NOSOURCE' => 'rpminfo/rpminfo.php', + 'RPMTAG_NVR' => 'rpminfo/rpminfo.php', + 'RPMTAG_NVRA' => 'rpminfo/rpminfo.php', + 'RPMTAG_O' => 'rpminfo/rpminfo.php', + 'RPMTAG_OBSOLETEFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_OBSOLETENAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_OBSOLETENEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_OBSOLETES' => 'rpminfo/rpminfo.php', + 'RPMTAG_OBSOLETEVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDENHANCES' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDENHANCESFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDENHANCESNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDENHANCESVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDFILENAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDSUGGESTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDSUGGESTSFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDSUGGESTSNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_OLDSUGGESTSVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_OPTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_ORDERFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_ORDERNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_ORDERVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_ORIGBASENAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_ORIGDIRINDEXES' => 'rpminfo/rpminfo.php', + 'RPMTAG_ORIGDIRNAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_ORIGFILENAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_OS' => 'rpminfo/rpminfo.php', + 'RPMTAG_P' => 'rpminfo/rpminfo.php', + 'RPMTAG_PACKAGER' => 'rpminfo/rpminfo.php', + 'RPMTAG_PATCH' => 'rpminfo/rpminfo.php', + 'RPMTAG_PATCHESFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PATCHESNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_PATCHESVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_PAYLOADCOMPRESSOR' => 'rpminfo/rpminfo.php', + 'RPMTAG_PAYLOADDIGEST' => 'rpminfo/rpminfo.php', + 'RPMTAG_PAYLOADDIGESTALGO' => 'rpminfo/rpminfo.php', + 'RPMTAG_PAYLOADFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PAYLOADFORMAT' => 'rpminfo/rpminfo.php', + 'RPMTAG_PKGID' => 'rpminfo/rpminfo.php', + 'RPMTAG_PLATFORM' => 'rpminfo/rpminfo.php', + 'RPMTAG_POLICIES' => 'rpminfo/rpminfo.php', + 'RPMTAG_POLICYFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_POLICYNAMES' => 'rpminfo/rpminfo.php', + 'RPMTAG_POLICYTYPES' => 'rpminfo/rpminfo.php', + 'RPMTAG_POLICYTYPESINDEXES' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTIN' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTINFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTINPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTTRANS' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTTRANSFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTTRANSPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTUN' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTUNFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_POSTUNPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_PREFIXES' => 'rpminfo/rpminfo.php', + 'RPMTAG_PREIN' => 'rpminfo/rpminfo.php', + 'RPMTAG_PREINFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PREINPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_PRETRANS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PRETRANSFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PRETRANSPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_PREUN' => 'rpminfo/rpminfo.php', + 'RPMTAG_PREUNFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PREUNPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_PROVIDEFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PROVIDENAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_PROVIDENEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_PROVIDES' => 'rpminfo/rpminfo.php', + 'RPMTAG_PROVIDEVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_PUBKEYS' => 'rpminfo/rpminfo.php', + 'RPMTAG_R' => 'rpminfo/rpminfo.php', + 'RPMTAG_RECOMMENDFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_RECOMMENDNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_RECOMMENDNEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_RECOMMENDS' => 'rpminfo/rpminfo.php', + 'RPMTAG_RECOMMENDVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_RECONTEXTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_RELEASE' => 'rpminfo/rpminfo.php', + 'RPMTAG_REMOVETID' => 'rpminfo/rpminfo.php', + 'RPMTAG_REQUIREFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_REQUIRENAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_REQUIRENEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_REQUIRES' => 'rpminfo/rpminfo.php', + 'RPMTAG_REQUIREVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_RPMVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_RSAHEADER' => 'rpminfo/rpminfo.php', + 'RPMTAG_SHA1HEADER' => 'rpminfo/rpminfo.php', + 'RPMTAG_SHA256HEADER' => 'rpminfo/rpminfo.php', + 'RPMTAG_SIGGPG' => 'rpminfo/rpminfo.php', + 'RPMTAG_SIGMD5' => 'rpminfo/rpminfo.php', + 'RPMTAG_SIGPGP' => 'rpminfo/rpminfo.php', + 'RPMTAG_SIGSIZE' => 'rpminfo/rpminfo.php', + 'RPMTAG_SIZE' => 'rpminfo/rpminfo.php', + 'RPMTAG_SOURCE' => 'rpminfo/rpminfo.php', + 'RPMTAG_SOURCEPACKAGE' => 'rpminfo/rpminfo.php', + 'RPMTAG_SOURCEPKGID' => 'rpminfo/rpminfo.php', + 'RPMTAG_SOURCERPM' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUGGESTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUGGESTNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUGGESTNEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUGGESTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUGGESTVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUMMARY' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUPPLEMENTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUPPLEMENTNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUPPLEMENTNEVRS' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUPPLEMENTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_SUPPLEMENTVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERCONDS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERINDEX' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERPRIORITIES' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERSCRIPTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERSCRIPTPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERSCRIPTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERTYPE' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRANSFILETRIGGERVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERCONDS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERINDEX' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERNAME' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERSCRIPTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERSCRIPTPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERSCRIPTS' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERTYPE' => 'rpminfo/rpminfo.php', + 'RPMTAG_TRIGGERVERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_URL' => 'rpminfo/rpminfo.php', + 'RPMTAG_V' => 'rpminfo/rpminfo.php', + 'RPMTAG_VCS' => 'rpminfo/rpminfo.php', + 'RPMTAG_VENDOR' => 'rpminfo/rpminfo.php', + 'RPMTAG_VERBOSE' => 'rpminfo/rpminfo.php', + 'RPMTAG_VERIFYSCRIPT' => 'rpminfo/rpminfo.php', + 'RPMTAG_VERIFYSCRIPTFLAGS' => 'rpminfo/rpminfo.php', + 'RPMTAG_VERIFYSCRIPTPROG' => 'rpminfo/rpminfo.php', + 'RPMTAG_VERSION' => 'rpminfo/rpminfo.php', + 'RPMTAG_XPM' => 'rpminfo/rpminfo.php', + 'RPMVERSION' => 'rpminfo/rpminfo.php', 'RTFEditBox' => 'winbinder/winbinder.php', 'RadioButton' => 'winbinder/winbinder.php', 'ResizableWindow' => 'winbinder/winbinder.php', @@ -10002,6 +11559,24 @@ final class PhpStormStubsMap 'SI_TIMER' => 'pcntl/pcntl.php', 'SI_TKILL' => 'pcntl/pcntl.php', 'SI_USER' => 'pcntl/pcntl.php', + 'SKF_AD_ALU_XOR_X' => 'sockets/sockets.php', + 'SKF_AD_CPU' => 'sockets/sockets.php', + 'SKF_AD_HATYPE' => 'sockets/sockets.php', + 'SKF_AD_IFINDEX' => 'sockets/sockets.php', + 'SKF_AD_MARK' => 'sockets/sockets.php', + 'SKF_AD_MAX' => 'sockets/sockets.php', + 'SKF_AD_NLATTR' => 'sockets/sockets.php', + 'SKF_AD_NLATTR_NEST' => 'sockets/sockets.php', + 'SKF_AD_OFF' => 'sockets/sockets.php', + 'SKF_AD_PAY_OFFSET' => 'sockets/sockets.php', + 'SKF_AD_PKTTYPE' => 'sockets/sockets.php', + 'SKF_AD_PROTOCOL' => 'sockets/sockets.php', + 'SKF_AD_QUEUE' => 'sockets/sockets.php', + 'SKF_AD_RANDOM' => 'sockets/sockets.php', + 'SKF_AD_RXHASH' => 'sockets/sockets.php', + 'SKF_AD_VLAN_TAG' => 'sockets/sockets.php', + 'SKF_AD_VLAN_TAG_PRESENT' => 'sockets/sockets.php', + 'SKF_AD_VLAN_TPID' => 'sockets/sockets.php', 'SNMP_BIT_STR' => 'snmp/snmp.php', 'SNMP_COUNTER' => 'snmp/snmp.php', 'SNMP_COUNTER64' => 'snmp/snmp.php', @@ -10065,12 +11640,14 @@ final class PhpStormStubsMap 'SOCKET_EBADRQC' => 'sockets/sockets.php', 'SOCKET_EBADSLT' => 'sockets/sockets.php', 'SOCKET_EBUSY' => 'sockets/sockets.php', + 'SOCKET_ECANCELED' => 'swoole/constants.php', 'SOCKET_ECHRNG' => 'sockets/sockets.php', 'SOCKET_ECOMM' => 'sockets/sockets.php', 'SOCKET_ECONNABORTED' => 'sockets/sockets.php', 'SOCKET_ECONNREFUSED' => 'sockets/sockets.php', 'SOCKET_ECONNRESET' => 'sockets/sockets.php', 'SOCKET_EDESTADDRREQ' => 'sockets/sockets.php', + 'SOCKET_EDISCON' => 'sockets/sockets.php', 'SOCKET_EDQUOT' => 'sockets/sockets.php', 'SOCKET_EEXIST' => 'sockets/sockets.php', 'SOCKET_EFAULT' => 'sockets/sockets.php', @@ -10129,6 +11706,7 @@ final class PhpStormStubsMap 'SOCKET_EPERM' => 'sockets/sockets.php', 'SOCKET_EPFNOSUPPORT' => 'sockets/sockets.php', 'SOCKET_EPIPE' => 'sockets/sockets.php', + 'SOCKET_EPROCLIM' => 'sockets/sockets.php', 'SOCKET_EPROTO' => 'sockets/sockets.php', 'SOCKET_EPROTONOSUPPORT' => 'sockets/sockets.php', 'SOCKET_EPROTOTYPE' => 'sockets/sockets.php', @@ -10141,6 +11719,7 @@ final class PhpStormStubsMap 'SOCKET_ESOCKTNOSUPPORT' => 'sockets/sockets.php', 'SOCKET_ESPIPE' => 'sockets/sockets.php', 'SOCKET_ESRMNT' => 'sockets/sockets.php', + 'SOCKET_ESTALE' => 'sockets/sockets.php', 'SOCKET_ESTRPIPE' => 'sockets/sockets.php', 'SOCKET_ETIME' => 'sockets/sockets.php', 'SOCKET_ETIMEDOUT' => 'sockets/sockets.php', @@ -10150,6 +11729,14 @@ final class PhpStormStubsMap 'SOCKET_EWOULDBLOCK' => 'sockets/sockets.php', 'SOCKET_EXDEV' => 'sockets/sockets.php', 'SOCKET_EXFULL' => 'sockets/sockets.php', + 'SOCKET_HOST_NOT_FOUND' => 'sockets/sockets.php', + 'SOCKET_NOTINITIALISED' => 'sockets/sockets.php', + 'SOCKET_NO_ADDRESS' => 'sockets/sockets.php', + 'SOCKET_NO_DATA' => 'sockets/sockets.php', + 'SOCKET_NO_RECOVERY' => 'sockets/sockets.php', + 'SOCKET_SYSNOTREADY' => 'sockets/sockets.php', + 'SOCKET_TRY_AGAIN' => 'sockets/sockets.php', + 'SOCKET_VERNOTSUPPORTED' => 'sockets/sockets.php', 'SOCK_DGRAM' => 'sockets/sockets.php', 'SOCK_RAW' => 'sockets/sockets.php', 'SOCK_RDM' => 'sockets/sockets.php', @@ -10184,6 +11771,10 @@ final class PhpStormStubsMap 'SODIUM_CRYPTO_BOX_SEALBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_BOX_SECRETKEYBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_BOX_SEEDBYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_CORE_RISTRETTO255_BYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_CORE_RISTRETTO255_HASHBYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_CORE_RISTRETTO255_SCALARBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_GENERICHASH_BYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_GENERICHASH_BYTES_MAX' => 'sodium/sodium.php', 'SODIUM_CRYPTO_GENERICHASH_BYTES_MIN' => 'sodium/sodium.php', @@ -10218,6 +11809,8 @@ final class PhpStormStubsMap 'SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX' => 'sodium/sodium.php', 'SODIUM_CRYPTO_PWHASH_STRPREFIX' => 'sodium/sodium.php', 'SODIUM_CRYPTO_SCALARMULT_BYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_BYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_SCALARMULT_SCALARBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_SECRETBOX_KEYBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_SECRETBOX_MACBYTES' => 'sodium/sodium.php', @@ -10239,6 +11832,8 @@ final class PhpStormStubsMap 'SODIUM_CRYPTO_SIGN_SEEDBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_STREAM_KEYBYTES' => 'sodium/sodium.php', 'SODIUM_CRYPTO_STREAM_NONCEBYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES' => 'sodium/sodium.php', + 'SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES' => 'sodium/sodium.php', 'SODIUM_LIBRARY_MAJOR_VERSION' => 'sodium/sodium.php', 'SODIUM_LIBRARY_MINOR_VERSION' => 'sodium/sodium.php', 'SODIUM_LIBRARY_VERSION' => 'sodium/sodium.php', @@ -10266,13 +11861,17 @@ final class PhpStormStubsMap 'SORT_REGULAR' => 'standard/standard_defines.php', 'SORT_STRING' => 'standard/standard_defines.php', 'SO_BINDTODEVICE' => 'sockets/sockets.php', + 'SO_BPF_EXTENSIONS' => 'sockets/sockets.php', 'SO_BROADCAST' => 'sockets/sockets.php', 'SO_DEBUG' => 'sockets/sockets.php', 'SO_DONTROUTE' => 'sockets/sockets.php', 'SO_ERROR' => 'sockets/sockets.php', 'SO_FREE' => 'imap/imap.php', + 'SO_INCOMING_CPU' => 'sockets/sockets.php', 'SO_KEEPALIVE' => 'sockets/sockets.php', 'SO_LINGER' => 'sockets/sockets.php', + 'SO_MARK' => 'sockets/sockets.php', + 'SO_MEMINFO' => 'sockets/sockets.php', 'SO_NOSERVER' => 'imap/imap.php', 'SO_OOBINLINE' => 'sockets/sockets.php', 'SO_PASSCRED' => 'sockets/sockets.php', @@ -10285,6 +11884,7 @@ final class PhpStormStubsMap 'SO_SNDLOWAT' => 'sockets/sockets.php', 'SO_SNDTIMEO' => 'sockets/sockets.php', 'SO_TYPE' => 'sockets/sockets.php', + 'SO_ZEROCOPY' => 'sockets/sockets.php', 'SQLBIT' => 'mssql/mssql.php', 'SQLCHAR' => 'mssql/mssql.php', 'SQLFLT4' => 'mssql/mssql.php', @@ -10296,7 +11896,7 @@ final class PhpStormStubsMap 'SQLITE3_ASSOC' => 'sqlite3/sqlite3.php', 'SQLITE3_BLOB' => 'sqlite3/sqlite3.php', 'SQLITE3_BOTH' => 'sqlite3/sqlite3.php', - 'SQLITE3_DETERMINISTIC' => 'SQLite/SQLite.php', + 'SQLITE3_DETERMINISTIC' => 'sqlite3/sqlite3.php', 'SQLITE3_FLOAT' => 'sqlite3/sqlite3.php', 'SQLITE3_INTEGER' => 'sqlite3/sqlite3.php', 'SQLITE3_NULL' => 'sqlite3/sqlite3.php', @@ -10377,15 +11977,20 @@ final class PhpStormStubsMap 'SQLSRV_SCROLL_RELATIVE' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_BIGINT' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_BIT' => 'sqlsrv/sqlsrv.php', + 'SQLSRV_SQLTYPE_CHAR' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_DATE' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_DATETIME' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_DATETIME2' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_DATETIMEOFFSET' => 'sqlsrv/sqlsrv.php', + 'SQLSRV_SQLTYPE_DECIMAL' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_FLOAT' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_IMAGE' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_INT' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_MONEY' => 'sqlsrv/sqlsrv.php', + 'SQLSRV_SQLTYPE_NCHAR' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_NTEXT' => 'sqlsrv/sqlsrv.php', + 'SQLSRV_SQLTYPE_NUMERIC' => 'sqlsrv/sqlsrv.php', + 'SQLSRV_SQLTYPE_NVARCHAR' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_REAL' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_SMALLDATETIME' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_SMALLINT' => 'sqlsrv/sqlsrv.php', @@ -10396,6 +12001,8 @@ final class PhpStormStubsMap 'SQLSRV_SQLTYPE_TINYINT' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_UDT' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_UNIQUEIDENTIFIER' => 'sqlsrv/sqlsrv.php', + 'SQLSRV_SQLTYPE_VARBINARY' => 'sqlsrv/sqlsrv.php', + 'SQLSRV_SQLTYPE_VARCHAR' => 'sqlsrv/sqlsrv.php', 'SQLSRV_SQLTYPE_XML' => 'sqlsrv/sqlsrv.php', 'SQLSRV_TXN_READ_COMMITTED' => 'sqlsrv/sqlsrv.php', 'SQLSRV_TXN_READ_UNCOMMITTED' => 'sqlsrv/sqlsrv.php', @@ -10502,6 +12109,9 @@ final class PhpStormStubsMap 'SSH2_STREAM_STDIO' => 'ssh2/ssh2.php', 'SSH2_TERM_UNIT_CHARS' => 'ssh2/ssh2.php', 'SSH2_TERM_UNIT_PIXELS' => 'ssh2/ssh2.php', + 'STDERR' => 'Core/Core_d.php', + 'STDIN' => 'Core/Core_d.php', + 'STDOUT' => 'Core/Core_d.php', 'STREAM_BUFFER_FULL' => 'standard/standard_defines.php', 'STREAM_BUFFER_LINE' => 'standard/standard_defines.php', 'STREAM_BUFFER_NONE' => 'standard/standard_defines.php', @@ -10510,29 +12120,29 @@ final class PhpStormStubsMap 'STREAM_CLIENT_ASYNC_CONNECT' => 'standard/standard_defines.php', 'STREAM_CLIENT_CONNECT' => 'standard/standard_defines.php', 'STREAM_CLIENT_PERSISTENT' => 'standard/standard_defines.php', - 'STREAM_CRYPTO_METHOD_ANY_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_ANY_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_SSLv23_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_SSLv23_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_SSLv2_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_SSLv2_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_SSLv3_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_SSLv3_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLS_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLS_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_0_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_1_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_2_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT' => 'openssl/openssl.php', - 'STREAM_CRYPTO_METHOD_TLSv1_3_SERVER' => 'openssl/openssl.php', - 'STREAM_CRYPTO_PROTO_SSLv3' => 'openssl/openssl.php', - 'STREAM_CRYPTO_PROTO_TLSv1_0' => 'openssl/openssl.php', - 'STREAM_CRYPTO_PROTO_TLSv1_1' => 'openssl/openssl.php', - 'STREAM_CRYPTO_PROTO_TLSv1_2' => 'openssl/openssl.php', - 'STREAM_CRYPTO_PROTO_TLSv1_3' => 'openssl/openssl.php', + 'STREAM_CRYPTO_METHOD_ANY_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_ANY_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_SSLv23_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_SSLv23_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_SSLv2_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_SSLv2_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_SSLv3_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_SSLv3_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLS_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLS_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_0_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_1_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_2_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_METHOD_TLSv1_3_SERVER' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_PROTO_SSLv3' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_PROTO_TLSv1_0' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_PROTO_TLSv1_1' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_PROTO_TLSv1_2' => 'standard/standard_defines.php', + 'STREAM_CRYPTO_PROTO_TLSv1_3' => 'standard/standard_defines.php', 'STREAM_ENFORCE_SAFE_MODE' => 'standard/standard_defines.php', 'STREAM_FILTER_ALL' => 'standard/standard_defines.php', 'STREAM_FILTER_READ' => 'standard/standard_defines.php', @@ -10702,11 +12312,392 @@ final class PhpStormStubsMap 'SWF_SOUND_NOT_COMPRESSED' => 'ming/ming.php', 'SWF_SOUND_NOT_COMPRESSED_LE' => 'ming/ming.php', 'SWF_SOUND_STEREO' => 'ming/ming.php', + 'SWOOLE_ASYNC' => 'swoole/constants.php', + 'SWOOLE_BASE' => 'swoole/constants.php', + 'SWOOLE_CHANNEL_CANCELED' => 'swoole/constants.php', + 'SWOOLE_CHANNEL_CLOSED' => 'swoole/constants.php', + 'SWOOLE_CHANNEL_OK' => 'swoole/constants.php', + 'SWOOLE_CHANNEL_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_CORO_END' => 'swoole/constants.php', + 'SWOOLE_CORO_INIT' => 'swoole/constants.php', + 'SWOOLE_CORO_MAX_NUM_LIMIT' => 'swoole/constants.php', + 'SWOOLE_CORO_RUNNING' => 'swoole/constants.php', + 'SWOOLE_CORO_WAITING' => 'swoole/constants.php', + 'SWOOLE_DEBUG' => 'swoole/constants.php', + 'SWOOLE_DEFAULT_MAX_CORO_NUM' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_CO_CONN_LB' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_CO_REQ_LB' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_FDMOD' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_IDLE_WORKER' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_IPMOD' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_RESULT_CLOSE_CONNECTION' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_RESULT_DISCARD_PACKET' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_RESULT_USERFUNC_FALLBACK' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_ROUND' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_STREAM' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_UIDMOD' => 'swoole/constants.php', + 'SWOOLE_DISPATCH_USERFUNC' => 'swoole/constants.php', + 'SWOOLE_DTLS_CLIENT_METHOD' => 'swoole/constants.php', + 'SWOOLE_DTLS_SERVER_METHOD' => 'swoole/constants.php', + 'SWOOLE_ERROR_AIO_BAD_REQUEST' => 'swoole/constants.php', + 'SWOOLE_ERROR_AIO_CANCELED' => 'swoole/constants.php', + 'SWOOLE_ERROR_AIO_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_ERROR_BAD_IPV6_ADDRESS' => 'swoole/constants.php', + 'SWOOLE_ERROR_CLIENT_NO_CONNECTION' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_BLOCK_OBJECT_LOCKED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_BLOCK_OBJECT_WAITING' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_CANCELED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_CANNOT_CANCEL' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_DISABLED_MULTI_THREAD' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_GETCONTEXT_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_HAS_BEEN_BOUND' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_HAS_BEEN_DISCARDED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_IOCPINIT_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_MAKECONTEXT_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_MUTEX_DOUBLE_UNLOCK' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_NOT_EXISTS' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_OUT_OF_COROUTINE' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_PROTECT_STACK_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_STD_THREAD_LINK_ERROR' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_SWAPCONTEXT_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_TIMEDOUT' => 'swoole/constants.php', + 'SWOOLE_ERROR_CO_YIELD_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_DATA_LENGTH_TOO_LARGE' => 'swoole/constants.php', + 'SWOOLE_ERROR_DNSLOOKUP_DUPLICATE_REQUEST' => 'swoole/constants.php', + 'SWOOLE_ERROR_DNSLOOKUP_NO_SERVER' => 'swoole/constants.php', + 'SWOOLE_ERROR_DNSLOOKUP_RESOLVE_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_DNSLOOKUP_RESOLVE_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_ERROR_DNSLOOKUP_UNSUPPORTED' => 'swoole/constants.php', + 'SWOOLE_ERROR_EVENT_SOCKET_REMOVED' => 'swoole/constants.php', + 'SWOOLE_ERROR_FILE_EMPTY' => 'swoole/constants.php', + 'SWOOLE_ERROR_FILE_NOT_EXIST' => 'swoole/constants.php', + 'SWOOLE_ERROR_FILE_TOO_LARGE' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP2_STREAM_ID_TOO_BIG' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP2_STREAM_IGNORE' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP2_STREAM_NOT_FOUND' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP2_STREAM_NO_HEADER' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP_INVALID_PROTOCOL' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP_PROXY_BAD_RESPONSE' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP_PROXY_HANDSHAKE_ERROR' => 'swoole/constants.php', + 'SWOOLE_ERROR_HTTP_PROXY_HANDSHAKE_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_INVALID_PARAMS' => 'swoole/constants.php', + 'SWOOLE_ERROR_MALLOC_FAIL' => 'swoole/constants.php', + 'SWOOLE_ERROR_NAME_TOO_LONG' => 'swoole/constants.php', + 'SWOOLE_ERROR_OPERATION_NOT_SUPPORT' => 'swoole/constants.php', + 'SWOOLE_ERROR_OUTPUT_BUFFER_OVERFLOW' => 'swoole/constants.php', + 'SWOOLE_ERROR_OUTPUT_SEND_YIELD' => 'swoole/constants.php', + 'SWOOLE_ERROR_PACKAGE_LENGTH_NOT_FOUND' => 'swoole/constants.php', + 'SWOOLE_ERROR_PACKAGE_LENGTH_TOO_LARGE' => 'swoole/constants.php', + 'SWOOLE_ERROR_PACKAGE_MALFORMED_DATA' => 'swoole/constants.php', + 'SWOOLE_ERROR_PHP_FATAL_ERROR' => 'swoole/constants.php', + 'SWOOLE_ERROR_PROTOCOL_ERROR' => 'swoole/constants.php', + 'SWOOLE_ERROR_QUEUE_FULL' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_CONNECT_FAIL' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_INVALID_COMMAND' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_INVALID_LISTEN_PORT' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_INVALID_REQUEST' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_MUST_CREATED_BEFORE_CLIENT' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_NO_IDLE_WORKER' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_ONLY_START_ONE' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_PIPE_BUFFER_FULL' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_SEND_IN_MASTER' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_TOO_MANY_LISTEN_PORT' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_TOO_MANY_SOCKET' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_WORKER_ABNORMAL_PIPE_DATA' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_WORKER_EXIT_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_WORKER_TERMINATED' => 'swoole/constants.php', + 'SWOOLE_ERROR_SERVER_WORKER_UNPROCESSED_DATA' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_CLOSED' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_CLOSED_BY_CLIENT' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_CLOSED_BY_SERVER' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_CLOSING' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_DISCARD_DATA' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_DISCARD_TIMEOUT_DATA' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_INVALID_ID' => 'swoole/constants.php', + 'SWOOLE_ERROR_SESSION_NOT_EXIST' => 'swoole/constants.php', + 'SWOOLE_ERROR_SOCKET_CLOSED' => 'swoole/constants.php', + 'SWOOLE_ERROR_SOCKET_POLL_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_ERROR_SOCKS5_AUTH_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_SOCKS5_HANDSHAKE_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_SOCKS5_SERVER_ERROR' => 'swoole/constants.php', + 'SWOOLE_ERROR_SOCKS5_UNSUPPORT_METHOD' => 'swoole/constants.php', + 'SWOOLE_ERROR_SOCKS5_UNSUPPORT_VERSION' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_BAD_CLIENT' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_BAD_PROTOCOL' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_CANNOT_USE_SENFILE' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_EMPTY_PEER_CERTIFICATE' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_HANDSHAKE_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_NOT_READY' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_RESET' => 'swoole/constants.php', + 'SWOOLE_ERROR_SSL_VERIFY_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_SYSTEM_CALL_FAIL' => 'swoole/constants.php', + 'SWOOLE_ERROR_TASK_DISPATCH_FAIL' => 'swoole/constants.php', + 'SWOOLE_ERROR_TASK_PACKAGE_TOO_BIG' => 'swoole/constants.php', + 'SWOOLE_ERROR_TASK_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_ERROR_UNREGISTERED_SIGNAL' => 'swoole/constants.php', + 'SWOOLE_ERROR_WEBSOCKET_BAD_CLIENT' => 'swoole/constants.php', + 'SWOOLE_ERROR_WEBSOCKET_BAD_OPCODE' => 'swoole/constants.php', + 'SWOOLE_ERROR_WEBSOCKET_HANDSHAKE_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_WEBSOCKET_INCOMPLETE_PACKET' => 'swoole/constants.php', + 'SWOOLE_ERROR_WEBSOCKET_PACK_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_WEBSOCKET_UNCONNECTED' => 'swoole/constants.php', + 'SWOOLE_ERROR_WEBSOCKET_UNPACK_FAILED' => 'swoole/constants.php', + 'SWOOLE_ERROR_WRONG_OPERATION' => 'swoole/constants.php', + 'SWOOLE_EVENT_READ' => 'swoole/constants.php', + 'SWOOLE_EVENT_WRITE' => 'swoole/constants.php', + 'SWOOLE_EXIT_IN_COROUTINE' => 'swoole/constants.php', + 'SWOOLE_EXIT_IN_SERVER' => 'swoole/constants.php', + 'SWOOLE_EXTRA_VERSION' => 'swoole/constants.php', + 'SWOOLE_FILELOCK' => 'swoole/constants.php', + 'SWOOLE_HAVE_BROTLI' => 'swoole/constants.php', + 'SWOOLE_HAVE_COMPRESSION' => 'swoole/constants.php', + 'SWOOLE_HAVE_ZLIB' => 'swoole/constants.php', + 'SWOOLE_HOOK_ALL' => 'swoole/constants.php', + 'SWOOLE_HOOK_BLOCKING_FUNCTION' => 'swoole/constants.php', + 'SWOOLE_HOOK_CURL' => 'swoole/constants.php', + 'SWOOLE_HOOK_FILE' => 'swoole/constants.php', + 'SWOOLE_HOOK_NATIVE_CURL' => 'swoole/constants.php', + 'SWOOLE_HOOK_PROC' => 'swoole/constants.php', + 'SWOOLE_HOOK_SLEEP' => 'swoole/constants.php', + 'SWOOLE_HOOK_SOCKETS' => 'swoole/constants.php', + 'SWOOLE_HOOK_SSL' => 'swoole/constants.php', + 'SWOOLE_HOOK_STDIO' => 'swoole/constants.php', + 'SWOOLE_HOOK_STREAM_FUNCTION' => 'swoole/constants.php', + 'SWOOLE_HOOK_STREAM_SELECT' => 'swoole/constants.php', + 'SWOOLE_HOOK_TCP' => 'swoole/constants.php', + 'SWOOLE_HOOK_TLS' => 'swoole/constants.php', + 'SWOOLE_HOOK_UDG' => 'swoole/constants.php', + 'SWOOLE_HOOK_UDP' => 'swoole/constants.php', + 'SWOOLE_HOOK_UNIX' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_CANCEL' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_COMPRESSION_ERROR' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_CONNECT_ERROR' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_ENHANCE_YOUR_CALM' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_FLOW_CONTROL_ERROR' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_FRAME_SIZE_ERROR' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_INADEQUATE_SECURITY' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_INTERNAL_ERROR' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_NO_ERROR' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_PROTOCOL_ERROR' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_REFUSED_STREAM' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_SETTINGS_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_HTTP2_ERROR_STREAM_CLOSED' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_CONTINUATION' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_DATA' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_GOAWAY' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_HEADERS' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_PING' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_PRIORITY' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_PUSH_PROMISE' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_RST_STREAM' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_SETTINGS' => 'swoole/constants.php', + 'SWOOLE_HTTP2_TYPE_WINDOW_UPDATE' => 'swoole/constants.php', + 'SWOOLE_HTTP_CLIENT_ESTATUS_CONNECT_FAILED' => 'swoole/constants.php', + 'SWOOLE_HTTP_CLIENT_ESTATUS_REQUEST_TIMEOUT' => 'swoole/constants.php', + 'SWOOLE_HTTP_CLIENT_ESTATUS_SEND_FAILED' => 'swoole/constants.php', + 'SWOOLE_HTTP_CLIENT_ESTATUS_SERVER_RESET' => 'swoole/constants.php', + 'SWOOLE_IOV_MAX' => 'swoole/constants.php', + 'SWOOLE_IPC_MSGQUEUE' => 'swoole/constants.php', + 'SWOOLE_IPC_NONE' => 'swoole/constants.php', + 'SWOOLE_IPC_PREEMPTIVE' => 'swoole/constants.php', + 'SWOOLE_IPC_SOCKET' => 'swoole/constants.php', + 'SWOOLE_IPC_UNIXSOCK' => 'swoole/constants.php', + 'SWOOLE_IPC_UNSOCK' => 'swoole/constants.php', + 'SWOOLE_KEEP' => 'swoole/constants.php', + 'SWOOLE_LOG_DEBUG' => 'swoole/constants.php', + 'SWOOLE_LOG_ERROR' => 'swoole/constants.php', + 'SWOOLE_LOG_INFO' => 'swoole/constants.php', + 'SWOOLE_LOG_NONE' => 'swoole/constants.php', + 'SWOOLE_LOG_NOTICE' => 'swoole/constants.php', + 'SWOOLE_LOG_ROTATION_DAILY' => 'swoole/constants.php', + 'SWOOLE_LOG_ROTATION_EVERY_MINUTE' => 'swoole/constants.php', + 'SWOOLE_LOG_ROTATION_HOURLY' => 'swoole/constants.php', + 'SWOOLE_LOG_ROTATION_MONTHLY' => 'swoole/constants.php', + 'SWOOLE_LOG_ROTATION_SINGLE' => 'swoole/constants.php', + 'SWOOLE_LOG_TRACE' => 'swoole/constants.php', + 'SWOOLE_LOG_WARNING' => 'swoole/constants.php', + 'SWOOLE_MAJOR_VERSION' => 'swoole/constants.php', + 'SWOOLE_MINOR_VERSION' => 'swoole/constants.php', + 'SWOOLE_MUTEX' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_CANT_FIND_CHARSET' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_COMMANDS_OUT_OF_SYNC' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_CONNECTION_ERROR' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_INVALID_BUFFER_USE' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_INVALID_PARAMETER_NO' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_MALFORMED_PACKET' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_NOT_IMPLEMENTED' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_NO_PREPARE_STMT' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_OUT_OF_MEMORY' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_PARAMS_NOT_BOUND' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_SERVER_GONE_ERROR' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_SERVER_LOST' => 'swoole/constants.php', + 'SWOOLE_MYSQLND_CR_UNKNOWN_ERROR' => 'swoole/constants.php', + 'SWOOLE_PROCESS' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_ALLOC' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_CLOSED' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_EOF' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_IO' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_NOAUTH' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_OOM' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_OTHER' => 'swoole/constants.php', + 'SWOOLE_REDIS_ERR_PROTOCOL' => 'swoole/constants.php', + 'SWOOLE_REDIS_MODE_MULTI' => 'swoole/constants.php', + 'SWOOLE_REDIS_MODE_PIPELINE' => 'swoole/constants.php', + 'SWOOLE_REDIS_TYPE_HASH' => 'swoole/constants.php', + 'SWOOLE_REDIS_TYPE_LIST' => 'swoole/constants.php', + 'SWOOLE_REDIS_TYPE_NOT_FOUND' => 'swoole/constants.php', + 'SWOOLE_REDIS_TYPE_SET' => 'swoole/constants.php', + 'SWOOLE_REDIS_TYPE_STRING' => 'swoole/constants.php', + 'SWOOLE_REDIS_TYPE_ZSET' => 'swoole/constants.php', + 'SWOOLE_RELEASE_VERSION' => 'swoole/constants.php', + 'SWOOLE_RWLOCK' => 'swoole/constants.php', + 'SWOOLE_SEM' => 'swoole/constants.php', + 'SWOOLE_SERVER_COMMAND_EVENT_WORKER' => 'swoole/constants.php', + 'SWOOLE_SERVER_COMMAND_MANAGER' => 'swoole/constants.php', + 'SWOOLE_SERVER_COMMAND_MASTER' => 'swoole/constants.php', + 'SWOOLE_SERVER_COMMAND_REACTOR_THREAD' => 'swoole/constants.php', + 'SWOOLE_SERVER_COMMAND_TASK_WORKER' => 'swoole/constants.php', + 'SWOOLE_SERVER_COMMAND_WORKER' => 'swoole/constants.php', + 'SWOOLE_SOCK_ASYNC' => 'swoole/constants.php', + 'SWOOLE_SOCK_SYNC' => 'swoole/constants.php', + 'SWOOLE_SOCK_TCP' => 'swoole/constants.php', + 'SWOOLE_SOCK_TCP6' => 'swoole/constants.php', + 'SWOOLE_SOCK_UDP' => 'swoole/constants.php', + 'SWOOLE_SOCK_UDP6' => 'swoole/constants.php', + 'SWOOLE_SOCK_UNIX_DGRAM' => 'swoole/constants.php', + 'SWOOLE_SOCK_UNIX_STREAM' => 'swoole/constants.php', + 'SWOOLE_SPINLOCK' => 'swoole/constants.php', + 'SWOOLE_SSL' => 'swoole/constants.php', + 'SWOOLE_SSL_DTLS' => 'swoole/constants.php', + 'SWOOLE_SSL_SSLv2' => 'swoole/constants.php', + 'SWOOLE_SSL_TLSv1' => 'swoole/constants.php', + 'SWOOLE_SSL_TLSv1_1' => 'swoole/constants.php', + 'SWOOLE_SSL_TLSv1_2' => 'swoole/constants.php', + 'SWOOLE_SSL_TLSv1_3' => 'swoole/constants.php', + 'SWOOLE_SSLv23_CLIENT_METHOD' => 'swoole/constants.php', + 'SWOOLE_SSLv23_METHOD' => 'swoole/constants.php', + 'SWOOLE_SSLv23_SERVER_METHOD' => 'swoole/constants.php', + 'SWOOLE_SSLv3_CLIENT_METHOD' => 'swoole/constants.php', + 'SWOOLE_SSLv3_METHOD' => 'swoole/constants.php', + 'SWOOLE_SSLv3_SERVER_METHOD' => 'swoole/constants.php', + 'SWOOLE_STRERROR_DNS' => 'swoole/constants.php', + 'SWOOLE_STRERROR_GAI' => 'swoole/constants.php', + 'SWOOLE_STRERROR_SWOOLE' => 'swoole/constants.php', + 'SWOOLE_STRERROR_SYSTEM' => 'swoole/constants.php', + 'SWOOLE_SYNC' => 'swoole/constants.php', + 'SWOOLE_TASK_CALLBACK' => 'swoole/constants.php', + 'SWOOLE_TASK_COROUTINE' => 'swoole/constants.php', + 'SWOOLE_TASK_NONBLOCK' => 'swoole/constants.php', + 'SWOOLE_TASK_NOREPLY' => 'swoole/constants.php', + 'SWOOLE_TASK_PEEK' => 'swoole/constants.php', + 'SWOOLE_TASK_SERIALIZE' => 'swoole/constants.php', + 'SWOOLE_TASK_TMPFILE' => 'swoole/constants.php', + 'SWOOLE_TASK_WAITALL' => 'swoole/constants.php', + 'SWOOLE_TCP' => 'swoole/constants.php', + 'SWOOLE_TCP6' => 'swoole/constants.php', + 'SWOOLE_TIMER_MAX_MS' => 'swoole/constants.php', + 'SWOOLE_TIMER_MAX_SEC' => 'swoole/constants.php', + 'SWOOLE_TIMER_MIN_MS' => 'swoole/constants.php', + 'SWOOLE_TIMER_MIN_SEC' => 'swoole/constants.php', + 'SWOOLE_TLS_CLIENT_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLS_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLS_SERVER_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_1_CLIENT_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_1_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_1_SERVER_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_2_CLIENT_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_2_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_2_SERVER_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_CLIENT_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_METHOD' => 'swoole/constants.php', + 'SWOOLE_TLSv1_SERVER_METHOD' => 'swoole/constants.php', + 'SWOOLE_TRACE_AIO' => 'swoole/constants.php', + 'SWOOLE_TRACE_ALL' => 'swoole/constants.php', + 'SWOOLE_TRACE_BUFFER' => 'swoole/constants.php', + 'SWOOLE_TRACE_CARES' => 'swoole/constants.php', + 'SWOOLE_TRACE_CHANNEL' => 'swoole/constants.php', + 'SWOOLE_TRACE_CLIENT' => 'swoole/constants.php', + 'SWOOLE_TRACE_CLOSE' => 'swoole/constants.php', + 'SWOOLE_TRACE_CONN' => 'swoole/constants.php', + 'SWOOLE_TRACE_CONTEXT' => 'swoole/constants.php', + 'SWOOLE_TRACE_COROUTINE' => 'swoole/constants.php', + 'SWOOLE_TRACE_CO_CURL' => 'swoole/constants.php', + 'SWOOLE_TRACE_CO_HTTP_SERVER' => 'swoole/constants.php', + 'SWOOLE_TRACE_EOF_PROTOCOL' => 'swoole/constants.php', + 'SWOOLE_TRACE_EVENT' => 'swoole/constants.php', + 'SWOOLE_TRACE_HTTP' => 'swoole/constants.php', + 'SWOOLE_TRACE_HTTP2' => 'swoole/constants.php', + 'SWOOLE_TRACE_HTTP_CLIENT' => 'swoole/constants.php', + 'SWOOLE_TRACE_LENGTH_PROTOCOL' => 'swoole/constants.php', + 'SWOOLE_TRACE_MEMORY' => 'swoole/constants.php', + 'SWOOLE_TRACE_MYSQL_CLIENT' => 'swoole/constants.php', + 'SWOOLE_TRACE_NORMAL' => 'swoole/constants.php', + 'SWOOLE_TRACE_PHP' => 'swoole/constants.php', + 'SWOOLE_TRACE_REACTOR' => 'swoole/constants.php', + 'SWOOLE_TRACE_REDIS_CLIENT' => 'swoole/constants.php', + 'SWOOLE_TRACE_SERVER' => 'swoole/constants.php', + 'SWOOLE_TRACE_SOCKET' => 'swoole/constants.php', + 'SWOOLE_TRACE_SSL' => 'swoole/constants.php', + 'SWOOLE_TRACE_TABLE' => 'swoole/constants.php', + 'SWOOLE_TRACE_TIMER' => 'swoole/constants.php', + 'SWOOLE_TRACE_WEBSOCKET' => 'swoole/constants.php', + 'SWOOLE_TRACE_WORKER' => 'swoole/constants.php', + 'SWOOLE_UDP' => 'swoole/constants.php', + 'SWOOLE_UDP6' => 'swoole/constants.php', + 'SWOOLE_UNIX_DGRAM' => 'swoole/constants.php', + 'SWOOLE_UNIX_STREAM' => 'swoole/constants.php', + 'SWOOLE_USE_HTTP2' => 'swoole/constants.php', + 'SWOOLE_USE_SHORTNAME' => 'swoole/constants.php', + 'SWOOLE_VERSION' => 'swoole/constants.php', + 'SWOOLE_VERSION_ID' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_ABNORMAL' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_DATA_ERROR' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_EXTENSION_MISSING' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_GOING_AWAY' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_MESSAGE_ERROR' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_MESSAGE_TOO_BIG' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_NORMAL' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_POLICY_ERROR' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_PROTOCOL_ERROR' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_SERVER_ERROR' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_STATUS_ERROR' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_CLOSE_TLS' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_FLAG_COMPRESS' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_FLAG_FIN' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_FLAG_MASK' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_FLAG_RSV1' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_FLAG_RSV2' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_FLAG_RSV3' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_OPCODE_BINARY' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_OPCODE_CLOSE' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_OPCODE_CONTINUATION' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_OPCODE_PING' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_OPCODE_PONG' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_OPCODE_TEXT' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_STATUS_ACTIVE' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_STATUS_CLOSING' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_STATUS_CONNECTION' => 'swoole/constants.php', + 'SWOOLE_WEBSOCKET_STATUS_HANDSHAKE' => 'swoole/constants.php', + 'SWOOLE_WORKER_BUSY' => 'swoole/constants.php', + 'SWOOLE_WORKER_EXIT' => 'swoole/constants.php', + 'SWOOLE_WORKER_IDLE' => 'swoole/constants.php', 'S_ALL' => 'Core/Core_d.php', 'S_EXECUTOR' => 'Core/Core_d.php', 'S_FILES' => 'Core/Core_d.php', 'S_INCLUDE' => 'Core/Core_d.php', 'S_INTERNAL' => 'Core/Core_d.php', + 'S_IRGRP' => 'dio/dio_d.php', + 'S_IROTH' => 'dio/dio_d.php', + 'S_IRUSR' => 'dio/dio_d.php', + 'S_IRWXG' => 'dio/dio_d.php', + 'S_IRWXO' => 'dio/dio_d.php', + 'S_IRWXU' => 'dio/dio_d.php', + 'S_IWGRP' => 'dio/dio_d.php', + 'S_IWOTH' => 'dio/dio_d.php', + 'S_IWUSR' => 'dio/dio_d.php', + 'S_IXGRP' => 'dio/dio_d.php', + 'S_IXOTH' => 'dio/dio_d.php', + 'S_IXUSR' => 'dio/dio_d.php', 'S_MAIL' => 'Core/Core_d.php', 'S_MEMORY' => 'Core/Core_d.php', 'S_MISC' => 'Core/Core_d.php', @@ -10769,7 +12760,14 @@ final class PhpStormStubsMap 'Sodium\\CRYPTO_STREAM_NONCEBYTES' => 'libsodium/libsodium.php', 'Spinner' => 'winbinder/winbinder.php', 'StatusBar' => 'winbinder/winbinder.php', + 'TCP_CONGESTION' => 'sockets/sockets.php', + 'TCP_DEFER_ACCEPT' => 'sockets/sockets.php', + 'TCP_KEEPCNT' => 'sockets/sockets.php', + 'TCP_KEEPIDLE' => 'sockets/sockets.php', + 'TCP_KEEPINTVL' => 'sockets/sockets.php', 'TCP_NODELAY' => 'sockets/sockets.php', + 'TCP_NOTSENT_LOWAT' => 'sockets/sockets.php', + 'THOUSANDS_SEP' => 'standard/standard_defines.php', 'THOUSEP' => 'standard/standard_defines.php', 'TIDY_NODETYPE_ASP' => 'tidy/tidy.php', 'TIDY_NODETYPE_CDATA' => 'tidy/tidy.php', @@ -10792,9 +12790,13 @@ final class PhpStormStubsMap 'TIDY_TAG_ALIGN' => 'tidy/tidy.php', 'TIDY_TAG_APPLET' => 'tidy/tidy.php', 'TIDY_TAG_AREA' => 'tidy/tidy.php', + 'TIDY_TAG_ARTICLE' => 'tidy/tidy.php', + 'TIDY_TAG_ASIDE' => 'tidy/tidy.php', + 'TIDY_TAG_AUDIO' => 'tidy/tidy.php', 'TIDY_TAG_B' => 'tidy/tidy.php', 'TIDY_TAG_BASE' => 'tidy/tidy.php', 'TIDY_TAG_BASEFONT' => 'tidy/tidy.php', + 'TIDY_TAG_BDI' => 'tidy/tidy.php', 'TIDY_TAG_BDO' => 'tidy/tidy.php', 'TIDY_TAG_BGSOUND' => 'tidy/tidy.php', 'TIDY_TAG_BIG' => 'tidy/tidy.php', @@ -10803,16 +12805,21 @@ final class PhpStormStubsMap 'TIDY_TAG_BODY' => 'tidy/tidy.php', 'TIDY_TAG_BR' => 'tidy/tidy.php', 'TIDY_TAG_BUTTON' => 'tidy/tidy.php', + 'TIDY_TAG_CANVAS' => 'tidy/tidy.php', 'TIDY_TAG_CAPTION' => 'tidy/tidy.php', 'TIDY_TAG_CENTER' => 'tidy/tidy.php', 'TIDY_TAG_CITE' => 'tidy/tidy.php', 'TIDY_TAG_CODE' => 'tidy/tidy.php', 'TIDY_TAG_COL' => 'tidy/tidy.php', 'TIDY_TAG_COLGROUP' => 'tidy/tidy.php', + 'TIDY_TAG_COMMAND' => 'tidy/tidy.php', 'TIDY_TAG_COMMENT' => 'tidy/tidy.php', + 'TIDY_TAG_DATALIST' => 'tidy/tidy.php', 'TIDY_TAG_DD' => 'tidy/tidy.php', 'TIDY_TAG_DEL' => 'tidy/tidy.php', + 'TIDY_TAG_DETAILS' => 'tidy/tidy.php', 'TIDY_TAG_DFN' => 'tidy/tidy.php', + 'TIDY_TAG_DIALOG' => 'tidy/tidy.php', 'TIDY_TAG_DIR' => 'tidy/tidy.php', 'TIDY_TAG_DIV' => 'tidy/tidy.php', 'TIDY_TAG_DL' => 'tidy/tidy.php', @@ -10820,7 +12827,10 @@ final class PhpStormStubsMap 'TIDY_TAG_EM' => 'tidy/tidy.php', 'TIDY_TAG_EMBED' => 'tidy/tidy.php', 'TIDY_TAG_FIELDSET' => 'tidy/tidy.php', + 'TIDY_TAG_FIGCAPTION' => 'tidy/tidy.php', + 'TIDY_TAG_FIGURE' => 'tidy/tidy.php', 'TIDY_TAG_FONT' => 'tidy/tidy.php', + 'TIDY_TAG_FOOTER' => 'tidy/tidy.php', 'TIDY_TAG_FORM' => 'tidy/tidy.php', 'TIDY_TAG_FRAME' => 'tidy/tidy.php', 'TIDY_TAG_FRAMESET' => 'tidy/tidy.php', @@ -10831,6 +12841,8 @@ final class PhpStormStubsMap 'TIDY_TAG_H5' => 'tidy/tidy.php', 'TIDY_TAG_H6' => 'tidy/tidy.php', 'TIDY_TAG_HEAD' => 'tidy/tidy.php', + 'TIDY_TAG_HEADER' => 'tidy/tidy.php', + 'TIDY_TAG_HGROUP' => 'tidy/tidy.php', 'TIDY_TAG_HR' => 'tidy/tidy.php', 'TIDY_TAG_HTML' => 'tidy/tidy.php', 'TIDY_TAG_I' => 'tidy/tidy.php', @@ -10848,11 +12860,16 @@ final class PhpStormStubsMap 'TIDY_TAG_LI' => 'tidy/tidy.php', 'TIDY_TAG_LINK' => 'tidy/tidy.php', 'TIDY_TAG_LISTING' => 'tidy/tidy.php', + 'TIDY_TAG_MAIN' => 'tidy/tidy.php', 'TIDY_TAG_MAP' => 'tidy/tidy.php', + 'TIDY_TAG_MARK' => 'tidy/tidy.php', 'TIDY_TAG_MARQUEE' => 'tidy/tidy.php', 'TIDY_TAG_MENU' => 'tidy/tidy.php', + 'TIDY_TAG_MENUITEM' => 'tidy/tidy.php', 'TIDY_TAG_META' => 'tidy/tidy.php', + 'TIDY_TAG_METER' => 'tidy/tidy.php', 'TIDY_TAG_MULTICOL' => 'tidy/tidy.php', + 'TIDY_TAG_NAV' => 'tidy/tidy.php', 'TIDY_TAG_NOBR' => 'tidy/tidy.php', 'TIDY_TAG_NOEMBED' => 'tidy/tidy.php', 'TIDY_TAG_NOFRAMES' => 'tidy/tidy.php', @@ -10863,10 +12880,12 @@ final class PhpStormStubsMap 'TIDY_TAG_OL' => 'tidy/tidy.php', 'TIDY_TAG_OPTGROUP' => 'tidy/tidy.php', 'TIDY_TAG_OPTION' => 'tidy/tidy.php', + 'TIDY_TAG_OUTPUT' => 'tidy/tidy.php', 'TIDY_TAG_P' => 'tidy/tidy.php', 'TIDY_TAG_PARAM' => 'tidy/tidy.php', 'TIDY_TAG_PLAINTEXT' => 'tidy/tidy.php', 'TIDY_TAG_PRE' => 'tidy/tidy.php', + 'TIDY_TAG_PROGRESS' => 'tidy/tidy.php', 'TIDY_TAG_Q' => 'tidy/tidy.php', 'TIDY_TAG_RB' => 'tidy/tidy.php', 'TIDY_TAG_RBC' => 'tidy/tidy.php', @@ -10877,31 +12896,38 @@ final class PhpStormStubsMap 'TIDY_TAG_S' => 'tidy/tidy.php', 'TIDY_TAG_SAMP' => 'tidy/tidy.php', 'TIDY_TAG_SCRIPT' => 'tidy/tidy.php', + 'TIDY_TAG_SECTION' => 'tidy/tidy.php', 'TIDY_TAG_SELECT' => 'tidy/tidy.php', 'TIDY_TAG_SERVER' => 'tidy/tidy.php', 'TIDY_TAG_SERVLET' => 'tidy/tidy.php', 'TIDY_TAG_SMALL' => 'tidy/tidy.php', + 'TIDY_TAG_SOURCE' => 'tidy/tidy.php', 'TIDY_TAG_SPACER' => 'tidy/tidy.php', 'TIDY_TAG_SPAN' => 'tidy/tidy.php', 'TIDY_TAG_STRIKE' => 'tidy/tidy.php', 'TIDY_TAG_STRONG' => 'tidy/tidy.php', 'TIDY_TAG_STYLE' => 'tidy/tidy.php', 'TIDY_TAG_SUB' => 'tidy/tidy.php', + 'TIDY_TAG_SUMMARY' => 'tidy/tidy.php', 'TIDY_TAG_SUP' => 'tidy/tidy.php', 'TIDY_TAG_TABLE' => 'tidy/tidy.php', 'TIDY_TAG_TBODY' => 'tidy/tidy.php', 'TIDY_TAG_TD' => 'tidy/tidy.php', + 'TIDY_TAG_TEMPLATE' => 'tidy/tidy.php', 'TIDY_TAG_TEXTAREA' => 'tidy/tidy.php', 'TIDY_TAG_TFOOT' => 'tidy/tidy.php', 'TIDY_TAG_TH' => 'tidy/tidy.php', 'TIDY_TAG_THEAD' => 'tidy/tidy.php', + 'TIDY_TAG_TIME' => 'tidy/tidy.php', 'TIDY_TAG_TITLE' => 'tidy/tidy.php', 'TIDY_TAG_TR' => 'tidy/tidy.php', + 'TIDY_TAG_TRACK' => 'tidy/tidy.php', 'TIDY_TAG_TT' => 'tidy/tidy.php', 'TIDY_TAG_U' => 'tidy/tidy.php', 'TIDY_TAG_UL' => 'tidy/tidy.php', 'TIDY_TAG_UNKNOWN' => 'tidy/tidy.php', 'TIDY_TAG_VAR' => 'tidy/tidy.php', + 'TIDY_TAG_VIDEO' => 'tidy/tidy.php', 'TIDY_TAG_WBR' => 'tidy/tidy.php', 'TIDY_TAG_XMP' => 'tidy/tidy.php', 'TOKEN_PARSE' => 'tokenizer/tokenizer.php', @@ -10917,10 +12943,13 @@ final class PhpStormStubsMap 'TYPETEXT' => 'imap/imap.php', 'TYPEVIDEO' => 'imap/imap.php', 'T_ABSTRACT' => 'tokenizer/tokenizer.php', + 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG' => 'tokenizer/tokenizer.php', + 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG' => 'tokenizer/tokenizer.php', 'T_AND_EQUAL' => 'tokenizer/tokenizer.php', 'T_ARRAY' => 'tokenizer/tokenizer.php', 'T_ARRAY_CAST' => 'tokenizer/tokenizer.php', 'T_AS' => 'tokenizer/tokenizer.php', + 'T_ATTRIBUTE' => 'tokenizer/tokenizer.php', 'T_BAD_CHARACTER' => 'tokenizer/tokenizer.php', 'T_BOOLEAN_AND' => 'tokenizer/tokenizer.php', 'T_BOOLEAN_OR' => 'tokenizer/tokenizer.php', @@ -10929,6 +12958,7 @@ final class PhpStormStubsMap 'T_CALLABLE' => 'tokenizer/tokenizer.php', 'T_CASE' => 'tokenizer/tokenizer.php', 'T_CATCH' => 'tokenizer/tokenizer.php', + 'T_CHARACTER' => 'tokenizer/tokenizer.php', 'T_CLASS' => 'tokenizer/tokenizer.php', 'T_CLASS_C' => 'tokenizer/tokenizer.php', 'T_CLONE' => 'tokenizer/tokenizer.php', @@ -10966,6 +12996,7 @@ final class PhpStormStubsMap 'T_ENDSWITCH' => 'tokenizer/tokenizer.php', 'T_ENDWHILE' => 'tokenizer/tokenizer.php', 'T_END_HEREDOC' => 'tokenizer/tokenizer.php', + 'T_ENUM' => 'tokenizer/tokenizer.php', 'T_EVAL' => 'tokenizer/tokenizer.php', 'T_EXIT' => 'tokenizer/tokenizer.php', 'T_EXTENDS' => 'tokenizer/tokenizer.php', @@ -11005,14 +13036,19 @@ final class PhpStormStubsMap 'T_LOGICAL_AND' => 'tokenizer/tokenizer.php', 'T_LOGICAL_OR' => 'tokenizer/tokenizer.php', 'T_LOGICAL_XOR' => 'tokenizer/tokenizer.php', + 'T_MATCH' => 'tokenizer/tokenizer.php', 'T_METHOD_C' => 'tokenizer/tokenizer.php', 'T_MINUS_EQUAL' => 'tokenizer/tokenizer.php', 'T_MOD_EQUAL' => 'tokenizer/tokenizer.php', 'T_MUL_EQUAL' => 'tokenizer/tokenizer.php', 'T_NAMESPACE' => 'tokenizer/tokenizer.php', + 'T_NAME_FULLY_QUALIFIED' => 'tokenizer/tokenizer.php', + 'T_NAME_QUALIFIED' => 'tokenizer/tokenizer.php', + 'T_NAME_RELATIVE' => 'tokenizer/tokenizer.php', 'T_NEW' => 'tokenizer/tokenizer.php', 'T_NS_C' => 'tokenizer/tokenizer.php', 'T_NS_SEPARATOR' => 'tokenizer/tokenizer.php', + 'T_NULLSAFE_OBJECT_OPERATOR' => 'tokenizer/tokenizer.php', 'T_NUM_STRING' => 'tokenizer/tokenizer.php', 'T_OBJECT_CAST' => 'tokenizer/tokenizer.php', 'T_OBJECT_OPERATOR' => 'tokenizer/tokenizer.php', @@ -11027,6 +13063,7 @@ final class PhpStormStubsMap 'T_PRIVATE' => 'tokenizer/tokenizer.php', 'T_PROTECTED' => 'tokenizer/tokenizer.php', 'T_PUBLIC' => 'tokenizer/tokenizer.php', + 'T_READONLY' => 'tokenizer/tokenizer.php', 'T_REQUIRE' => 'tokenizer/tokenizer.php', 'T_REQUIRE_ONCE' => 'tokenizer/tokenizer.php', 'T_RETURN' => 'tokenizer/tokenizer.php', @@ -11071,6 +13108,20 @@ final class PhpStormStubsMap 'UPLOAD_ERR_NO_TMP_DIR' => 'Core/Core_d.php', 'UPLOAD_ERR_OK' => 'Core/Core_d.php', 'UPLOAD_ERR_PARTIAL' => 'Core/Core_d.php', + 'UUID_TYPE_DCE' => 'uuid/uuid_c.php', + 'UUID_TYPE_DEFAULT' => 'uuid/uuid_c.php', + 'UUID_TYPE_INVALID' => 'uuid/uuid_c.php', + 'UUID_TYPE_MD5' => 'uuid/uuid_c.php', + 'UUID_TYPE_NAME' => 'uuid/uuid_c.php', + 'UUID_TYPE_NULL' => 'uuid/uuid_c.php', + 'UUID_TYPE_RANDOM' => 'uuid/uuid_c.php', + 'UUID_TYPE_SECURITY' => 'uuid/uuid_c.php', + 'UUID_TYPE_SHA1' => 'uuid/uuid_c.php', + 'UUID_TYPE_TIME' => 'uuid/uuid_c.php', + 'UUID_VARIANT_DCE' => 'uuid/uuid_c.php', + 'UUID_VARIANT_MICROSOFT' => 'uuid/uuid_c.php', + 'UUID_VARIANT_NCS' => 'uuid/uuid_c.php', + 'UUID_VARIANT_OTHER' => 'uuid/uuid_c.php', 'U_AMBIGUOUS_ALIAS_WARNING' => 'intl/intl.php', 'U_BAD_VARIABLE_DEFINITION' => 'intl/intl.php', 'U_BRK_ASSIGN_ERROR' => 'intl/intl.php', @@ -11216,6 +13267,196 @@ final class PhpStormStubsMap 'VARCMP_GT' => 'com_dotnet/com_dotnet.php', 'VARCMP_LT' => 'com_dotnet/com_dotnet.php', 'VARCMP_NULL' => 'com_dotnet/com_dotnet.php', + 'VIR_CONNECT_FLAG_SOUNDHW_GET_NAMES' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_LIST_NETWORKS_ACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_LIST_NETWORKS_AUTOSTART' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_LIST_NETWORKS_INACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_LIST_NETWORKS_PERSISTENT' => 'libvirt-php/libvirt-php.php', + 'VIR_CONNECT_LIST_NETWORKS_TRANSIENT' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_AUTHNAME' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_CNONCE' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_ECHOPROMPT' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_EXTERNAL' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_LANGUAGE' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_NOECHOPROMPT' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_PASSPHRASE' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_REALM' => 'libvirt-php/libvirt-php.php', + 'VIR_CRED_USERNAME' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_AFFECT_CONFIG' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_AFFECT_CURRENT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_AFFECT_LIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCKED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_COMMIT_ACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_COMMIT_DELETE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_COMMIT_RELATIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_COMMIT_SHALLOW' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_COPY_REUSE_EXT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_COPY_SHALLOW' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_INFO_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_TYPE_COPY' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_TYPE_PULL' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_PULL_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_REBASE_BANDWIDTH_BYTES' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_REBASE_COPY' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_REBASE_COPY_DEV' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_REBASE_COPY_RAW' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_REBASE_RELATIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_REBASE_SHALLOW' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_BLOCK_RESIZE_BYTES' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_CRASHED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_DEVICE_MODIFY_CONFIG' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_DEVICE_MODIFY_CURRENT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_DEVICE_MODIFY_FORCE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_DEVICE_MODIFY_LIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_DISK_ACCESS_ALL' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_DISK_BLOCK' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_DISK_FILE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_FLAG_CLOCK_LOCALTIME' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_FLAG_FEATURE_ACPI' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_FLAG_FEATURE_APIC' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_FLAG_FEATURE_PAE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_FLAG_SOUND_AC97' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_FLAG_TEST_LOCAL_VNC' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_JOB_BOUNDED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_JOB_CANCELLED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_JOB_COMPLETED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_JOB_FAILED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_JOB_NONE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_JOB_UNBOUNDED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_AVAILABLE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_NR' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_RSS' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_SWAP_IN' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_SWAP_OUT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEMORY_STAT_UNUSED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEM_CONFIG' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEM_CURRENT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEM_LIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_MEM_MAXIMUM' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_METADATA_DESCRIPTION' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_METADATA_ELEMENT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_METADATA_TITLE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_NONE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_NOSTATE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_PAUSED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_PMSUSPENDED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_RUNNING' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_SHUTDOWN' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_SHUTOFF' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_START_AUTODESTROY' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_START_BYPASS_CACHE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_START_FORCE_BOOT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_START_PAUSED' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_START_VALIDATE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_STATS_BALLOON' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_STATS_BLOCK' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_STATS_CPU_TOTAL' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_STATS_INTERFACE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_STATS_STATE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_STATS_VCPU' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_UNDEFINE_KEEP_NVRAM' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_UNDEFINE_MANAGED_SAVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_UNDEFINE_NVRAM' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_VCPU_CONFIG' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_VCPU_CURRENT' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_VCPU_GUEST' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_VCPU_LIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_VCPU_MAXIMUM' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_XML_INACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_XML_MIGRATABLE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_XML_SECURE' => 'libvirt-php/libvirt-php.php', + 'VIR_DOMAIN_XML_UPDATE_CPU' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_ATSET1' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_ATSET2' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_ATSET3' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_LINUX' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_OSX' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_RFB' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_USB' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_WIN32' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_XT' => 'libvirt-php/libvirt-php.php', + 'VIR_KEYCODE_SET_XT_KBD' => 'libvirt-php/libvirt-php.php', + 'VIR_MEMORY_PHYSICAL' => 'libvirt-php/libvirt-php.php', + 'VIR_MEMORY_VIRTUAL' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_ABORT_ON_ERROR' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_AUTO_CONVERGE' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_CHANGE_PROTECTION' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_COMPRESSED' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_LIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_NON_SHARED_DISK' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_NON_SHARED_INC' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_OFFLINE' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_PAUSED' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_PEER2PEER' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_PERSIST_DEST' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_TUNNELLED' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_UNDEFINE_SOURCE' => 'libvirt-php/libvirt-php.php', + 'VIR_MIGRATE_UNSAFE' => 'libvirt-php/libvirt-php.php', + 'VIR_NETWORKS_ACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_NETWORKS_ALL' => 'libvirt-php/libvirt-php.php', + 'VIR_NETWORKS_INACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_NODE_CPU_STATS_ALL_CPUS' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_ATOMIC' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_CURRENT' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_DISK_ONLY' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_HALT' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_LIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_NO_METADATA' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_QUIESCE' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_REDEFINE' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_CREATE_REUSE_EXT' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_DELETE_CHILDREN' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_DELETE_CHILDREN_ONLY' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_DELETE_METADATA_ONLY' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_ACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_DESCENDANTS' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_DISK_ONLY' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_EXTERNAL' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_INACTIVE' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_INTERNAL' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_LEAVES' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_METADATA' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_NO_LEAVES' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_NO_METADATA' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_LIST_ROOTS' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_REVERT_FORCE' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_REVERT_PAUSED' => 'libvirt-php/libvirt-php.php', + 'VIR_SNAPSHOT_REVERT_RUNNING' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_POOL_BUILD_NEW' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_POOL_BUILD_REPAIR' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_POOL_BUILD_RESIZE' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_VOL_CREATE_REFLINK' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_VOL_RESIZE_ALLOCATE' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_VOL_RESIZE_DELTA' => 'libvirt-php/libvirt-php.php', + 'VIR_STORAGE_VOL_RESIZE_SHRINK' => 'libvirt-php/libvirt-php.php', + 'VIR_VERSION_BINDING' => 'libvirt-php/libvirt-php.php', + 'VIR_VERSION_LIBVIRT' => 'libvirt-php/libvirt-php.php', 'VT_ARRAY' => 'com_dotnet/com_dotnet.php', 'VT_BOOL' => 'com_dotnet/com_dotnet.php', 'VT_BSTR' => 'com_dotnet/com_dotnet.php', @@ -11310,6 +13551,29 @@ final class PhpStormStubsMap 'WBC_YESNO' => 'winbinder/winbinder.php', 'WBC_YESNOCANCEL' => 'winbinder/winbinder.php', 'WCONTINUED' => 'pcntl/pcntl.php', + 'WEBSOCKET_CLOSE_ABNORMAL' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_DATA_ERROR' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_EXTENSION_MISSING' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_GOING_AWAY' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_MESSAGE_ERROR' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_MESSAGE_TOO_BIG' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_NORMAL' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_POLICY_ERROR' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_PROTOCOL_ERROR' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_SERVER_ERROR' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_STATUS_ERROR' => 'swoole/constants.php', + 'WEBSOCKET_CLOSE_TLS' => 'swoole/constants.php', + 'WEBSOCKET_OPCODE_BINARY' => 'swoole/constants.php', + 'WEBSOCKET_OPCODE_CLOSE' => 'swoole/constants.php', + 'WEBSOCKET_OPCODE_CONTINUATION' => 'swoole/constants.php', + 'WEBSOCKET_OPCODE_PING' => 'swoole/constants.php', + 'WEBSOCKET_OPCODE_PONG' => 'swoole/constants.php', + 'WEBSOCKET_OPCODE_TEXT' => 'swoole/constants.php', + 'WEBSOCKET_STATUS_ACTIVE' => 'swoole/constants.php', + 'WEBSOCKET_STATUS_CLOSING' => 'swoole/constants.php', + 'WEBSOCKET_STATUS_CONNECTION' => 'swoole/constants.php', + 'WEBSOCKET_STATUS_FRAME' => 'swoole/constants.php', + 'WEBSOCKET_STATUS_HANDSHAKE' => 'swoole/constants.php', 'WHITE' => 'winbinder/winbinder.php', 'WIN32_ABOVE_NORMAL_PRIORITY_CLASS' => 'win32service/win32service.php', 'WIN32_BELOW_NORMAL_PRIORITY_CLASS' => 'win32service/win32service.php', @@ -11389,11 +13653,26 @@ final class PhpStormStubsMap 'XDEBUG_CC_BRANCH_CHECK' => 'xdebug/xdebug.php', 'XDEBUG_CC_DEAD_CODE' => 'xdebug/xdebug.php', 'XDEBUG_CC_UNUSED' => 'xdebug/xdebug.php', + 'XDEBUG_FILTER_CODE_COVERAGE' => 'xdebug/xdebug.php', + 'XDEBUG_FILTER_NONE' => 'xdebug/xdebug.php', + 'XDEBUG_FILTER_STACK' => 'xdebug/xdebug.php', + 'XDEBUG_FILTER_TRACING' => 'xdebug/xdebug.php', + 'XDEBUG_NAMESPACE_BLACKLIST' => 'xdebug/xdebug.php', + 'XDEBUG_NAMESPACE_EXCLUDE' => 'xdebug/xdebug.php', + 'XDEBUG_NAMESPACE_INCLUDE' => 'xdebug/xdebug.php', + 'XDEBUG_NAMESPACE_WHITELIST' => 'xdebug/xdebug.php', + 'XDEBUG_PATH_BLACKLIST' => 'xdebug/xdebug.php', + 'XDEBUG_PATH_EXCLUDE' => 'xdebug/xdebug.php', + 'XDEBUG_PATH_INCLUDE' => 'xdebug/xdebug.php', + 'XDEBUG_PATH_WHITELIST' => 'xdebug/xdebug.php', 'XDEBUG_STACK_NO_DESC' => 'xdebug/xdebug.php', 'XDEBUG_TRACE_APPEND' => 'xdebug/xdebug.php', 'XDEBUG_TRACE_COMPUTERIZED' => 'xdebug/xdebug.php', 'XDEBUG_TRACE_HTML' => 'xdebug/xdebug.php', 'XDEBUG_TRACE_NAKED_FILENAME' => 'xdebug/xdebug.php', + 'XDIFF_PATCH_IGNORESPACE' => 'xdiff/xdiff.php', + 'XDIFF_PATCH_NORMAL' => 'xdiff/xdiff.php', + 'XDIFF_PATCH_REVERSE' => 'xdiff/xdiff.php', 'XHPROF_FLAGS_CPU' => 'xhprof/xhprof.php', 'XHPROF_FLAGS_MEMORY' => 'xhprof/xhprof.php', 'XHPROF_FLAGS_NO_BUILTINS' => 'xhprof/xhprof.php', @@ -11524,6 +13803,7 @@ final class PhpStormStubsMap 'YAF\\ERR\\TYPE\\ERROR' => 'yaf/yaf_namespace.php', 'YAF\\VERSION' => 'yaf/yaf_namespace.php', 'YAF_ENVIRON' => 'yaf/yaf.php', + 'YAF_ERR_ACCESS_ERROR' => 'yaf/yaf.php', 'YAF_ERR_AUTOLOAD_FAILED' => 'yaf/yaf.php', 'YAF_ERR_CALL_FAILED' => 'yaf/yaf.php', 'YAF_ERR_DISPATCH_FAILED' => 'yaf/yaf.php', @@ -11574,6 +13854,7 @@ final class PhpStormStubsMap 'YAR_OPT_HEADER' => 'yar/yar.php', 'YAR_OPT_PACKAGER' => 'yar/yar.php', 'YAR_OPT_PERSISTENT' => 'yar/yar.php', + 'YAR_OPT_RESOLVE' => 'yar/yar.php', 'YAR_OPT_TIMEOUT' => 'yar/yar.php', 'YAR_PACKAGER_JSON' => 'yar/yar.php', 'YAR_PACKAGER_PHP' => 'yar/yar.php', @@ -11617,6 +13898,9 @@ final class PhpStormStubsMap 'ZLIB_VERNUM' => 'zlib/zlib.php', 'ZLIB_VERSION' => 'zlib/zlib.php', 'ZLIB_VERSION_ERROR' => 'zlib/zlib.php', + 'ZSTD_COMPRESS_LEVEL_DEFAULT' => 'zstd/zstd.php', + 'ZSTD_COMPRESS_LEVEL_MAX' => 'zstd/zstd.php', + 'ZSTD_COMPRESS_LEVEL_MIN' => 'zstd/zstd.php', '__CLASS__' => 'standard/basic.php', '__COMPILER_HALT_OFFSET__' => 'standard/_standard_manual.php', '__DIR__' => 'standard/basic.php', @@ -11634,6 +13918,199 @@ final class PhpStormStubsMap '__method__' => 'standard/basic.php', '__namespace__' => 'standard/basic.php', '__trait__' => 'standard/basic.php', + 'ast\\AST_ARG_LIST' => 'ast/ast.php', + 'ast\\AST_ARRAY' => 'ast/ast.php', + 'ast\\AST_ARRAY_ELEM' => 'ast/ast.php', + 'ast\\AST_ARROW_FUNC' => 'ast/ast.php', + 'ast\\AST_ASSIGN' => 'ast/ast.php', + 'ast\\AST_ASSIGN_OP' => 'ast/ast.php', + 'ast\\AST_ASSIGN_REF' => 'ast/ast.php', + 'ast\\AST_ATTRIBUTE' => 'ast/ast.php', + 'ast\\AST_ATTRIBUTE_GROUP' => 'ast/ast.php', + 'ast\\AST_ATTRIBUTE_LIST' => 'ast/ast.php', + 'ast\\AST_BINARY_OP' => 'ast/ast.php', + 'ast\\AST_BREAK' => 'ast/ast.php', + 'ast\\AST_CALL' => 'ast/ast.php', + 'ast\\AST_CAST' => 'ast/ast.php', + 'ast\\AST_CATCH' => 'ast/ast.php', + 'ast\\AST_CATCH_LIST' => 'ast/ast.php', + 'ast\\AST_CLASS' => 'ast/ast.php', + 'ast\\AST_CLASS_CONST' => 'ast/ast.php', + 'ast\\AST_CLASS_CONST_DECL' => 'ast/ast.php', + 'ast\\AST_CLASS_CONST_GROUP' => 'ast/ast.php', + 'ast\\AST_CLASS_NAME' => 'ast/ast.php', + 'ast\\AST_CLONE' => 'ast/ast.php', + 'ast\\AST_CLOSURE' => 'ast/ast.php', + 'ast\\AST_CLOSURE_USES' => 'ast/ast.php', + 'ast\\AST_CLOSURE_VAR' => 'ast/ast.php', + 'ast\\AST_CONDITIONAL' => 'ast/ast.php', + 'ast\\AST_CONST' => 'ast/ast.php', + 'ast\\AST_CONST_DECL' => 'ast/ast.php', + 'ast\\AST_CONST_ELEM' => 'ast/ast.php', + 'ast\\AST_CONTINUE' => 'ast/ast.php', + 'ast\\AST_DECLARE' => 'ast/ast.php', + 'ast\\AST_DIM' => 'ast/ast.php', + 'ast\\AST_DO_WHILE' => 'ast/ast.php', + 'ast\\AST_ECHO' => 'ast/ast.php', + 'ast\\AST_EMPTY' => 'ast/ast.php', + 'ast\\AST_ENCAPS_LIST' => 'ast/ast.php', + 'ast\\AST_EXIT' => 'ast/ast.php', + 'ast\\AST_EXPR_LIST' => 'ast/ast.php', + 'ast\\AST_FOR' => 'ast/ast.php', + 'ast\\AST_FOREACH' => 'ast/ast.php', + 'ast\\AST_FUNC_DECL' => 'ast/ast.php', + 'ast\\AST_GLOBAL' => 'ast/ast.php', + 'ast\\AST_GOTO' => 'ast/ast.php', + 'ast\\AST_GROUP_USE' => 'ast/ast.php', + 'ast\\AST_HALT_COMPILER' => 'ast/ast.php', + 'ast\\AST_IF' => 'ast/ast.php', + 'ast\\AST_IF_ELEM' => 'ast/ast.php', + 'ast\\AST_INCLUDE_OR_EVAL' => 'ast/ast.php', + 'ast\\AST_INSTANCEOF' => 'ast/ast.php', + 'ast\\AST_ISSET' => 'ast/ast.php', + 'ast\\AST_LABEL' => 'ast/ast.php', + 'ast\\AST_LIST' => 'ast/ast.php', + 'ast\\AST_MAGIC_CONST' => 'ast/ast.php', + 'ast\\AST_MATCH' => 'ast/ast.php', + 'ast\\AST_MATCH_ARM' => 'ast/ast.php', + 'ast\\AST_MATCH_ARM_LIST' => 'ast/ast.php', + 'ast\\AST_METHOD' => 'ast/ast.php', + 'ast\\AST_METHOD_CALL' => 'ast/ast.php', + 'ast\\AST_METHOD_REFERENCE' => 'ast/ast.php', + 'ast\\AST_NAME' => 'ast/ast.php', + 'ast\\AST_NAMED_ARG' => 'ast/ast.php', + 'ast\\AST_NAMESPACE' => 'ast/ast.php', + 'ast\\AST_NAME_LIST' => 'ast/ast.php', + 'ast\\AST_NEW' => 'ast/ast.php', + 'ast\\AST_NULLABLE_TYPE' => 'ast/ast.php', + 'ast\\AST_NULLSAFE_METHOD_CALL' => 'ast/ast.php', + 'ast\\AST_NULLSAFE_PROP' => 'ast/ast.php', + 'ast\\AST_PARAM' => 'ast/ast.php', + 'ast\\AST_PARAM_LIST' => 'ast/ast.php', + 'ast\\AST_POST_DEC' => 'ast/ast.php', + 'ast\\AST_POST_INC' => 'ast/ast.php', + 'ast\\AST_PRE_DEC' => 'ast/ast.php', + 'ast\\AST_PRE_INC' => 'ast/ast.php', + 'ast\\AST_PRINT' => 'ast/ast.php', + 'ast\\AST_PROP' => 'ast/ast.php', + 'ast\\AST_PROP_DECL' => 'ast/ast.php', + 'ast\\AST_PROP_ELEM' => 'ast/ast.php', + 'ast\\AST_PROP_GROUP' => 'ast/ast.php', + 'ast\\AST_REF' => 'ast/ast.php', + 'ast\\AST_RETURN' => 'ast/ast.php', + 'ast\\AST_SHELL_EXEC' => 'ast/ast.php', + 'ast\\AST_STATIC' => 'ast/ast.php', + 'ast\\AST_STATIC_CALL' => 'ast/ast.php', + 'ast\\AST_STATIC_PROP' => 'ast/ast.php', + 'ast\\AST_STMT_LIST' => 'ast/ast.php', + 'ast\\AST_SWITCH' => 'ast/ast.php', + 'ast\\AST_SWITCH_CASE' => 'ast/ast.php', + 'ast\\AST_SWITCH_LIST' => 'ast/ast.php', + 'ast\\AST_THROW' => 'ast/ast.php', + 'ast\\AST_TRAIT_ADAPTATIONS' => 'ast/ast.php', + 'ast\\AST_TRAIT_ALIAS' => 'ast/ast.php', + 'ast\\AST_TRAIT_PRECEDENCE' => 'ast/ast.php', + 'ast\\AST_TRY' => 'ast/ast.php', + 'ast\\AST_TYPE' => 'ast/ast.php', + 'ast\\AST_TYPE_UNION' => 'ast/ast.php', + 'ast\\AST_UNARY_OP' => 'ast/ast.php', + 'ast\\AST_UNPACK' => 'ast/ast.php', + 'ast\\AST_UNSET' => 'ast/ast.php', + 'ast\\AST_USE' => 'ast/ast.php', + 'ast\\AST_USE_ELEM' => 'ast/ast.php', + 'ast\\AST_USE_TRAIT' => 'ast/ast.php', + 'ast\\AST_VAR' => 'ast/ast.php', + 'ast\\AST_WHILE' => 'ast/ast.php', + 'ast\\AST_YIELD' => 'ast/ast.php', + 'ast\\AST_YIELD_FROM' => 'ast/ast.php', + 'ast\\flags\\ARRAY_ELEM_REF' => 'ast/ast.php', + 'ast\\flags\\ARRAY_SYNTAX_LIST' => 'ast/ast.php', + 'ast\\flags\\ARRAY_SYNTAX_LONG' => 'ast/ast.php', + 'ast\\flags\\ARRAY_SYNTAX_SHORT' => 'ast/ast.php', + 'ast\\flags\\BINARY_ADD' => 'ast/ast.php', + 'ast\\flags\\BINARY_BITWISE_AND' => 'ast/ast.php', + 'ast\\flags\\BINARY_BITWISE_OR' => 'ast/ast.php', + 'ast\\flags\\BINARY_BITWISE_XOR' => 'ast/ast.php', + 'ast\\flags\\BINARY_BOOL_AND' => 'ast/ast.php', + 'ast\\flags\\BINARY_BOOL_OR' => 'ast/ast.php', + 'ast\\flags\\BINARY_BOOL_XOR' => 'ast/ast.php', + 'ast\\flags\\BINARY_COALESCE' => 'ast/ast.php', + 'ast\\flags\\BINARY_CONCAT' => 'ast/ast.php', + 'ast\\flags\\BINARY_DIV' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_EQUAL' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_GREATER' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_GREATER_OR_EQUAL' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_IDENTICAL' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_NOT_EQUAL' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_NOT_IDENTICAL' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_SMALLER' => 'ast/ast.php', + 'ast\\flags\\BINARY_IS_SMALLER_OR_EQUAL' => 'ast/ast.php', + 'ast\\flags\\BINARY_MOD' => 'ast/ast.php', + 'ast\\flags\\BINARY_MUL' => 'ast/ast.php', + 'ast\\flags\\BINARY_POW' => 'ast/ast.php', + 'ast\\flags\\BINARY_SHIFT_LEFT' => 'ast/ast.php', + 'ast\\flags\\BINARY_SHIFT_RIGHT' => 'ast/ast.php', + 'ast\\flags\\BINARY_SPACESHIP' => 'ast/ast.php', + 'ast\\flags\\BINARY_SUB' => 'ast/ast.php', + 'ast\\flags\\CLASS_ABSTRACT' => 'ast/ast.php', + 'ast\\flags\\CLASS_ANONYMOUS' => 'ast/ast.php', + 'ast\\flags\\CLASS_FINAL' => 'ast/ast.php', + 'ast\\flags\\CLASS_INTERFACE' => 'ast/ast.php', + 'ast\\flags\\CLASS_TRAIT' => 'ast/ast.php', + 'ast\\flags\\CLOSURE_USE_REF' => 'ast/ast.php', + 'ast\\flags\\DIM_ALTERNATIVE_SYNTAX' => 'ast/ast.php', + 'ast\\flags\\EXEC_EVAL' => 'ast/ast.php', + 'ast\\flags\\EXEC_INCLUDE' => 'ast/ast.php', + 'ast\\flags\\EXEC_INCLUDE_ONCE' => 'ast/ast.php', + 'ast\\flags\\EXEC_REQUIRE' => 'ast/ast.php', + 'ast\\flags\\EXEC_REQUIRE_ONCE' => 'ast/ast.php', + 'ast\\flags\\FUNC_GENERATOR' => 'ast/ast.php', + 'ast\\flags\\FUNC_RETURNS_REF' => 'ast/ast.php', + 'ast\\flags\\MAGIC_CLASS' => 'ast/ast.php', + 'ast\\flags\\MAGIC_DIR' => 'ast/ast.php', + 'ast\\flags\\MAGIC_FILE' => 'ast/ast.php', + 'ast\\flags\\MAGIC_FUNCTION' => 'ast/ast.php', + 'ast\\flags\\MAGIC_LINE' => 'ast/ast.php', + 'ast\\flags\\MAGIC_METHOD' => 'ast/ast.php', + 'ast\\flags\\MAGIC_NAMESPACE' => 'ast/ast.php', + 'ast\\flags\\MAGIC_TRAIT' => 'ast/ast.php', + 'ast\\flags\\MODIFIER_ABSTRACT' => 'ast/ast.php', + 'ast\\flags\\MODIFIER_FINAL' => 'ast/ast.php', + 'ast\\flags\\MODIFIER_PRIVATE' => 'ast/ast.php', + 'ast\\flags\\MODIFIER_PROTECTED' => 'ast/ast.php', + 'ast\\flags\\MODIFIER_PUBLIC' => 'ast/ast.php', + 'ast\\flags\\MODIFIER_STATIC' => 'ast/ast.php', + 'ast\\flags\\NAME_FQ' => 'ast/ast.php', + 'ast\\flags\\NAME_NOT_FQ' => 'ast/ast.php', + 'ast\\flags\\NAME_RELATIVE' => 'ast/ast.php', + 'ast\\flags\\PARAM_MODIFIER_PRIVATE' => 'ast/ast.php', + 'ast\\flags\\PARAM_MODIFIER_PROTECTED' => 'ast/ast.php', + 'ast\\flags\\PARAM_MODIFIER_PUBLIC' => 'ast/ast.php', + 'ast\\flags\\PARAM_REF' => 'ast/ast.php', + 'ast\\flags\\PARAM_VARIADIC' => 'ast/ast.php', + 'ast\\flags\\PARENTHESIZED_CONDITIONAL' => 'ast/ast.php', + 'ast\\flags\\RETURNS_REF' => 'ast/ast.php', + 'ast\\flags\\TYPE_ARRAY' => 'ast/ast.php', + 'ast\\flags\\TYPE_BOOL' => 'ast/ast.php', + 'ast\\flags\\TYPE_CALLABLE' => 'ast/ast.php', + 'ast\\flags\\TYPE_DOUBLE' => 'ast/ast.php', + 'ast\\flags\\TYPE_FALSE' => 'ast/ast.php', + 'ast\\flags\\TYPE_ITERABLE' => 'ast/ast.php', + 'ast\\flags\\TYPE_LONG' => 'ast/ast.php', + 'ast\\flags\\TYPE_MIXED' => 'ast/ast.php', + 'ast\\flags\\TYPE_NULL' => 'ast/ast.php', + 'ast\\flags\\TYPE_OBJECT' => 'ast/ast.php', + 'ast\\flags\\TYPE_STATIC' => 'ast/ast.php', + 'ast\\flags\\TYPE_STRING' => 'ast/ast.php', + 'ast\\flags\\TYPE_VOID' => 'ast/ast.php', + 'ast\\flags\\UNARY_BITWISE_NOT' => 'ast/ast.php', + 'ast\\flags\\UNARY_BOOL_NOT' => 'ast/ast.php', + 'ast\\flags\\UNARY_MINUS' => 'ast/ast.php', + 'ast\\flags\\UNARY_PLUS' => 'ast/ast.php', + 'ast\\flags\\UNARY_SILENCE' => 'ast/ast.php', + 'ast\\flags\\USE_CONST' => 'ast/ast.php', + 'ast\\flags\\USE_FUNCTION' => 'ast/ast.php', + 'ast\\flags\\USE_NORMAL' => 'ast/ast.php', 'bgrBLACK' => 'winbinder/winbinder.php', 'bgrBLUE' => 'winbinder/winbinder.php', 'bgrCYAN' => 'winbinder/winbinder.php', diff --git a/README.md b/README.md index 8b6ebb519..6aaed5d64 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,13 @@ # phpstorm-stubs -[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) -[](https://travis-ci.org/JetBrains/phpstorm-stubs) +[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) [](https://www.apache.org/licenses/LICENSE-2.0.html) [](https://packagist.org/packages/jetbrains/phpstorm-stubs) +[](https://github.com/JetBrains/phpstorm-stubs/actions/workflows/main.yml) +[](https://github.com/JetBrains/phpstorm-stubs/actions/workflows/testPeclExtensions.yml) +[](https://github.com/JetBrains/phpstorm-stubs/actions/workflows/testLinks.yml) + STUBS are normal, syntactically correct PHP files that contain function & class signatures, constant definitions, etc. for all built-in PHP stuff and most standard extensions. Stubs need to include complete [PHPDOC], especially proper @return annotations. An IDE needs them for completion, code inspection, type inference, doc popups, etc. Quality of most of these services depend on the quality of the stubs (basically their PHPDOC @annotations). @@ -13,6 +16,8 @@ Note that the stubs for “non-standard” extensions are provided as is. (Non-S The support for such “non-standard” stubs is community-driven, and we only validate their PHPDoc. We do not check whether a stub matches the actual extension or whether the provided descriptions are correct. +Please note that currently there are no tests for the thrown exceptions so @throws tags should be checked manually according to official docs or PHP source code + [Relevant open issues] ### Contribution process @@ -25,15 +30,18 @@ Have a full copy of the .git repo within an IDE and provide its path in `Setting The set of extensions enabled by default in PhpStorm can change anytime without prior notice. To learn how to view the enabled extensions, look [here](https://blog.jetbrains.com/phpstorm/2017/03/per-project-php-extension-settings-in-phpstorm-2017-1/). ### How to run tests -1. Execute `composer install` -2. Execute `docker-compose -f docker-compose.yml run php /opt/project/phpstorm-stubs/vendor/bin/phpunit /opt/project/phpstorm-stubs/tests/` +1. Execute `docker-compose -f docker-compose.yml run test_runner composer install --ignore-platform-reqs` +2. Execute `docker-compose -f docker-compose.yml run -e PHP_VERSION=8.0 test_runner vendor/bin/phpunit --testsuite PHP_8.0` ### How to update stub map -Execute `php generate-stub-map` and commit the resulting `PhpStormStubsMap.php` +Execute `docker-compose -f docker-compose.yml run test_runner /usr/local/bin/php tests/Tools/generate-stub-map` and commit the resulting `PhpStormStubsMap.php` ### License [Apache 2] +contains material by the PHP Documentation Group, licensed with [CC-BY 3.0] + [PHPDOC]:https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md [Apache 2]:https://www.apache.org/licenses/LICENSE-2.0 [Relevant open issues]:https://youtrack.jetbrains.com/issues/WI?q=%23Unresolved+Subsystem%3A+%7BPHP+lib+stubs%7D+order+by%3A+votes+ +[CC-BY 3.0]:https://www.php.net/manual/en/cc.license.php diff --git a/Reflection/.phpstorm.meta.php b/Reflection/.phpstorm.meta.php new file mode 100644 index 000000000..0b334a32a --- /dev/null +++ b/Reflection/.phpstorm.meta.php @@ -0,0 +1,66 @@ + - * The modifiers to get, which is from a numeric value. - * - * @return array An array of modifier names. - * @since 5.0 - */ - public static function getModifierNames ($modifiers) {} - - /** - * Exports - * @link https://php.net/manual/en/reflection.export.php - * @param Reflector $reflector- * The reflection to export. - * - * @param bool $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string If the return parameter - * is set to TRUE, then the export is returned as a string, - * otherwise NULL is returned. - * @since 5.0 - */ - public static function export (Reflector $reflector, $return = false) {} - -} - -/** - * Reflector is an interface implemented by all - * exportable Reflection classes. - * @link https://php.net/manual/en/class.reflector.php - */ -interface Reflector { - - /** - * Exports - * @link https://php.net/manual/en/reflector.export.php - * @return string - * @since 5.0 - * @deprecated 7.4 - */ - static function export (); - - /** - * To string - * @link https://php.net/manual/en/reflector.tostring.php - * @return string - * @since 5.0 - */ - function __toString (); - -} - -/** - * A parent class to ReflectionFunction, read its - * description for details. - * @link https://php.net/manual/en/class.reflectionfunctionabstract.php - */ -abstract class ReflectionFunctionAbstract implements Reflector { - public $name; - - - /** - * Clones function - * @link https://php.net/manual/en/reflectionfunctionabstract.clone.php - * @return void - * @since 5.0 - */ - final private function __clone () {} - - /** - * To string - * @link https://php.net/manual/en/reflectionfunctionabstract.tostring.php - * @since 5.0 - */ - abstract public function __toString (); - - /** - * Checks if function in namespace - * @link https://php.net/manual/en/reflectionfunctionabstract.innamespace.php - * @return bool TRUE if it's in a namespace, otherwise FALSE - * @since 5.3 - */ - public function inNamespace () {} - - /** - * Checks if closure - * @link https://php.net/manual/en/reflectionfunctionabstract.isclosure.php - * @return bool TRUE if it's a closure, otherwise FALSE - * @since 5.3 - */ - public function isClosure () {} - - /** - * Checks if deprecated - * @link https://php.net/manual/en/reflectionfunctionabstract.isdeprecated.php - * @return bool TRUE if it's deprecated, otherwise FALSE - * @since 5.0 - */ - public function isDeprecated () {} - - /** - * Checks if is internal - * @link https://php.net/manual/en/reflectionfunctionabstract.isinternal.php - * @return bool TRUE if it's internal, otherwise FALSE - * @since 5.0 - */ - public function isInternal () {} - - /** - * Checks if user defined - * @link https://php.net/manual/en/reflectionfunctionabstract.isuserdefined.php - * @return bool TRUE if it's user-defined, otherwise false; - * @since 5.0 - */ - public function isUserDefined () {} - - /** - * Returns this pointer bound to closure - * @link https://php.net/manual/en/reflectionfunctionabstract.getclosurethis.php - * @return object $this pointer. - * Returns NULL in case of an error. - * @since 5.0 - */ - public function getClosureThis () {} - - /** - * Returns the scope associated to the closure - * @link https://php.net/manual/en/reflectionfunctionabstract.getclosurescopeclass.php - * @return ReflectionClass Returns the class on success. - * Returns NULL on failure. - * @since 5.4 - */ - public function getClosureScopeClass () {} - - /** - * Gets doc comment - * @link https://php.net/manual/en/reflectionfunctionabstract.getdoccomment.php - * @return string|false The doc comment if it exists, otherwise FALSE - * @since 5.1 - */ - public function getDocComment () {} - - /** - * Gets end line number - * @link https://php.net/manual/en/reflectionfunctionabstract.getendline.php - * @return int|false The ending line number of the user defined function, or FALSE if unknown. - * @since 5.0 - */ - public function getEndLine () {} - - /** - * Gets extension info - * @link https://php.net/manual/en/reflectionfunctionabstract.getextension.php - * @return ReflectionExtension The extension information, as a ReflectionExtension object. - * @since 5.0 - */ - public function getExtension () {} - - /** - * Gets extension name - * @link https://php.net/manual/en/reflectionfunctionabstract.getextensionname.php - * @return string The extensions name. - * @since 5.0 - */ - public function getExtensionName () {} - - /** - * Gets file name - * @link https://php.net/manual/en/reflectionfunctionabstract.getfilename.php - * @return string The file name. - * @since 5.0 - */ - public function getFileName () {} - - /** - * Gets function name - * @link https://php.net/manual/en/reflectionfunctionabstract.getname.php - * @return string The name of the function. - * @since 5.0 - */ - public function getName () {} - - /** - * Gets namespace name - * @link https://php.net/manual/en/reflectionfunctionabstract.getnamespacename.php - * @return string The namespace name. - * @since 5.3 - */ - public function getNamespaceName () {} - - /** - * Gets number of parameters - * @link https://php.net/manual/en/reflectionfunctionabstract.getnumberofparameters.php - * @return int The number of parameters. - * @since 5.0.3 - */ - public function getNumberOfParameters () {} - - /** - * Gets number of required parameters - * @link https://php.net/manual/en/reflectionfunctionabstract.getnumberofrequiredparameters.php - * @return int The number of required parameters. - * @since 5.0.3 - */ - public function getNumberOfRequiredParameters () {} - - /** - * Gets parameters - * @link https://php.net/manual/en/reflectionfunctionabstract.getparameters.php - * @return ReflectionParameter[] The parameters, as a ReflectionParameter objects. - * @since 5.0 - */ - public function getParameters () {} - - /** - * Gets the specified return type of a function - * @link https://php.net/manual/en/reflectionfunctionabstract.getreturntype.php - * @return ReflectionType|null Returns a ReflectionType object if a return type is specified, NULL otherwise. - * @since 7.0 - */ - public function getReturnType () {} - - /** - * Gets function short name - * @link https://php.net/manual/en/reflectionfunctionabstract.getshortname.php - * @return string The short name of the function. - * @since 5.3 - */ - public function getShortName () {} - - /** - * Gets starting line number - * @link https://php.net/manual/en/reflectionfunctionabstract.getstartline.php - * @return int The starting line number. - * @since 5.0 - */ - public function getStartLine () {} - - /** - * Gets static variables - * @link https://php.net/manual/en/reflectionfunctionabstract.getstaticvariables.php - * @return array An array of static variables. - * @since 5.0 - */ - public function getStaticVariables () {} - - /** - * Checks if the function has a specified return type - * @link https://php.net/manual/en/reflectionfunctionabstract.hasreturntype.php - * @return bool Returns TRUE if the function is a specified return type, otherwise FALSE. - * @since 7.0 - */ - public function hasReturnType () {} - - /** - * Checks if returns reference - * @link https://php.net/manual/en/reflectionfunctionabstract.returnsreference.php - * @return bool TRUE if it returns a reference, otherwise FALSE - * @since 5.0 - */ - public function returnsReference () {} - - /** - * Returns whether this function is a generator - * @link https://php.net/manual/en/reflectionfunctionabstract.isgenerator.php - * @return bool TRUE if the function is generator, otherwise FALSE - * @since 5.5 - */ - public function isGenerator() {} - - /** - * Returns whether this function is variadic - * @link https://php.net/manual/en/reflectionfunctionabstract.isvariadic.php - * @return bool TRUE if the function is variadic, otherwise FALSE - * @since 5.6 - */ - public function isVariadic() {} -} - -/** - * The ReflectionFunction class reports - * information about a function. - * @link https://php.net/manual/en/class.reflectionfunction.php - */ -class ReflectionFunction extends ReflectionFunctionAbstract implements Reflector { - const IS_DEPRECATED = 262144; - - public $name; - - - /** - * Constructs a ReflectionFunction object - * @link https://php.net/manual/en/reflectionfunction.construct.php - * @param mixed $name- * The name of the function to reflect or a closure. - * - * @throws \ReflectionException if the function does not exist. - * @since 5.0 - */ - public function __construct ($name) {} - - /** - * To string - * @link https://php.net/manual/en/reflectionfunction.tostring.php - * @return string ReflectionFunction::export-like output for - * the function. - * @since 5.0 - */ - public function __toString () {} - - /** - * Exports function - * @link https://php.net/manual/en/reflectionfunction.export.php - * @param string $name- * The reflection to export. - * - * @param string $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string If the return parameter - * is set to TRUE, then the export is returned as a string, - * otherwise NULL is returned. - * @since 5.0 - * @deprecated 7.4 - */ - public static function export ($name, $return = null) {} - - /** - * Checks if function is disabled - * @link https://php.net/manual/en/reflectionfunction.isdisabled.php - * @return bool TRUE if it's disable, otherwise FALSE - * @since 5.0 - */ - public function isDisabled () {} - - /** - * Invokes function - * @link https://php.net/manual/en/reflectionfunction.invoke.php - * @param string $args [optional]- * The passed in argument list. It accepts a variable number of - * arguments which are passed to the function much like - * call_user_func is. - * - * @return mixed - * @since 5.0 - */ - public function invoke ($args = null) {} - - /** - * Invokes function args - * @link https://php.net/manual/en/reflectionfunction.invokeargs.php - * @param array $args- * The passed arguments to the function as an array, much like - * call_user_func_array works. - * - * @return mixed the result of the invoked function - * @since 5.1 - */ - public function invokeArgs (array $args) {} - - /** - * Returns a dynamically created closure for the function - * @link https://php.net/manual/en/reflectionfunction.getclosure.php - * @return Closure Closure. - * Returns NULL in case of an error. - * @since 5.0 - */ - public function getClosure () {} - -} - -/** - * The ReflectionParameter class retrieves - * information about function's or method's parameters. - * @link https://php.net/manual/en/class.reflectionparameter.php - */ -class ReflectionParameter implements Reflector { - public $name; - - - /** - * Clone - * @link https://php.net/manual/en/reflectionparameter.clone.php - * @return void - * @since 5.0 - */ - final private function __clone () {} - - /** - * Exports - * @link https://php.net/manual/en/reflectionparameter.export.php - * @param string $function- * The function name. - * - * @param string $parameter- * The parameter name. - * - * @param bool $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string The exported reflection. - * @since 5.0 - * @deprecated 7.4 - */ - public static function export ($function, $parameter, $return = null) {} - - /** - * Construct - * @link https://php.net/manual/en/reflectionparameter.construct.php - * @param string $function- * The function to reflect parameters from. - * - * @param string $parameter- * The parameter. - * - * @throws \ReflectionException if the function or parameter does not exist. - * @since 5.0 - */ - public function __construct ($function, $parameter) {} - - /** - * To string - * @link https://php.net/manual/en/reflectionparameter.tostring.php - * @return string - * @since 5.0 - */ - public function __toString () {} - - /** - * Gets parameter name - * @link https://php.net/manual/en/reflectionparameter.getname.php - * @return string The name of the reflected parameter. - * @since 5.0 - */ - public function getName () {} - - /** - * Gets a parameter's type - * @link https://php.net/manual/en/reflectionparameter.gettype.php - * @return ReflectionType|null Returns a ReflectionType object if a parameter type is specified, NULL otherwise. - * @since 7.0 - */ - public function getType() {} - - /** - * Checks if the parameter has a type associated with it. - * @link https://php.net/manual/en/reflectionparameter.hastype.php - * @return bool TRUE if a type is specified, FALSE otherwise. - * @since 7.0 - */ - public function hasType () {} - - - /** - * Checks if passed by reference - * @link https://php.net/manual/en/reflectionparameter.ispassedbyreference.php - * @return bool TRUE if the parameter is passed in by reference, otherwise FALSE - * @since 5.0 - */ - public function isPassedByReference () {} - - /** - * Returns whether this parameter can be passed by value - * @link https://php.net/manual/en/reflectionparameter.canbepassedbyvalue.php - * @return bool TRUE if the parameter can be passed by value, FALSE otherwise. - * Returns NULL in case of an error. - * @since 5.4 - */ - public function canBePassedByValue () {} - - /** - * Gets declaring function - * @link https://php.net/manual/en/reflectionparameter.getdeclaringfunction.php - * @return ReflectionFunctionAbstract A ReflectionFunctionAbstract object. - * @since 5.2.3 - */ - public function getDeclaringFunction () {} - - /** - * Gets declaring class - * @link https://php.net/manual/en/reflectionparameter.getdeclaringclass.php - * @return ReflectionClass A ReflectionClass object. - * @since 5.0 - */ - public function getDeclaringClass () {} - - /** - * Get class - * @link https://php.net/manual/en/reflectionparameter.getclass.php - * @return ReflectionClass A ReflectionClass object. - * @since 5.0 - */ - public function getClass () {} - - /** - * Checks if parameter expects an array - * @link https://php.net/manual/en/reflectionparameter.isarray.php - * @return bool TRUE if an array is expected, FALSE otherwise. - * @since 5.1 - */ - public function isArray () {} - - /** - * Returns whether parameter MUST be callable - * @link https://php.net/manual/en/reflectionparameter.iscallable.php - * @return bool|null Returns TRUE if the parameter is callable, FALSE if it is not or NULL on failure. - * @since 5.4 - */ - public function isCallable () {} - - /** - * Checks if null is allowed - * @link https://php.net/manual/en/reflectionparameter.allowsnull.php - * @return bool TRUE if NULL is allowed, otherwise FALSE - * @since 5.0 - */ - public function allowsNull () {} - - /** - * Gets parameter position - * @link https://php.net/manual/en/reflectionparameter.getposition.php - * @return int The position of the parameter, left to right, starting at position #0. - * @since 5.2.3 - */ - public function getPosition () {} - - /** - * Checks if optional - * @link https://php.net/manual/en/reflectionparameter.isoptional.php - * @return bool TRUE if the parameter is optional, otherwise FALSE - * @since 5.0.3 - */ - public function isOptional () {} - - /** - * Checks if a default value is available - * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueavailable.php - * @return bool TRUE if a default value is available, otherwise FALSE - * @since 5.0.3 - */ - public function isDefaultValueAvailable () {} - - /** - * Gets default parameter value - * @link https://php.net/manual/en/reflectionparameter.getdefaultvalue.php - * @return mixed The parameters default value. - * @throws \ReflectionException if the parameter is not optional - * @since 5.0.3 - */ - public function getDefaultValue () {} - - /** - * Returns whether the default value of this parameter is constant - * @return bool - * @since 5.4.6 - */ - public function isDefaultValueConstant () {} - - /** - * Returns the default value's constant name if default value is constant or null - * @return string - * @throws \ReflectionException if the parameter is not optional - * @since 5.4.6 - */ - public function getDefaultValueConstantName () {} - - /** - * Returns whether this function is variadic - * @link https://php.net/manual/en/reflectionparameter.isvariadic.php - * @return bool TRUE if the function is variadic, otherwise FALSE - * @since 5.6 - */ - public function isVariadic() {} - -} - -/** - * The ReflectionMethod class reports - * information about a method. - * @link https://php.net/manual/en/class.reflectionmethod.php - */ -class ReflectionMethod extends ReflectionFunctionAbstract implements Reflector { - const IS_STATIC = 1; - const IS_PUBLIC = 256; - const IS_PROTECTED = 512; - const IS_PRIVATE = 1024; - const IS_ABSTRACT = 2; - const IS_FINAL = 4; - - public $name; - public $class; - - - /** - * Export a reflection method. - * @link https://php.net/manual/en/reflectionmethod.export.php - * @param string $class- * The class name. - * - * @param string $name- * The name of the method. - * - * @param bool $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string If the return parameter - * is set to TRUE, then the export is returned as a string, - * otherwise NULL is returned. - * @since 5.0 - * @deprecated 7.4 - */ - public static function export ($class, $name, $return = false) {} - - /** - * Constructs a ReflectionMethod - * @link https://php.net/manual/en/reflectionmethod.construct.php - * @param mixed $class [optional]- * Classname or object (instance of the class) that contains the method. - * - * @param string $name- * Name of the method, or the method FQN in the form 'Foo::bar' if $class argument missing - * - * @throws \ReflectionException if the class or method does not exist. - * @since 5.0 - */ - public function __construct ($class, $name) {} - - /** - * Returns the string representation of the Reflection method object. - * @link https://php.net/manual/en/reflectionmethod.tostring.php - * @return string A string representation of this ReflectionMethod instance. - * @since 5.0 - */ - public function __toString () {} - - /** - * Checks if method is public - * @link https://php.net/manual/en/reflectionmethod.ispublic.php - * @return bool TRUE if the method is public, otherwise FALSE - * @since 5.0 - */ - public function isPublic () {} - - /** - * Checks if method is private - * @link https://php.net/manual/en/reflectionmethod.isprivate.php - * @return bool TRUE if the method is private, otherwise FALSE - * @since 5.0 - */ - public function isPrivate () {} - - /** - * Checks if method is protected - * @link https://php.net/manual/en/reflectionmethod.isprotected.php - * @return bool TRUE if the method is protected, otherwise FALSE - * @since 5.0 - */ - public function isProtected () {} - - /** - * Checks if method is abstract - * @link https://php.net/manual/en/reflectionmethod.isabstract.php - * @return bool TRUE if the method is abstract, otherwise FALSE - * @since 5.0 - */ - public function isAbstract () {} - - /** - * Checks if method is final - * @link https://php.net/manual/en/reflectionmethod.isfinal.php - * @return bool TRUE if the method is final, otherwise FALSE - * @since 5.0 - */ - public function isFinal () {} - - /** - * Checks if method is static - * @link https://php.net/manual/en/reflectionmethod.isstatic.php - * @return bool TRUE if the method is static, otherwise FALSE - * @since 5.0 - */ - public function isStatic () {} - - /** - * Checks if method is a constructor - * @link https://php.net/manual/en/reflectionmethod.isconstructor.php - * @return bool TRUE if the method is a constructor, otherwise FALSE - * @since 5.0 - */ - public function isConstructor () {} - - /** - * Checks if method is a destructor - * @link https://php.net/manual/en/reflectionmethod.isdestructor.php - * @return bool TRUE if the method is a destructor, otherwise FALSE - * @since 5.0 - */ - public function isDestructor () {} - - /** - * Returns a dynamically created closure for the method - * @link https://php.net/manual/en/reflectionmethod.getclosure.php - * @param object $object [optional] Forbidden for static methods, required for other methods. - * @return Closure Closure. - * Returns NULL in case of an error. - * @since 5.4 - */ - public function getClosure ($object) {} - - /** - * Gets the method modifiers - * @link https://php.net/manual/en/reflectionmethod.getmodifiers.php - * @return int A numeric representation of the modifiers. The modifiers are listed below. - * The actual meanings of these modifiers are described in the - * predefined constants. - *
- * The object to invoke the method on. For static methods, pass - * null to this parameter. - * - * @param mixed $parameter [optional]- * Zero or more parameters to be passed to the method. - * It accepts a variable number of parameters which are passed to the method. - * - * @param mixed $_ [optional] - * @return mixed the method result. - * @since 5.0 - */ - public function invoke ($object, $parameter = null, $_ = null) {} - - /** - * Invoke args - * @link https://php.net/manual/en/reflectionmethod.invokeargs.php - * @param object $object- * The object to invoke the method on. In case of static methods, you can pass - * null to this parameter. - * - * @param array $args- * The parameters to be passed to the function, as an array. - * - * @return mixed the method result. - * @since 5.1 - */ - public function invokeArgs ($object, array $args) {} - - /** - * Gets declaring class for the reflected method. - * @link https://php.net/manual/en/reflectionmethod.getdeclaringclass.php - * @return ReflectionClass A ReflectionClass object of the class that the - * reflected method is part of. - * @since 5.0 - */ - public function getDeclaringClass () {} - - /** - * Gets the method prototype (if there is one). - * @link https://php.net/manual/en/reflectionmethod.getprototype.php - * @return ReflectionMethod A ReflectionMethod instance of the method prototype. - * @since 5.0 - */ - public function getPrototype () {} - - /** - * Set method accessibility - * @link https://php.net/manual/en/reflectionmethod.setaccessible.php - * @param bool $accessible- * TRUE to allow accessibility, or FALSE. - * - * @return void No value is returned. - * @since 5.3.2 - */ - public function setAccessible ($accessible) {} - -} - -/** - * The ReflectionClass class reports - * information about a class. - * @link https://php.net/manual/en/class.reflectionclass.php - */ -class ReflectionClass implements Reflector { - const IS_IMPLICIT_ABSTRACT = 16; - const IS_EXPLICIT_ABSTRACT = 32; - const IS_FINAL = 64; - - public $name; - - - /** - * Clones object - * @link https://php.net/manual/en/reflectionclass.clone.php - * @return void - * @since 5.0 - */ - final private function __clone () {} - - /** - * Exports a class - * @link https://php.net/manual/en/reflectionclass.export.php - * @param mixed $argument- * The reflection to export. - * - * @param bool $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string If the return parameter - * is set to TRUE, then the export is returned as a string, - * otherwise NULL is returned. - * @since 5.0 - * @deprecated 7.4 - */ - public static function export ($argument, $return = false) {} - - /** - * Constructs a ReflectionClass - * @link https://php.net/manual/en/reflectionclass.construct.php - * @param mixed $argument- * Either a string containing the name of the class to - * reflect, or an object. - * - * @throws \ReflectionException if the class does not exist. - * @since 5.0 - */ - public function __construct ($argument) {} - - /** - * Returns the string representation of the ReflectionClass object. - * @link https://php.net/manual/en/reflectionclass.tostring.php - * @return string A string representation of this ReflectionClass instance. - * @since 5.0 - */ - public function __toString () {} - - /** - * Gets class name - * @link https://php.net/manual/en/reflectionclass.getname.php - * @return string The class name. - * @since 5.0 - */ - public function getName () {} - - /** - * Checks if class is defined internally by an extension, or the core - * @link https://php.net/manual/en/reflectionclass.isinternal.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isInternal () {} - - /** - * Checks if user defined - * @link https://php.net/manual/en/reflectionclass.isuserdefined.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isUserDefined () {} - - /** - * Checks if the class is instantiable - * @link https://php.net/manual/en/reflectionclass.isinstantiable.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isInstantiable () {} - - /** - * Returns whether this class is cloneable - * @link https://php.net/manual/en/reflectionclass.iscloneable.php - * @return bool TRUE if the class is cloneable, FALSE otherwise. - * @since 5.4 - */ - public function isCloneable () {} - - /** - * Gets the filename of the file in which the class has been defined - * @link https://php.net/manual/en/reflectionclass.getfilename.php - * @return string|false the filename of the file in which the class has been defined. - * If the class is defined in the PHP core or in a PHP extension, FALSE - * is returned. - * @since 5.0 - */ - public function getFileName () {} - - /** - * Gets starting line number - * @link https://php.net/manual/en/reflectionclass.getstartline.php - * @return int The starting line number, as an integer. - * @since 5.0 - */ - public function getStartLine () {} - - /** - * Gets end line - * @link https://php.net/manual/en/reflectionclass.getendline.php - * @return int|false The ending line number of the user defined class, or FALSE if unknown. - * @since 5.0 - */ - public function getEndLine () {} - - /** - * Gets doc comments - * @link https://php.net/manual/en/reflectionclass.getdoccomment.php - * @return string|false The doc comment if it exists, otherwise FALSE - * @since 5.1 - */ - public function getDocComment () {} - - /** - * Gets the constructor of the class - * @link https://php.net/manual/en/reflectionclass.getconstructor.php - * @return ReflectionMethod A ReflectionMethod object reflecting the class' constructor, or NULL if the class - * has no constructor. - * @since 5.0 - */ - public function getConstructor () {} - - /** - * Checks if method is defined - * @link https://php.net/manual/en/reflectionclass.hasmethod.php - * @param string $name- * Name of the method being checked for. - * - * @return bool TRUE if it has the method, otherwise FALSE - * @since 5.1 - */ - public function hasMethod ($name) {} - - /** - * Gets a ReflectionMethod for a class method. - * @link https://php.net/manual/en/reflectionclass.getmethod.php - * @param string $name- * The method name to reflect. - * - * @return ReflectionMethod A ReflectionMethod. - * @throws \ReflectionException if the method does not exist. - * @since 5.0 - */ - public function getMethod ($name) {} - - /** - * Gets an array of methods - * @link https://php.net/manual/en/reflectionclass.getmethods.php - * @param int $filter [optional]- * Filter the results to include only methods with certain attributes. Defaults - * to no filtering. - * - *- * Any bitwise disjunction of ReflectionMethod::IS_STATIC, - * ReflectionMethod::IS_PUBLIC, - * ReflectionMethod::IS_PROTECTED, - * ReflectionMethod::IS_PRIVATE, - * ReflectionMethod::IS_ABSTRACT, - * ReflectionMethod::IS_FINAL, - * so that all methods with any of the given attributes will be returned. - * - * @return ReflectionMethod[] An array of ReflectionMethod objects reflecting each method. - * @since 5.0 - */ - public function getMethods ($filter = null) {} - - /** - * Checks if property is defined - * @link https://php.net/manual/en/reflectionclass.hasproperty.php - * @param string $name- * Name of the property being checked for. - * - * @return bool TRUE if it has the property, otherwise FALSE - * @since 5.1 - */ - public function hasProperty ($name) {} - - /** - * Gets a ReflectionProperty for a class's property - * @link https://php.net/manual/en/reflectionclass.getproperty.php - * @param string $name- * The property name. - * - * @return ReflectionProperty A ReflectionProperty. - * @throws ReflectionException If no property exists by that name. - * @since 5.0 - */ - public function getProperty ($name) {} - - /** - * Gets properties - * @link https://php.net/manual/en/reflectionclass.getproperties.php - * @param int $filter [optional]- * The optional filter, for filtering desired property types. It's configured using - * the ReflectionProperty constants, - * and defaults to all property types. - * - * @return ReflectionProperty[] - * @since 5.0 - */ - public function getProperties ($filter = null) {} - - /** - * Gets a ReflectionClassConstant for a class's property - * @link https://php.net/manual/en/reflectionclass.getreflectionconstant.php - * @param string $name- * The class constant name. - * - * @return ReflectionClassConstant A ReflectionClassConstant. - * @since 7.1 - */ - public function getReflectionConstant ($name) {} - - /** - * Gets class constants - * @link https://php.net/manual/en/reflectionclass.getreflectionconstants.php - * @return ReflectionClassConstant[] An array of ReflectionClassConstant objects. - * @since 7.1 - */ - public function getReflectionConstants () {} - - /** - * Checks if constant is defined - * @link https://php.net/manual/en/reflectionclass.hasconstant.php - * @param string $name- * The name of the constant being checked for. - * - * @return bool TRUE if the constant is defined, otherwise FALSE. - * @since 5.1 - */ - public function hasConstant ($name) {} - - /** - * Gets constants - * @link https://php.net/manual/en/reflectionclass.getconstants.php - * @return array An array of constants. - * Constant name in key, constant value in value. - * @since 5.0 - */ - public function getConstants () {} - - /** - * Gets defined constant - * @link https://php.net/manual/en/reflectionclass.getconstant.php - * @param string $name- * Name of the constant. - * - * @return mixed Value of the constant. - * @since 5.0 - */ - public function getConstant ($name) {} - - /** - * Gets the interfaces - * @link https://php.net/manual/en/reflectionclass.getinterfaces.php - * @return ReflectionClass[] An associative array of interfaces, with keys as interface - * names and the array values as ReflectionClass objects. - * @since 5.0 - */ - public function getInterfaces () {} - - /** - * Gets the interface names - * @link https://php.net/manual/en/reflectionclass.getinterfacenames.php - * @return array A numerical array with interface names as the values. - * @since 5.2 - */ - public function getInterfaceNames () {} - - /** - * Checks if the class is anonymous - * @return bool TRUE on success or FALSE on failure. - * @since 7.0 - */ - public function isAnonymous () {} - - /** - * Checks if the class is an interface - * @link https://php.net/manual/en/reflectionclass.isinterface.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isInterface () {} - - /** - * Returns an array of traits used by this class - * @link https://php.net/manual/en/reflectionclass.gettraits.php - * @return ReflectionClass[] an array with trait names in keys and instances of trait's - * ReflectionClass in values. - * Returns NULL in case of an error. - * @since 5.4 - */ - public function getTraits () {} - - /** - * Returns an array of names of traits used by this class - * @link https://php.net/manual/en/reflectionclass.gettraitnames.php - * @return array an array with trait names in values. - * Returns NULL in case of an error. - * @since 5.4 - */ - public function getTraitNames () {} - - /** - * Returns an array of trait aliases - * @link https://php.net/manual/en/reflectionclass.gettraitaliases.php - * @return array an array with new method names in keys and original names (in the - * format "TraitName::original") in values. - * Returns NULL in case of an error. - * @since 5.4 - */ - public function getTraitAliases () {} - - /** - * Returns whether this is a trait - * @link https://php.net/manual/en/reflectionclass.istrait.php - * @return bool TRUE if this is a trait, FALSE otherwise. - * Returns NULL in case of an error. - * @since 5.4 - */ - public function isTrait () {} - - /** - * Checks if class is abstract - * @link https://php.net/manual/en/reflectionclass.isabstract.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isAbstract () {} - - /** - * Checks if class is final - * @link https://php.net/manual/en/reflectionclass.isfinal.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isFinal () {} - - /** - * Gets modifiers - * @link https://php.net/manual/en/reflectionclass.getmodifiers.php - * @return int bitmask of - * modifier constants. - * @since 5.0 - */ - public function getModifiers () {} - - /** - * Checks class for instance - * @link https://php.net/manual/en/reflectionclass.isinstance.php - * @param object $object- * The object being compared to. - * - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isInstance ($object) {} - - /** - * Creates a new class instance from given arguments. - * @link https://php.net/manual/en/reflectionclass.newinstance.php - * @param mixed $args [optional]- * Accepts a variable number of arguments which are passed to the class - * constructor, much like call_user_func. - * - * @param mixed $_ [optional] - * @return object - * @since 5.0 - */ - public function newInstance ($args = null, $_ = null) {} - /** - * Creates a new class instance without invoking the constructor. - * @link https://php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php - * @return object - * @since 5.4 - */ - public function newInstanceWithoutConstructor() {} - - /** - * Creates a new class instance from given arguments. - * @link https://php.net/manual/en/reflectionclass.newinstanceargs.php - * @param array $args [optional]- * The parameters to be passed to the class constructor as an array. - * - * @return object a new instance of the class. - * @since 5.1.3 - */ - public function newInstanceArgs (array $args = null) {} - - /** - * Gets parent class - * @link https://php.net/manual/en/reflectionclass.getparentclass.php - * @return ReflectionClass|false - * @since 5.0 - */ - public function getParentClass () {} - - /** - * Checks if a subclass - * @link https://php.net/manual/en/reflectionclass.issubclassof.php - * @param string $class- * The class name being checked against. - * - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isSubclassOf ($class) {} - - /** - * Gets static properties - * @link https://php.net/manual/en/reflectionclass.getstaticproperties.php - * @return array The static properties, as an array. - * @since 5.0 - */ - public function getStaticProperties () {} - - /** - * Gets static property value - * @link https://php.net/manual/en/reflectionclass.getstaticpropertyvalue.php - * @param string $name- * The name of the static property for which to return a value. - * - * @param string $default [optional]- * - * @return mixed The value of the static property. - * @since 5.1 - */ - public function getStaticPropertyValue ($name, $default = null) {} - - /** - * Sets static property value - * @link https://php.net/manual/en/reflectionclass.setstaticpropertyvalue.php - * @param string $name- * Property name. - * - * @param mixed $value- * New property value. - * - * @return void No value is returned. - * @since 5.1 - */ - public function setStaticPropertyValue ($name, $value) {} - - /** - * Gets default properties - * @link https://php.net/manual/en/reflectionclass.getdefaultproperties.php - * @return array An array of default properties, with the key being the name of - * the property and the value being the default value of the property or NULL - * if the property doesn't have a default value. The function does not distinguish - * between static and non static properties and does not take visibility modifiers - * into account. - * @since 5.0 - */ - public function getDefaultProperties () {} - - /** - * Checks if iterateable - * @link https://php.net/manual/en/reflectionclass.isiterateable.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function isIterateable () {} - - /** - * Checks if iterateable - * @return bool TRUE on success or FALSE on failure. - * @since 7.2 - */ - public function isIterable () {} - - /** - * Implements interface - * @link https://php.net/manual/en/reflectionclass.implementsinterface.php - * @param string $interface- * The interface name. - * - * @return bool TRUE on success or FALSE on failure. - * @since 5.0 - */ - public function implementsInterface ($interface) {} - - /** - * Gets a ReflectionExtension object for the extension which defined the class - * @link https://php.net/manual/en/reflectionclass.getextension.php - * @return ReflectionExtension A ReflectionExtension object representing the extension which defined the class, - * or NULL for user-defined classes. - * @since 5.0 - */ - public function getExtension () {} - - /** - * Gets the name of the extension which defined the class - * @link https://php.net/manual/en/reflectionclass.getextensionname.php - * @return string|false The name of the extension which defined the class, or FALSE for user-defined classes. - * @since 5.0 - */ - public function getExtensionName () {} - - /** - * Checks if in namespace - * @link https://php.net/manual/en/reflectionclass.innamespace.php - * @return bool TRUE on success or FALSE on failure. - * @since 5.3 - */ - public function inNamespace () {} - - /** - * Gets namespace name - * @link https://php.net/manual/en/reflectionclass.getnamespacename.php - * @return string The namespace name. - * @since 5.3 - */ - public function getNamespaceName () {} - - /** - * Gets short name - * @link https://php.net/manual/en/reflectionclass.getshortname.php - * @return string The class short name. - * @since 5.3 - */ - public function getShortName () {} - -} - -/** - * The ReflectionObject class reports - * information about an object. - * @link https://php.net/manual/en/class.reflectionobject.php - */ -class ReflectionObject extends ReflectionClass implements Reflector { - - /** - * Export - * @link https://php.net/manual/en/reflectionobject.export.php - * @param string $argument- * The reflection to export. - * - * @param bool $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string If the return parameter - * is set to TRUE, then the export is returned as a string, - * otherwise NULL is returned. - * @since 5.0 - * @deprecated 7.4 - */ - public static function export ($argument, $return = null) {} - - /** - * Constructs a ReflectionObject - * @link https://php.net/manual/en/reflectionobject.construct.php - * @param object $argument- * An object instance. - * - * @since 5.0 - */ - public function __construct ($argument) {} - -} - -/** - * The ReflectionProperty class reports - * information about a classes properties. - * @link https://php.net/manual/en/class.reflectionproperty.php - */ -class ReflectionProperty implements Reflector { - const IS_STATIC = 1; - const IS_PUBLIC = 256; - const IS_PROTECTED = 512; - const IS_PRIVATE = 1024; - - public $name; - public $class; - - - /** - * Clone - * @link https://php.net/manual/en/reflectionproperty.clone.php - * @return void - * @since 5.0 - */ - final private function __clone () {} - - /** - * Export - * @link https://php.net/manual/en/reflectionproperty.export.php - * @param mixed $class - * @param string $name- * The property name. - * - * @param bool $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string - * @since 5.0 - * @deprecated 7.4 - */ - public static function export ($class, $name, $return = null) {} - - /** - * Construct a ReflectionProperty object - * @link https://php.net/manual/en/reflectionproperty.construct.php - * @param mixed $class- * The class name, that contains the property. - * - * @param string $name- * The name of the property being reflected. - * - * @throws \ReflectionException if the class or property does not exist. - * @since 5.0 - */ - public function __construct ($class, $name) {} - - /** - * To string - * @link https://php.net/manual/en/reflectionproperty.tostring.php - * @return string - * @since 5.0 - */ - public function __toString () {} - - /** - * Gets property name - * @link https://php.net/manual/en/reflectionproperty.getname.php - * @return string The name of the reflected property. - * @since 5.0 - */ - public function getName () {} - - /** - * Gets value - * @link https://php.net/manual/en/reflectionproperty.getvalue.php - * @param object $object [optional]- * If the property is non-static an object must be provided to fetch the - * property from. If you want to fetch the default property without - * providing an object use ReflectionClass::getDefaultProperties - * instead. - * - * @return mixed The current value of the property. - * @since 5.0 - */ - public function getValue ($object = null) {} - - /** - * Set property value - * @link https://php.net/manual/en/reflectionproperty.setvalue.php - * @param mixed $objectOrValue- * If the property is non-static an object must be provided to change - * the property on. If the property is static this parameter is left - * out and only value needs to be provided. - * - * @param mixed $value [optional]- * The new value. - * - * @return void No value is returned. - * @since 5.0 - */ - public function setValue ($objectOrValue, $value) {} - - /** - * Checks if property is public - * @link https://php.net/manual/en/reflectionproperty.ispublic.php - * @return bool TRUE if the property is public, FALSE otherwise. - * @since 5.0 - */ - public function isPublic () {} - - /** - * Checks if property is private - * @link https://php.net/manual/en/reflectionproperty.isprivate.php - * @return bool TRUE if the property is private, FALSE otherwise. - * @since 5.0 - */ - public function isPrivate () {} - - /** - * Checks if property is protected - * @link https://php.net/manual/en/reflectionproperty.isprotected.php - * @return bool TRUE if the property is protected, FALSE otherwise. - * @since 5.0 - */ - public function isProtected () {} - - /** - * Checks if property is static - * @link https://php.net/manual/en/reflectionproperty.isstatic.php - * @return bool TRUE if the property is static, FALSE otherwise. - * @since 5.0 - */ - public function isStatic () {} - - /** - * Checks if default value - * @link https://php.net/manual/en/reflectionproperty.isdefault.php - * @return bool TRUE if the property was declared at compile-time, or FALSE if - * it was created at run-time. - * @since 5.0 - */ - public function isDefault () {} - - /** - * Gets modifiers - * @link https://php.net/manual/en/reflectionproperty.getmodifiers.php - * @return int A numeric representation of the modifiers. - * @since 5.0 - */ - public function getModifiers () {} - - /** - * Gets declaring class - * @link https://php.net/manual/en/reflectionproperty.getdeclaringclass.php - * @return ReflectionClass A ReflectionClass object. - * @since 5.0 - */ - public function getDeclaringClass () {} - - /** - * Gets doc comment - * @link https://php.net/manual/en/reflectionproperty.getdoccomment.php - * @return string|false The doc comment if it exists, otherwise FALSE - * @since 5.1 - */ - public function getDocComment () {} - - /** - * Set property accessibility - * @link https://php.net/manual/en/reflectionproperty.setaccessible.php - * @param bool $accessible- * TRUE to allow accessibility, or FALSE. - * - * @return void No value is returned. - * @since 5.3 - */ - public function setAccessible ($accessible) {} - - /** - * Gets property type - * @return ReflectionType|null - * @since 7.4 - */ - public function getType() {} - - /** - * Checks if property has type - * @return bool - * @since 7.4 - */ - public function hasType() {} - - /** - * Checks if property is initialized - * @param object $object [optional]- * If the property is non-static an object must be provided. - * - * @return bool - * @since 7.4 - */ - public function isInitialized ($object) {} -} - -/** - * The ReflectionExtension class reports - * information about an extension. - * @link https://php.net/manual/en/class.reflectionextension.php - */ -class ReflectionExtension implements Reflector { - public $name; - - - /** - * Clones - * @link https://php.net/manual/en/reflectionextension.clone.php - * @return void No value is returned, if called a fatal error will occur. - * @since 5.0 - */ - final private function __clone () {} - - /** - * Export - * @link https://php.net/manual/en/reflectionextension.export.php - * @param string $name- * The reflection to export. - * - * @param string $return [optional]- * Setting to TRUE will return the export, - * as opposed to emitting it. Setting to FALSE (the default) will do the opposite. - * - * @return string If the return parameter - * is set to TRUE, then the export is returned as a string, - * otherwise NULL is returned. - * @since 5.0 - * @deprecated 7.4 - */ - public static function export ($name, $return = false) {} - - /** - * Constructs a ReflectionExtension - * @link https://php.net/manual/en/reflectionextension.construct.php - * @param string $name- * Name of the extension. - * - * @throws \ReflectionException if the extension does not exist. - * @since 5.0 - */ - public function __construct ($name) {} - - /** - * To string - * @link https://php.net/manual/en/reflectionextension.tostring.php - * @return string the exported extension as a string, in the same way as the - * ReflectionExtension::export. - * @since 5.0 - */ - public function __toString () {} - - /** - * Gets extension name - * @link https://php.net/manual/en/reflectionextension.getname.php - * @return string The extensions name. - * @since 5.0 - */ - public function getName () {} - - /** - * Gets extension version - * @link https://php.net/manual/en/reflectionextension.getversion.php - * @return string The version of the extension. - * @since 5.0 - */ - public function getVersion () {} - - /** - * Gets extension functions - * @link https://php.net/manual/en/reflectionextension.getfunctions.php - * @return ReflectionFunction[] An associative array of ReflectionFunction objects, - * for each function defined in the extension with the keys being the function - * names. If no function are defined, an empty array is returned. - * @since 5.0 - */ - public function getFunctions () {} - - /** - * Gets constants - * @link https://php.net/manual/en/reflectionextension.getconstants.php - * @return array An associative array with constant names as keys. - * @since 5.0 - */ - public function getConstants () {} - - /** - * Gets extension ini entries - * @link https://php.net/manual/en/reflectionextension.getinientries.php - * @return array An associative array with the ini entries as keys, - * with their defined values as values. - * @since 5.0 - */ - public function getINIEntries () {} - - /** - * Gets classes - * @link https://php.net/manual/en/reflectionextension.getclasses.php - * @return ReflectionClass[] An array of ReflectionClass objects, one - * for each class within the extension. If no classes are defined, - * an empty array is returned. - * @since 5.0 - */ - public function getClasses () {} - - /** - * Gets class names - * @link https://php.net/manual/en/reflectionextension.getclassnames.php - * @return array An array of class names, as defined in the extension. - * If no classes are defined, an empty array is returned. - * @since 5.0 - */ - public function getClassNames () {} - - /** - * Gets dependencies - * @link https://php.net/manual/en/reflectionextension.getdependencies.php - * @return array An associative array with dependencies as keys and - * either Required, Optional - * or Conflicts as the values. - * @since 5.0 - */ - public function getDependencies () {} - - /** - * Gets extension info - * @link https://php.net/manual/en/reflectionextension.info.php - * @return string Information about the extension. - * @since 5.0 - */ - public function info () {} - - /** - * Returns whether this extension is persistent - * @link https://php.net/manual/en/reflectionextension.ispersistent.php - * @return bool TRUE for extensions loaded by extension, FALSE - * otherwise. - * @since 5.4 - */ - public function isPersistent () {} - - /** - * Returns whether this extension is temporary - * @link https://php.net/manual/en/reflectionextension.istemporary.php - * @return bool TRUE for extensions loaded by dl, - * FALSE otherwise. - * @since 5.4 - */ - public function isTemporary () {} - - -} - -/** - * @link https://secure.php.net/manual/en/class.reflectionzendextension.php - * @since 5.4 - */ -class ReflectionZendExtension implements Reflector { - public $name; - - - /** - * Clone handler - * @link https://php.net/manual/en/reflectionzendextension.clone.php - * @return void - * @since 5.4 - */ - final private function __clone () {} - - /** - * Export - * @link https://php.net/manual/en/reflectionzendextension.export.php - * @param string $name- * - * @param string $return [optional]- * - * @return string - * @since 5.4 - * @deprecated 7.4 - */ - public static function export ($name, $return = null) {} - - /** - * Constructor - * @link https://php.net/manual/en/reflectionzendextension.construct.php - * @param string $name- * - * @throws \ReflectionException if the extension does not exist. - * @since 5.4 - */ - public function __construct ($name) {} - - /** - * To string handler - * @link https://php.net/manual/en/reflectionzendextension.tostring.php - * @return string - * @since 5.4 - */ - public function __toString () {} - - /** - * Gets name - * @link https://php.net/manual/en/reflectionzendextension.getname.php - * @return string - * @since 5.4 - */ - public function getName () {} - - /** - * Gets version - * @link https://php.net/manual/en/reflectionzendextension.getversion.php - * @return string - * @since 5.4 - */ - public function getVersion () {} - - /** - * Gets author - * @link https://php.net/manual/en/reflectionzendextension.getauthor.php - * @return string - * @since 5.4 - */ - public function getAuthor () {} - - /** - * Gets URL - * @link https://php.net/manual/en/reflectionzendextension.geturl.php - * @return string - * @since 5.4 - */ - public function getURL () {} - - /** - * Gets copyright - * @link https://php.net/manual/en/reflectionzendextension.getcopyright.php - * @return string - * @since 5.4 - */ - public function getCopyright () {} - -} - -/** - * The ReflectionGenerator class reports information about a generator. - * @since 7.0 - */ -class ReflectionGenerator +class Reflection { - /* Methods */ - /** - * Constructs a ReflectionGenerator object - * @link https://php.net/manual/en/reflectiongenerator.construct.php - * @param Generator $generator A generator object. - * @since 7.0 - */ - public function __construct(Generator $generator) - { - } - - /** - * Gets the file name of the currently executing generator - * @link https://php.net/manual/en/reflectiongenerator.getexecutingfile.php - * @return string Returns the full path and file name of the currently executing generator. - * @since 7.0 - * - */ - public function getExecutingFile() - { - } - - /** - * Gets the executing Generator object - * @link https://php.net/manual/en/reflectiongenerator.construct.php - * @return Generator Returns the currently executing Generator object. - * @since 7.0 - * - */ - public function getExecutingGenerator() - { - } - - /** - * Gets the currently executing line of the generator - * @link https://php.net/manual/en/reflectiongenerator.getexecutingline.php - * @return int Returns the line number of the currently executing statement in the generator. - * @since 7.0 - */ - public function getExecutingLine() - { - } - - /** - * Gets the function name of the generator - * @link https://php.net/manual/en/reflectiongenerator.getfunction.php - * @return ReflectionFunctionAbstract Returns a ReflectionFunctionAbstract class. This will be ReflectionFunction for functions, or ReflectionMethod for methods. - * @since 7.0 - */ - public function getFunction() - { - } - - /** - * Gets the function name of the generator - * @link https://php.net/manual/en/reflectiongenerator.getthis.php - * @return object|null Returns the $this value, or NULL if the generator was not created in a class context. - * @since 7.0 - */ - public function getThis() - { - } - - /** - * Gets the trace of the executing generator - * @link https://php.net/manual/en/reflectiongenerator.gettrace.php - * @param int $options [optional]- * The value of options can be any of the following - * the following flags. - * - *
+ * $reflection = new ReflectionMethod(new Example(), 'method');
+ * $reflection = new ReflectionMethod(Example::class, 'method');
+ * $reflection = new ReflectionMethod('Example::method');
+ *
+ *
+ * @link https://php.net/manual/en/reflectionmethod.construct.php
+ * @param string|object $objectOrMethod Classname, object
+ * (instance of the class) that contains the method or class name and
+ * method name delimited by ::.
+ * @param string|null $method Name of the method if the first argument is a
+ * classname or an object.
+ * @throws ReflectionException if the class or method does not exist.
+ */
+ public function __construct(
+ #[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrMethod,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $method = null
+ ) {}
+
+ /**
+ * Export a reflection method.
+ *
+ * @link https://php.net/manual/en/reflectionmethod.export.php
+ * @param string $class The class name.
+ * @param string $name The name of the method.
+ * @param bool $return Setting to {@see true} will return the export,
+ * as opposed to emitting it. Setting to {@see false} (the default) will do the
+ * opposite.
+ * @return string|null If the $return parameter is set to {@see true}, then
+ * the export is returned as a string, otherwise {@see null} is returned.
+ * @removed 8.0
+ */
+ #[Deprecated(since: '7.4')]
+ public static function export($class, $name, $return = false) {}
+
+ /**
+ * Returns the string representation of the ReflectionMethod object.
+ *
+ * @link https://php.net/manual/en/reflectionmethod.tostring.php
+ * @return string A string representation of this {@see ReflectionMethod} instance.
+ */
+ #[TentativeType]
+ public function __toString(): string {}
+
+ /**
+ * Checks if method is public
+ *
+ * @link https://php.net/manual/en/reflectionmethod.ispublic.php
+ * @return bool Returns {@see true} if the method is public, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isPublic(): bool {}
+
+ /**
+ * Checks if method is private
+ *
+ * @link https://php.net/manual/en/reflectionmethod.isprivate.php
+ * @return bool Returns {@see true} if the method is private, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isPrivate(): bool {}
+
+ /**
+ * Checks if method is protected
+ *
+ * @link https://php.net/manual/en/reflectionmethod.isprotected.php
+ * @return bool Returns {@see true} if the method is protected, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isProtected(): bool {}
+
+ /**
+ * Checks if method is abstract
+ *
+ * @link https://php.net/manual/en/reflectionmethod.isabstract.php
+ * @return bool Returns {@see true} if the method is abstract, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isAbstract(): bool {}
+
+ /**
+ * Checks if method is final
+ *
+ * @link https://php.net/manual/en/reflectionmethod.isfinal.php
+ * @return bool Returns {@see true} if the method is final, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isFinal(): bool {}
+
+ /**
+ * Checks if method is static
+ *
+ * @link https://php.net/manual/en/reflectionmethod.isstatic.php
+ * @return bool Returns {@see true} if the method is static, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isStatic(): bool {}
+
+ /**
+ * Checks if method is a constructor
+ *
+ * @link https://php.net/manual/en/reflectionmethod.isconstructor.php
+ * @return bool Returns {@see true} if the method is a constructor, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isConstructor(): bool {}
+
+ /**
+ * Checks if method is a destructor
+ *
+ * @link https://php.net/manual/en/reflectionmethod.isdestructor.php
+ * @return bool Returns {@see true} if the method is a destructor, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isDestructor(): bool {}
+
+ /**
+ * Returns a dynamically created closure for the method
+ *
+ * @link https://php.net/manual/en/reflectionmethod.getclosure.php
+ * @param object $object Forbidden for static methods, required for other methods or nothing.
+ * @return Closure|null Returns {@see Closure} or {@see null} in case of an error.
+ * @since 5.4
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getClosure(
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $object,
+ #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null
+ ): Closure {}
+
+ /**
+ * Gets the method modifiers
+ *
+ * @link https://php.net/manual/en/reflectionmethod.getmodifiers.php
+ * @return int A numeric representation of the modifiers. The modifiers are
+ * listed below. The actual meanings of these modifiers are described in the
+ * predefined constants.
+ *
+ * ReflectionMethod modifiers:
+ *
+ * - {@see ReflectionMethod::IS_STATIC} - Indicates that the method is static.
+ * - {@see ReflectionMethod::IS_PUBLIC} - Indicates that the method is public.
+ * - {@see ReflectionMethod::IS_PROTECTED} - Indicates that the method is protected.
+ * - {@see ReflectionMethod::IS_PRIVATE} - Indicates that the method is private.
+ * - {@see ReflectionMethod::IS_ABSTRACT} - Indicates that the method is abstract.
+ * - {@see ReflectionMethod::IS_FINAL} - Indicates that the method is final.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getModifiers(): int {}
+
+ /**
+ * Invokes a reflected method.
+ *
+ * @link https://php.net/manual/en/reflectionmethod.invoke.php
+ * @param object|null $object The object to invoke the method on. For static
+ * methods, pass {@see null} to this parameter.
+ * @param mixed ...$args Zero or more parameters to be passed to the
+ * method. It accepts a variable number of parameters which are passed to
+ * the method.
+ * @return mixed Returns the method result.
+ * @throws ReflectionException if the object parameter does not contain an
+ * instance of the class that this method was declared in or the method
+ * invocation failed.
+ */
+ public function invoke($object, ...$args) {}
+
+ /**
+ * Invokes the reflected method and pass its arguments as array.
+ *
+ * @link https://php.net/manual/en/reflectionmethod.invokeargs.php
+ * @param object|null $object The object to invoke the method on. In case
+ * of static methods, you can pass {@see null} to this parameter.
+ * @param array $args The parameters to be passed to the function, as an {@see array}.
+ * @return mixed the method result.
+ * @throws ReflectionException if the object parameter does not contain an
+ * instance of the class that this method was declared in or the method
+ * invocation failed.
+ */
+ #[TentativeType]
+ public function invokeArgs(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object, array $args): mixed {}
+
+ /**
+ * Gets declaring class for the reflected method.
+ *
+ * @link https://php.net/manual/en/reflectionmethod.getdeclaringclass.php
+ * @return ReflectionClass A {@see ReflectionClass} object of the class that the
+ * reflected method is part of.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDeclaringClass(): ReflectionClass {}
+
+ /**
+ * Gets the method prototype (if there is one).
+ *
+ * @link https://php.net/manual/en/reflectionmethod.getprototype.php
+ * @return ReflectionMethod A {@see ReflectionMethod} instance of the method prototype.
+ * @throws ReflectionException if the method does not have a prototype
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getPrototype(): ReflectionMethod {}
+
+ /**
+ * Set method accessibility
+ *
+ * @link https://php.net/manual/en/reflectionmethod.setaccessible.php
+ * @param bool $accessible {@see true} to allow accessibility, or {@see false}
+ * @return void No value is returned.
+ * @since 5.3.2
+ */
+ #[PhpStormStubsElementAvailable(to: "8.0")]
+ #[TentativeType]
+ public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {}
+
+ /**
+ * Set method accessibility
+ * This method is no-op starting from PHP 8.1
+ *
+ * @link https://php.net/manual/en/reflectionmethod.setaccessible.php
+ * @param bool $accessible {@see true} to allow accessibility, or {@see false}
+ * @return void No value is returned.
+ */
+ #[Pure]
+ #[PhpStormStubsElementAvailable(from: "8.1")]
+ #[TentativeType]
+ public function setAccessible(bool $accessible): void {}
+
+ #[PhpStormStubsElementAvailable(from: '8.2')]
+ public function hasPrototype(): bool {}
+}
diff --git a/Reflection/ReflectionNamedType.php b/Reflection/ReflectionNamedType.php
new file mode 100644
index 000000000..073b58f99
--- /dev/null
+++ b/Reflection/ReflectionNamedType.php
@@ -0,0 +1,33 @@
+ReflectionObject class reports
+ * information about an object.
+ *
+ * @link https://php.net/manual/en/class.reflectionobject.php
+ */
+class ReflectionObject extends ReflectionClass
+{
+ /**
+ * Constructs a ReflectionObject
+ *
+ * @link https://php.net/manual/en/reflectionobject.construct.php
+ * @param object $object An object instance.
+ */
+ public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object) {}
+
+ /**
+ * Export
+ *
+ * @link https://php.net/manual/en/reflectionobject.export.php
+ * @param string $argument The reflection to export.
+ * @param bool $return Setting to {@see true} will return the export,
+ * as opposed to emitting it. Setting to {@see false} (the default) will do
+ * the opposite.
+ * @return string|null If the $return parameter is set to {@see true}, then
+ * the export is returned as a string, otherwise {@see null} is returned.
+ * @removed 8.0
+ */
+ #[Deprecated(since: '7.4')]
+ public static function export($argument, $return = false) {}
+}
diff --git a/Reflection/ReflectionParameter.php b/Reflection/ReflectionParameter.php
new file mode 100644
index 000000000..4bc5e607f
--- /dev/null
+++ b/Reflection/ReflectionParameter.php
@@ -0,0 +1,309 @@
+ReflectionParameter class retrieves
+ * information about function's or method's parameters.
+ *
+ * @link https://php.net/manual/en/class.reflectionparameter.php
+ */
+class ReflectionParameter implements Reflector
+{
+ /**
+ * @var string Name of the parameter, same as calling the {@see ReflectionParameter::getName()} method
+ */
+ #[Immutable]
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $name;
+
+ /**
+ * Construct
+ *
+ * @link https://php.net/manual/en/reflectionparameter.construct.php
+ * @param callable $function The function to reflect parameters from.
+ * @param string|int $param Either an integer specifying the position
+ * of the parameter (starting with zero), or a the parameter name as string.
+ * @throws ReflectionException if the function or parameter does not exist.
+ */
+ public function __construct($function, #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param) {}
+
+ /**
+ * Exports
+ *
+ * @link https://php.net/manual/en/reflectionparameter.export.php
+ * @param string $function The function name.
+ * @param string $parameter The parameter name.
+ * @param bool $return Setting to {@see true} will return the export,
+ * as opposed to emitting it. Setting to {@see false} (the default) will do the
+ * opposite.
+ * @return string|null The exported reflection.
+ * @removed 8.0
+ */
+ #[Deprecated(since: '7.4')]
+ public static function export($function, $parameter, $return = false) {}
+
+ /**
+ * Returns the string representation of the ReflectionParameter object.
+ *
+ * @link https://php.net/manual/en/reflectionparameter.tostring.php
+ * @return string
+ */
+ #[TentativeType]
+ public function __toString(): string {}
+
+ /**
+ * Gets parameter name
+ *
+ * @link https://php.net/manual/en/reflectionparameter.getname.php
+ * @return string The name of the reflected parameter.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getName(): string {}
+
+ /**
+ * Checks if passed by reference
+ *
+ * @link https://php.net/manual/en/reflectionparameter.ispassedbyreference.php
+ * @return bool {@see true} if the parameter is passed in by reference, otherwise {@see false}
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isPassedByReference(): bool {}
+
+ /**
+ * Returns whether this parameter can be passed by value
+ *
+ * @link https://php.net/manual/en/reflectionparameter.canbepassedbyvalue.php
+ * @return bool|null {@see true} if the parameter can be passed by value, {@see false} otherwise.
+ * Returns {@see null} in case of an error.
+ * @since 5.4
+ */
+ #[TentativeType]
+ public function canBePassedByValue(): bool {}
+
+ /**
+ * Gets declaring function
+ *
+ * @link https://php.net/manual/en/reflectionparameter.getdeclaringfunction.php
+ * @return ReflectionFunctionAbstract A {@see ReflectionFunctionAbstract} object.
+ * @since 5.2.3
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDeclaringFunction(): ReflectionFunctionAbstract {}
+
+ /**
+ * Gets declaring class
+ *
+ * @link https://php.net/manual/en/reflectionparameter.getdeclaringclass.php
+ * @return ReflectionClass|null A {@see ReflectionClass} object or {@see null} if
+ * called on function.
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDeclaringClass(): ?ReflectionClass {}
+
+ /**
+ * Gets the class type hinted for the parameter as a ReflectionClass object.
+ *
+ * @link https://php.net/manual/en/reflectionparameter.getclass.php
+ * @return ReflectionClass|null A {@see ReflectionClass} object.
+ * @see ReflectionParameter::getType()
+ */
+ #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
+ #[Pure]
+ #[TentativeType]
+ public function getClass(): ?ReflectionClass {}
+
+ /**
+ * Checks if the parameter has a type associated with it.
+ *
+ * @link https://php.net/manual/en/reflectionparameter.hastype.php
+ * @return bool {@see true} if a type is specified, {@see false} otherwise.
+ * @since 7.0
+ */
+ #[TentativeType]
+ public function hasType(): bool {}
+
+ /**
+ * Gets a parameter's type
+ *
+ * @link https://php.net/manual/en/reflectionparameter.gettype.php
+ * @return ReflectionType|null Returns a {@see ReflectionType} object if a
+ * parameter type is specified, {@see null} otherwise.
+ * @since 7.0
+ */
+ #[Pure]
+ #[LanguageLevelTypeAware(
+ [
+ '7.1' => 'ReflectionNamedType|null',
+ '8.0' => 'ReflectionNamedType|ReflectionUnionType|null',
+ '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null'
+ ],
+ default: 'ReflectionType|null'
+ )]
+ #[TentativeType]
+ public function getType(): ?ReflectionType {}
+
+ /**
+ * Checks if parameter expects an array
+ *
+ * @link https://php.net/manual/en/reflectionparameter.isarray.php
+ * @return bool {@see true} if an array is expected, {@see false} otherwise.
+ * @see ReflectionParameter::getType()
+ */
+ #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
+ #[Pure]
+ #[TentativeType]
+ public function isArray(): bool {}
+
+ /**
+ * Returns whether parameter MUST be callable
+ *
+ * @link https://php.net/manual/en/reflectionparameter.iscallable.php
+ * @return bool|null Returns {@see true} if the parameter is callable, {@see false}
+ * if it is not or {@see null} on failure.
+ * @since 5.4
+ * @see ReflectionParameter::getType()
+ */
+ #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")]
+ #[Pure]
+ #[TentativeType]
+ public function isCallable(): bool {}
+
+ /**
+ * Checks if null is allowed
+ *
+ * @link https://php.net/manual/en/reflectionparameter.allowsnull.php
+ * @return bool Returns {@see true} if {@see null} is allowed,
+ * otherwise {@see false}
+ */
+ #[TentativeType]
+ public function allowsNull(): bool {}
+
+ /**
+ * Gets parameter position
+ *
+ * @link https://php.net/manual/en/reflectionparameter.getposition.php
+ * @return int The position of the parameter, left to right, starting at position #0.
+ * @since 5.2.3
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getPosition(): int {}
+
+ /**
+ * Checks if optional
+ *
+ * @link https://php.net/manual/en/reflectionparameter.isoptional.php
+ * @return bool Returns {@see true} if the parameter is optional, otherwise {@see false}
+ * @since 5.0.3
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isOptional(): bool {}
+
+ /**
+ * Checks if a default value is available
+ *
+ * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueavailable.php
+ * @return bool Returns {@see true} if a default value is available, otherwise {@see false}
+ * @since 5.0.3
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isDefaultValueAvailable(): bool {}
+
+ /**
+ * Gets default parameter value
+ *
+ * @link https://php.net/manual/en/reflectionparameter.getdefaultvalue.php
+ * @return mixed The parameters default value.
+ * @throws ReflectionException if the parameter is not optional
+ * @since 5.0.3
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDefaultValue(): mixed {}
+
+ /**
+ * Returns whether the default value of this parameter is constant
+ *
+ * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueconstant.php
+ * @return bool Returns {@see true} if the default value is constant, and {@see false} otherwise.
+ * @since 5.4.6
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isDefaultValueConstant(): bool {}
+
+ /**
+ * Returns the default value's constant name if default value is constant or null
+ *
+ * @link https://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php
+ * @return string|null Returns string on success or {@see null} on failure.
+ * @throws ReflectionException if the parameter is not optional
+ * @since 5.4.6
+ */
+ #[Pure]
+ #[TentativeType]
+ public function getDefaultValueConstantName(): ?string {}
+
+ /**
+ * Returns whether this function is variadic
+ *
+ * @link https://php.net/manual/en/reflectionparameter.isvariadic.php
+ * @return bool Returns {@see true} if the function is variadic, otherwise {@see false}
+ * @since 5.6
+ */
+ #[Pure]
+ #[TentativeType]
+ public function isVariadic(): bool {}
+
+ /**
+ * Returns information about whether the parameter is a promoted.
+ *
+ * @return bool Returns {@see true} if the parameter promoted or {@see false} instead
+ * @since 8.0
+ */
+ #[Pure]
+ public function isPromoted(): bool {}
+
+ /**
+ * @template T
+ *
+ * Returns an array of parameter attributes.
+ *
+ * @param class-string function my_callback($current, $key, $iterator)
* @link https://secure.php.net/manual/en/callbackfilteriterator.construct.php
*/
- function __construct(Iterator $iterator , callable $callback) { }
+ public function __construct(Iterator $iterator, callable $callback) {}
/**
* This method calls the callback with the current value, current key and the inner iterator.
@@ -176,39 +167,45 @@ function __construct(Iterator $iterator , callable $callback) { }
* @link https://secure.php.net/manual/en/callbackfilteriterator.accept.php
* @return bool true if the current element is acceptable, otherwise false.
*/
- public function accept() { }
+ #[TentativeType]
+ public function accept(): bool {}
}
/**
* (PHP 5 >= 5.4.0)* RecursiveCallbackFilterIterator from a RecursiveIterator * @link https://secure.php.net/manual/en/class.recursivecallbackfilteriterator.php + * @since 5.4 */ -class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements RecursiveIterator { - +class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements RecursiveIterator +{ /** * Create a RecursiveCallbackFilterIterator from a RecursiveIterator * @param RecursiveIterator $iterator The recursive iterator to be filtered. - * @param string $callback The callback, which should return TRUE to accept the current item or FALSE otherwise. See Examples. + * @param callable $callback The callback, which should return TRUE to accept the current item or FALSE otherwise. See Examples. * May be any valid callable value. - * @link https://secure.php.net/manual/en/recursivecallbackfilteriterator.getchildren.php + * @link https://www.php.net/manual/en/recursivecallbackfilteriterator.construct.php */ - function __construct( RecursiveIterator $iterator, $callback ) { } + public function __construct( + RecursiveIterator $iterator, + #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback + ) {} /** * Check whether the inner iterator's current element has children * @link https://php.net/manual/en/recursiveiterator.haschildren.php * @return bool Returns TRUE if the current element has children, FALSE otherwise. */ - public function hasChildren() { } + #[TentativeType] + public function hasChildren(): bool {} /** * Returns an iterator for the current entry. * @link https://secure.php.net/manual/en/recursivecallbackfilteriterator.haschildren.php * @return RecursiveCallbackFilterIterator containing the children. */ - public function getChildren() { } - + #[TentativeType] + public function getChildren(): RecursiveCallbackFilterIterator {} } /** @@ -216,50 +213,50 @@ public function getChildren() { } * over iterators recursively. * @link https://php.net/manual/en/class.recursiveiterator.php */ -interface RecursiveIterator extends Iterator { - +interface RecursiveIterator extends Iterator +{ /** * Returns if an iterator can be created for the current entry. * @link https://php.net/manual/en/recursiveiterator.haschildren.php * @return bool true if the current entry can be iterated over, otherwise returns false. - * @since 5.1 */ - public function hasChildren(); + #[TentativeType] + public function hasChildren(): bool; /** * Returns an iterator for the current entry. * @link https://php.net/manual/en/recursiveiterator.getchildren.php - * @return RecursiveIterator An iterator for the current entry. - * @since 5.1 + * @return RecursiveIterator|null An iterator for the current entry. */ - public function getChildren(); + #[TentativeType] + public function getChildren(): ?RecursiveIterator; } /** * Can be used to iterate through recursive iterators. * @link https://php.net/manual/en/class.recursiveiteratoriterator.php */ -class RecursiveIteratorIterator implements OuterIterator { - +class RecursiveIteratorIterator implements OuterIterator +{ /** * The default. Lists only leaves in iteration. */ - const LEAVES_ONLY = 0; + public const LEAVES_ONLY = 0; /** * Lists leaves and parents in iteration with parents coming first. */ - const SELF_FIRST = 1; + public const SELF_FIRST = 1; /** * Lists leaves and parents in iteration with leaves coming first. */ - const CHILD_FIRST = 2; + public const CHILD_FIRST = 2; /** * Special flag: Ignore exceptions thrown in accessing children. */ - const CATCH_GET_CHILD = 16; + public const CATCH_GET_CHILD = 16; /** * Construct a RecursiveIteratorIterator @@ -269,148 +266,152 @@ class RecursiveIteratorIterator implements OuterIterator { * @param int $flags [optional] A bitmask of special flags. See class constants for details. * @since 5.1.3 */ - public function __construct(Traversable $iterator, $mode = self::LEAVES_ONLY, $flags = 0) { } + public function __construct( + Traversable $iterator, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::LEAVES_ONLY, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0 + ) {} /** * Rewind the iterator to the first element of the top level inner iterator * @link https://php.net/manual/en/recursiveiteratoriterator.rewind.php * @return void - * @since 5.0 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Check whether the current position is valid * @link https://php.net/manual/en/recursiveiteratoriterator.valid.php * @return bool true if the current position is valid, otherwise false - * @since 5.0 */ - public function valid() { } + #[TentativeType] + public function valid(): bool {} /** * Access the current key * @link https://php.net/manual/en/recursiveiteratoriterator.key.php - * @return string|float|int|bool|null The current key. - * @since 5.0 + * @return mixed The key of the current element. */ - public function key() { } + #[TentativeType] + public function key(): mixed {} /** * Access the current element value * @link https://php.net/manual/en/recursiveiteratoriterator.current.php * @return mixed The current elements value. - * @since 5.0 */ - public function current() { } + #[TentativeType] + public function current(): mixed {} /** * Move forward to the next element * @link https://php.net/manual/en/recursiveiteratoriterator.next.php * @return void - * @since 5.0 */ - public function next() { } + #[TentativeType] + public function next(): void {} /** * Get the current depth of the recursive iteration * @link https://php.net/manual/en/recursiveiteratoriterator.getdepth.php * @return int The current depth of the recursive iteration. - * @since 5.0 */ - public function getDepth() { } + #[TentativeType] + public function getDepth(): int {} /** * The current active sub iterator * @link https://php.net/manual/en/recursiveiteratoriterator.getsubiterator.php - * @param $level [optional] - * @return RecursiveIterator The current active sub iterator. - * @since 5.0 + * @param int $level [optional] + * @return RecursiveIterator|null The current active sub iterator. */ - public function getSubIterator($level) { } + #[TentativeType] + public function getSubIterator(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $level): ?RecursiveIterator {} /** * Get inner iterator * @link https://php.net/manual/en/recursiveiteratoriterator.getinneriterator.php - * @return Iterator The current active sub iterator. - * @since 5.1 + * @return RecursiveIterator The current active sub iterator. */ - public function getInnerIterator() { } + #[TentativeType] + public function getInnerIterator(): RecursiveIterator {} /** * Begin Iteration * @link https://php.net/manual/en/recursiveiteratoriterator.beginiteration.php * @return void - * @since 5.1 */ - public function beginIteration() { } + #[TentativeType] + public function beginIteration(): void {} /** * End Iteration * @link https://php.net/manual/en/recursiveiteratoriterator.enditeration.php * @return void - * @since 5.1 */ - public function endIteration() { } + #[TentativeType] + public function endIteration(): void {} /** * Has children * @link https://php.net/manual/en/recursiveiteratoriterator.callhaschildren.php * @return bool true if the element has children, otherwise false - * @since 5.1 */ - public function callHasChildren() { } + #[TentativeType] + public function callHasChildren(): bool {} /** * Get children * @link https://php.net/manual/en/recursiveiteratoriterator.callgetchildren.php - * @return RecursiveIterator A RecursiveIterator. - * @since 5.1 + * @return RecursiveIterator|null A RecursiveIterator. */ - public function callGetChildren() { } + #[TentativeType] + public function callGetChildren(): ?RecursiveIterator {} /** * Begin children * @link https://php.net/manual/en/recursiveiteratoriterator.beginchildren.php * @return void - * @since 5.1 */ - public function beginChildren() { } + #[TentativeType] + public function beginChildren(): void {} /** * End children * @link https://php.net/manual/en/recursiveiteratoriterator.endchildren.php * @return void - * @since 5.1 */ - public function endChildren() { } + #[TentativeType] + public function endChildren(): void {} /** * Next element * @link https://php.net/manual/en/recursiveiteratoriterator.nextelement.php * @return void - * @since 5.1 */ - public function nextElement() { } + #[TentativeType] + public function nextElement(): void {} /** * Set max depth * @link https://php.net/manual/en/recursiveiteratoriterator.setmaxdepth.php - * @param string $max_depth [optional] + * @param int $maxDepth [optional] * The maximum allowed depth. Default -1 is used * for any depth. * * @return void - * @since 5.1 */ - public function setMaxDepth($max_depth) { } + #[TentativeType] + public function setMaxDepth(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxDepth = -1): void {} /** * Get max depth * @link https://php.net/manual/en/recursiveiteratoriterator.getmaxdepth.php * @return int|false The maximum accepted depth, or false if any depth is allowed. - * @since 5.1 */ - public function getMaxDepth() { } + #[TentativeType] + public function getMaxDepth(): int|false {} } /** @@ -418,18 +419,17 @@ public function getMaxDepth() { } * over iterators. * @link https://php.net/manual/en/class.outeriterator.php */ -interface OuterIterator extends Iterator { - +interface OuterIterator extends Iterator +{ /** * Returns the inner iterator for the current entry. * @link https://php.net/manual/en/outeriterator.getinneriterator.php - * @return Iterator The inner iterator for the current entry. - * @since 5.1 + * @return Iterator|null The inner iterator for the current entry. */ - public function getInnerIterator(); + #[TentativeType] + public function getInnerIterator(): ?Iterator; } - /** * This iterator wrapper allows the conversion of anything that is * Traversable into an Iterator. @@ -439,63 +439,63 @@ public function getInnerIterator(); * misuse, otherwise expect exceptions or fatal errors. * @link https://php.net/manual/en/class.iteratoriterator.php */ -class IteratorIterator implements OuterIterator { - +class IteratorIterator implements OuterIterator +{ /** * Create an iterator from anything that is traversable * @link https://php.net/manual/en/iteratoriterator.construct.php * @param Traversable $iterator - * @since 5.1 + * @param string|null $class [optional] */ - public function __construct(Traversable $iterator) { } + public function __construct(Traversable $iterator, #[PhpStormStubsElementAvailable(from: '8.0')] ?string $class = '') {} /** * Get the inner iterator * @link https://php.net/manual/en/iteratoriterator.getinneriterator.php - * @return Iterator The inner iterator as passed to IteratorIterator::__construct. - * @since 5.1 + * @return Iterator|null The inner iterator as passed to IteratorIterator::__construct. */ - public function getInnerIterator() { } + #[TentativeType] + public function getInnerIterator(): ?Iterator {} /** * Rewind to the first element * @link https://php.net/manual/en/iteratoriterator.rewind.php * @return void - * @since 5.1 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Checks if the iterator is valid * @link https://php.net/manual/en/iteratoriterator.valid.php * @return bool true if the iterator is valid, otherwise false - * @since 5.1 */ - public function valid() { } + #[TentativeType] + public function valid(): bool {} /** * Get the key of the current element * @link https://php.net/manual/en/iteratoriterator.key.php - * @return string|float|int|bool|null The key of the current element. - * @since 5.1 + * @return mixed The key of the current element. */ - public function key() { } + #[TentativeType] + public function key(): mixed {} /** * Get the current value * @link https://php.net/manual/en/iteratoriterator.current.php * @return mixed The value of the current element. - * @since 5.1 */ - public function current() { } + #[TentativeType] + public function current(): mixed {} /** * Forward to the next element * @link https://php.net/manual/en/iteratoriterator.next.php * @return void - * @since 5.1 */ - public function next() { } + #[TentativeType] + public function next(): void {} } /** @@ -504,71 +504,66 @@ public function next() { } * must be implemented in the subclass. * @link https://php.net/manual/en/class.filteriterator.php */ -abstract class FilterIterator extends IteratorIterator { - +abstract class FilterIterator extends IteratorIterator +{ /** * Check whether the current element of the iterator is acceptable * @link https://php.net/manual/en/filteriterator.accept.php * @return bool true if the current element is acceptable, otherwise false. - * @since 5.1 */ - abstract public function accept(); + #[TentativeType] + abstract public function accept(): bool; /** * Construct a filterIterator * @link https://php.net/manual/en/filteriterator.construct.php * @param Iterator $iterator - * @since 5.1 */ - public function __construct(Iterator $iterator) { } + public function __construct(Iterator $iterator) {} /** * Rewind the iterator * @link https://php.net/manual/en/filteriterator.rewind.php * @return void - * @since 5.1 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Check whether the current element is valid * @link https://php.net/manual/en/filteriterator.valid.php * @return bool true if the current element is valid, otherwise false - * @since 5.1 */ - public function valid() { } + public function valid(): bool {} /** * Get the current key * @link https://php.net/manual/en/filteriterator.key.php - * @return string|float|int|bool|null The current key. - * @since 5.1 + * @return mixed The key of the current element. */ - public function key() { } + public function key(): mixed {} /** * Get the current element value * @link https://php.net/manual/en/filteriterator.current.php * @return mixed The current element value. - * @since 5.1 */ - public function current() { } + public function current(): mixed {} /** * Move the iterator forward * @link https://php.net/manual/en/filteriterator.next.php * @return void - * @since 5.1 */ - public function next() { } + #[TentativeType] + public function next(): void {} /** * Get the inner iterator * @link https://php.net/manual/en/filteriterator.getinneriterator.php * @return Iterator The inner iterator. - * @since 5.1 */ - public function getInnerIterator() { } + public function getInnerIterator(): Iterator {} } /** @@ -577,88 +572,84 @@ public function getInnerIterator() { } * The RecursiveFilterIterator::accept must be implemented in the subclass. * @link https://php.net/manual/en/class.recursivefilteriterator.php */ -abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator { - +abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator +{ /** * Create a RecursiveFilterIterator from a RecursiveIterator * @link https://php.net/manual/en/recursivefilteriterator.construct.php * @param RecursiveIterator $iterator - * @since 5.1 */ - public function __construct(RecursiveIterator $iterator) { } + public function __construct(RecursiveIterator $iterator) {} /** * Check whether the inner iterator's current element has children * @link https://php.net/manual/en/recursivefilteriterator.haschildren.php * @return bool true if the inner iterator has children, otherwise false - * @since 5.1 */ - public function hasChildren() { } + #[TentativeType] + public function hasChildren(): bool {} /** * Return the inner iterator's children contained in a RecursiveFilterIterator * @link https://php.net/manual/en/recursivefilteriterator.getchildren.php - * @return RecursiveFilterIterator containing the inner iterator's children. - * @since 5.1 + * @return RecursiveFilterIterator|null containing the inner iterator's children. */ - public function getChildren() { } + #[TentativeType] + public function getChildren(): ?RecursiveFilterIterator {} } /** * This extended FilterIterator allows a recursive iteration using RecursiveIteratorIterator that only shows those elements which have children. * @link https://php.net/manual/en/class.parentiterator.php */ -class ParentIterator extends RecursiveFilterIterator { - +class ParentIterator extends RecursiveFilterIterator +{ /** * Determines acceptability * @link https://php.net/manual/en/parentiterator.accept.php * @return bool true if the current element is acceptable, otherwise false. - * @since 5.1 */ - public function accept() { } + #[TentativeType] + public function accept(): bool {} /** * Constructs a ParentIterator * @link https://php.net/manual/en/parentiterator.construct.php * @param RecursiveIterator $iterator - * @since 5.1 */ - public function __construct(RecursiveIterator $iterator) { } + public function __construct(RecursiveIterator $iterator) {} /** * Check whether the inner iterator's current element has children * @link https://php.net/manual/en/recursivefilteriterator.haschildren.php * @return bool true if the inner iterator has children, otherwise false - * @since 5.1 */ - public function hasChildren() { } + public function hasChildren() {} /** * Return the inner iterator's children contained in a RecursiveFilterIterator * @link https://php.net/manual/en/recursivefilteriterator.getchildren.php * @return ParentIterator containing the inner iterator's children. - * @since 5.1 */ - public function getChildren() { } + public function getChildren() {} } /** * The Seekable iterator. * @link https://php.net/manual/en/class.seekableiterator.php */ -interface SeekableIterator extends Iterator { - +interface SeekableIterator extends Iterator +{ /** * Seeks to a position * @link https://php.net/manual/en/seekableiterator.seek.php - * @param int $position+ * @param int $offset * The position to seek to. * * @return void - * @since 5.1 */ - public function seek($position); + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void; } /** @@ -666,264 +657,260 @@ public function seek($position); * a limited subset of items in an Iterator. * @link https://php.net/manual/en/class.limititerator.php */ -class LimitIterator extends IteratorIterator { - +class LimitIterator extends IteratorIterator +{ /** * Construct a LimitIterator * @link https://php.net/manual/en/limititerator.construct.php * @param Iterator $iterator The iterator to limit. * @param int $offset [optional] The offset to start at. Must be zero or greater. - * @param int $count [optional] The number of items to iterate. Must be -1 or greater. -1, the default, means no limit. - * @since 5.1 + * @param int $limit [optional] The number of items to iterate. Must be -1 or greater. -1, the default, means no limit. */ - public function __construct(Iterator $iterator, $offset = 0, $count = -1) { } + public function __construct( + Iterator $iterator, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset = 0, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $limit = -1 + ) {} /** * Rewind the iterator to the specified starting offset * @link https://php.net/manual/en/limititerator.rewind.php * @return void - * @since 5.1 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Check whether the current element is valid * @link https://php.net/manual/en/limititerator.valid.php * @return bool true on success or false on failure. - * @since 5.1 */ - public function valid() { } + #[TentativeType] + public function valid(): bool {} /** * Get current key * @link https://php.net/manual/en/limititerator.key.php - * @return string|float|int|bool|null the key for the current item. - * @since 5.1 + * @return mixed The key of the current element. */ - public function key() { } + public function key(): mixed {} /** * Get current element * @link https://php.net/manual/en/limititerator.current.php * @return mixed the current element or null if there is none. - * @since 5.1 */ - public function current() { } + public function current(): mixed {} /** * Move the iterator forward * @link https://php.net/manual/en/limititerator.next.php * @return void - * @since 5.1 */ - public function next() { } + #[TentativeType] + public function next(): void {} /** * Seek to the given position * @link https://php.net/manual/en/limititerator.seek.php - * @param int $position+ * @param int $offset * The position to seek to. * * @return int the offset position after seeking. - * @since 5.1 */ - public function seek($position) { } + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): int {} /** * Return the current position * @link https://php.net/manual/en/limititerator.getposition.php * @return int The current position. - * @since 5.1 */ - public function getPosition() { } + #[TentativeType] + public function getPosition(): int {} /** * Get inner iterator * @link https://php.net/manual/en/limititerator.getinneriterator.php * @return Iterator The inner iterator passed to LimitIterator::__construct. - * @since 5.1 */ - public function getInnerIterator() { } + public function getInnerIterator(): Iterator {} } /** * This object supports cached iteration over another iterator. * @link https://php.net/manual/en/class.cachingiterator.php */ -class CachingIterator extends IteratorIterator implements ArrayAccess, Countable { - +class CachingIterator extends IteratorIterator implements ArrayAccess, Countable, Stringable +{ /** * String conversion flag (mutually exclusive): Uses the current element for the iterator's string conversion. * This converts the current element to a string only once, regardless of whether it is needed or not. */ - const CALL_TOSTRING = 1; + public const CALL_TOSTRING = 1; /** * String conversion flag (mutually exclusive). Uses the current key for the iterator's string conversion. */ - const TOSTRING_USE_KEY = 2; + public const TOSTRING_USE_KEY = 2; /** * String conversion flag (mutually exclusive). Uses the current element for the iterator's string conversion. * This converts the current element to a string only when (and every time) it is needed. */ - const TOSTRING_USE_CURRENT = 4; + public const TOSTRING_USE_CURRENT = 4; /** * String conversion flag (mutually exclusive). Forwards the string conversion to the inner iterator. * This converts the inner iterator to a string only once, regardless of whether it is needed or not. */ - const TOSTRING_USE_INNER = 8; + public const TOSTRING_USE_INNER = 8; /** * Ignore exceptions thrown in accessing children. Only used with {@see RecursiveCachingIterator}. */ - const CATCH_GET_CHILD = 16; + public const CATCH_GET_CHILD = 16; /** * Cache all read data. This is needed to use {@see CachingIterator::getCache}, and ArrayAccess and Countable methods. */ - const FULL_CACHE = 256; + public const FULL_CACHE = 256; /** * Constructs a new CachingIterator. * @link https://php.net/manual/en/cachingiterator.construct.php * @param Iterator $iterator The iterator to cache. * @param int $flags [optional] A bitmask of flags. See CachingIterator class constants for details. - * @since 5.0 */ - public function __construct(Iterator $iterator, $flags = self::CALL_TOSTRING) { } + public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::CALL_TOSTRING) {} /** * Rewind the iterator * @link https://php.net/manual/en/cachingiterator.rewind.php * @return void - * @since 5.0 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Check whether the current element is valid * @link https://php.net/manual/en/cachingiterator.valid.php * @return bool true on success or false on failure. - * @since 5.0 */ - public function valid() { } + #[TentativeType] + public function valid(): bool {} /** * Return the key for the current element * @link https://php.net/manual/en/cachingiterator.key.php - * @return string|float|int|bool|null - * @since 5.0 + * @return mixed The key of the current element. */ - public function key() { } + public function key(): mixed {} /** * Return the current element * @link https://php.net/manual/en/cachingiterator.current.php * @return mixed - * @since 5.0 */ - public function current() { } + public function current(): mixed {} /** * Move the iterator forward * @link https://php.net/manual/en/cachingiterator.next.php * @return void - * @since 5.0 */ - public function next() { } + #[TentativeType] + public function next(): void {} /** * Check whether the inner iterator has a valid next element * @link https://php.net/manual/en/cachingiterator.hasnext.php * @return bool true on success or false on failure. - * @since 5.0 */ - public function hasNext() { } + #[TentativeType] + public function hasNext(): bool {} /** * Return the string representation of the current iteration based on the flag being used. * @link https://php.net/manual/en/cachingiterator.tostring.php * @return string The string representation of the current iteration based on the flag being used. - * @since 5.0 */ - public function __toString() { } + #[TentativeType] + public function __toString(): string {} /** * Returns the inner iterator * @link https://php.net/manual/en/cachingiterator.getinneriterator.php * @return Iterator an object implementing the Iterator interface. - * @since 5.0 */ - public function getInnerIterator() { } + public function getInnerIterator(): Iterator {} /** * Get flags used * @link https://php.net/manual/en/cachingiterator.getflags.php * @return int Bitmask of the flags - * @since 5.2 */ - public function getFlags() { } + #[TentativeType] + public function getFlags(): int {} /** * The setFlags purpose * @link https://php.net/manual/en/cachingiterator.setflags.php * @param int $flags Bitmask of the flags to set. * @return void - * @since 5.2 */ - public function setFlags($flags) { } + #[TentativeType] + public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} /** * Internal cache array index to retrieve. * @link https://php.net/manual/en/cachingiterator.offsetget.php - * @param string $index The index of the element to retrieve. + * @param string $key The index of the element to retrieve. * @return mixed * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used. - * @since 5.2 */ - public function offsetGet($index) { } + #[TentativeType] + public function offsetGet($key): mixed {} /** * Set an element on the internal cache array. * @link https://php.net/manual/en/cachingiterator.offsetset.php - * @param string $index The index of the element to be set. - * @param string $newval The new value for the index. + * @param string $key The index of the element to be set. + * @param string $value The new value for the index. * @return void * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used. - * @since 5.2 */ - public function offsetSet($index, $newval) { } + #[TentativeType] + public function offsetSet($key, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} /** * Remove an element from the internal cache array. * @link https://php.net/manual/en/cachingiterator.offsetunset.php - * @param string $index The index of the element to be unset. + * @param string $key The index of the element to be unset. * @return void * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used. - * @since 5.2 */ - public function offsetUnset($index) { } + #[TentativeType] + public function offsetUnset($key): void {} /** * Return whether an element at the index exists on the internal cache array. * @link https://php.net/manual/en/cachingiterator.offsetexists.php - * @param string $index The index being checked. + * @param string $key The index being checked. * @return bool true if an entry referenced by the offset exists, false otherwise. * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used. - * @since 5.2 */ - public function offsetExists($index) { } + #[TentativeType] + public function offsetExists($key): bool {} /** * Retrieve the contents of the cache * @link https://php.net/manual/en/cachingiterator.getcache.php * @return array An array containing the cache items. * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used. - * @since 5.2 */ - public function getCache() { } + #[TentativeType] + public function getCache(): array {} /** * The number of elements in the iterator @@ -932,117 +919,113 @@ public function getCache() { } * @throws BadMethodCallException when the {@see CachingIterator::FULL_CACHE} flag is not being used. * @since 5.2.2 */ - public function count() { } + #[TentativeType] + public function count(): int {} } /** * ... * @link https://php.net/manual/en/class.recursivecachingiterator.php */ -class RecursiveCachingIterator extends CachingIterator implements RecursiveIterator { - +class RecursiveCachingIterator extends CachingIterator implements RecursiveIterator +{ /** * Constructs a new RecursiveCachingIterator. * @link https://php.net/manual/en/recursivecachingiterator.construct.php * @param Iterator $iterator The iterator to cache. * @param int $flags [optional] A bitmask of flags. See CachingIterator class constants for details. - * @since 5.1 */ - public function __construct(Iterator $iterator, $flags = self::CALL_TOSTRING) { } + public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::CALL_TOSTRING) {} /** * Check whether the current element of the inner iterator has children * @link https://php.net/manual/en/recursivecachingiterator.haschildren.php * @return bool true if the inner iterator has children, otherwise false - * @since 5.1 */ - public function hasChildren() { } + #[TentativeType] + public function hasChildren(): bool {} /** * Return the inner iterator's children as a RecursiveCachingIterator * @link https://php.net/manual/en/recursivecachingiterator.getchildren.php - * @return RecursiveCachingIterator The inner iterator's children, as a RecursiveCachingIterator. - * @since 5.1 + * @return RecursiveCachingIterator|null The inner iterator's children, as a RecursiveCachingIterator. */ - public function getChildren() { } + #[TentativeType] + public function getChildren(): ?RecursiveCachingIterator {} } - /** * This iterator cannot be rewinded. * @link https://php.net/manual/en/class.norewinditerator.php */ -class NoRewindIterator extends IteratorIterator { - +class NoRewindIterator extends IteratorIterator +{ /** * Construct a NoRewindIterator * @link https://php.net/manual/en/norewinditerator.construct.php * @param Iterator $iterator - * @since 5.1 */ - public function __construct(Iterator $iterator) { } + public function __construct(Iterator $iterator) {} /** * Prevents the rewind operation on the inner iterator. * @link https://php.net/manual/en/norewinditerator.rewind.php * @return void - * @since 5.1 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Validates the iterator * @link https://php.net/manual/en/norewinditerator.valid.php * @return bool true on success or false on failure. - * @since 5.1 */ - public function valid() { } + #[TentativeType] + public function valid(): bool {} /** * Get the current key * @link https://php.net/manual/en/norewinditerator.key.php - * @return string|float|int|bool|null The current key. - * @since 5.1 + * @return mixed The key of the current element. */ - public function key() { } + #[TentativeType] + public function key(): mixed {} /** * Get the current value * @link https://php.net/manual/en/norewinditerator.current.php * @return mixed The current value. - * @since 5.1 */ - public function current() { } + #[TentativeType] + public function current(): mixed {} /** * Forward to the next element * @link https://php.net/manual/en/norewinditerator.next.php * @return void - * @since 5.1 */ - public function next() { } + #[TentativeType] + public function next(): void {} /** * Get the inner iterator * @link https://php.net/manual/en/norewinditerator.getinneriterator.php * @return Iterator The inner iterator, as passed to NoRewindIterator::__construct. - * @since 5.1 */ - public function getInnerIterator() { } + public function getInnerIterator(): Iterator {} } /** * An Iterator that iterates over several iterators one after the other. * @link https://php.net/manual/en/class.appenditerator.php */ -class AppendIterator extends IteratorIterator { - +class AppendIterator extends IteratorIterator +{ /** * Constructs an AppendIterator * @link https://php.net/manual/en/appenditerator.construct.php - * @since 5.1 */ - public function __construct() { } + public function __construct() {} /** * Appends an iterator @@ -1051,73 +1034,71 @@ public function __construct() { } * The iterator to append. * * @return void - * @since 5.1 */ - public function append(Iterator $iterator) { } + #[TentativeType] + public function append(Iterator $iterator): void {} /** * Rewinds the Iterator * @link https://php.net/manual/en/appenditerator.rewind.php * @return void - * @since 5.1 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Checks validity of the current element * @link https://php.net/manual/en/appenditerator.valid.php * @return bool true on success or false on failure. - * @since 5.1 */ - public function valid() { } + #[TentativeType] + public function valid(): bool {} /** * Gets the current key * @link https://php.net/manual/en/appenditerator.key.php - * @return string|float|int|bool|null The current key if it is valid or null otherwise. - * @since 5.1 + * @return mixed The key of the current element. */ - public function key() { } + public function key(): mixed {} /** * Gets the current value * @link https://php.net/manual/en/appenditerator.current.php - * @return mixed The current value if it is valid or &null; otherwise. - * @since 5.1 + * @return mixed The current value if it is valid or null otherwise. */ - public function current() { } + #[TentativeType] + public function current(): mixed {} /** * Moves to the next element * @link https://php.net/manual/en/appenditerator.next.php * @return void - * @since 5.1 */ - public function next() { } + #[TentativeType] + public function next(): void {} /** * Gets an inner iterator * @link https://php.net/manual/en/appenditerator.getinneriterator.php * @return Iterator the current inner Iterator. - * @since 5.1 */ - public function getInnerIterator() { } + public function getInnerIterator(): Iterator {} /** * Gets an index of iterators * @link https://php.net/manual/en/appenditerator.getiteratorindex.php - * @return int The index of iterators. - * @since 5.1 + * @return int|null The index of iterators. */ - public function getIteratorIndex() { } + #[TentativeType] + public function getIteratorIndex(): ?int {} /** * The getArrayIterator method * @link https://php.net/manual/en/appenditerator.getarrayiterator.php * @return ArrayIterator containing the appended iterators. - * @since 5.1 */ - public function getArrayIterator() { } + #[TentativeType] + public function getArrayIterator(): ArrayIterator {} } /** @@ -1126,93 +1107,96 @@ public function getArrayIterator() { } * rewind the iterator upon reaching its end. * @link https://php.net/manual/en/class.infiniteiterator.php */ -class InfiniteIterator extends IteratorIterator { - +class InfiniteIterator extends IteratorIterator +{ /** * Constructs an InfiniteIterator * @link https://php.net/manual/en/infiniteiterator.construct.php * @param Iterator $iterator - * @since 5.1 */ - public function __construct(Iterator $iterator) { } + public function __construct(Iterator $iterator) {} /** * Moves the inner Iterator forward or rewinds it * @link https://php.net/manual/en/infiniteiterator.next.php * @return void - * @since 5.1 */ - public function next() { } + #[TentativeType] + public function next(): void {} } /** * This iterator can be used to filter another iterator based on a regular expression. * @link https://php.net/manual/en/class.regexiterator.php */ -class RegexIterator extends FilterIterator { - +class RegexIterator extends FilterIterator +{ /** * Return all matches for the current entry @see preg_match_all */ - const ALL_MATCHES = 2; + public const ALL_MATCHES = 2; /** * Return the first match for the current entry @see preg_match */ - const GET_MATCH = 1; + public const GET_MATCH = 1; /** * Only execute match (filter) for the current entry @see preg_match */ - const MATCH = 0; + public const MATCH = 0; /** * Replace the current entry (Not fully implemented yet) @see preg_replace */ - const REPLACE = 4; + public const REPLACE = 4; /** * Returns the split values for the current entry @see preg_split */ - const SPLIT = 3; + public const SPLIT = 3; /** * Special flag: Match the entry key instead of the entry value. */ - const USE_KEY = 1; - - const INVERT_MATCH = 2; + public const USE_KEY = 1; + public const INVERT_MATCH = 2; + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] public $replacement; - /** * Create a new RegexIterator * @link https://php.net/manual/en/regexiterator.construct.php * @param Iterator $iterator The iterator to apply this regex filter to. - * @param string $regex The regular expression to match. + * @param string $pattern The regular expression to match. * @param int $mode [optional] Operation mode, see RegexIterator::setMode() for a list of modes. * @param int $flags [optional] Special flags, see RegexIterator::setFlags() for a list of available flags. - * @param int $preg_flags [optional] The regular expression flags. These flags depend on the operation mode parameter - * @since 5.2 + * @param int $pregFlags [optional] The regular expression flags. These flags depend on the operation mode parameter */ - public function __construct(Iterator $iterator, $regex, $mode = self::MATCH, $flags = 0, $preg_flags = 0) { } + public function __construct( + Iterator $iterator, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::MATCH, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags = 0 + ) {} /** * Get accept status * @link https://php.net/manual/en/regexiterator.accept.php * @return bool true if a match, false otherwise. - * @since 5.2 */ - public function accept() { } + #[TentativeType] + public function accept(): bool {} /** * Returns operation mode. * @link https://php.net/manual/en/regexiterator.getmode.php * @return int the operation mode. - * @since 5.2 */ - public function getMode() { } + #[TentativeType] + public function getMode(): int {} /** * Sets the operation mode. @@ -1263,17 +1247,17 @@ public function getMode() { } * |
+ * @param int $pregFlags
* The regular expression flags. See RegexIterator::__construct * for an overview of available flags. *
* @return void - * @since 5.2 */ - public function setPregFlags($preg_flags) { } + #[TentativeType] + public function setPregFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags): void {} } /** * This recursive iterator can filter another recursive iterator via a regular expression. * @link https://php.net/manual/en/class.recursiveregexiterator.php */ -class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator { +class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator +{ /** * Creates a new RecursiveRegexIterator. * @link https://php.net/manual/en/recursiveregexiterator.construct.php * @param RecursiveIterator $iterator The iterator to apply this regex filter to. - * @param string $regex The regular expression to match. + * @param string $pattern The regular expression to match. * @param int $mode [optional] Operation mode, see RegexIterator::setMode() for a list of modes. * @param int $flags [optional] Special flags, see RegexIterator::setFlags() for a list of available flags. - * @param int $preg_flags [optional] The regular expression flags. These flags depend on the operation mode parameter - * @since 5.2 + * @param int $pregFlags [optional] The regular expression flags. These flags depend on the operation mode parameter */ - public function __construct(RecursiveIterator $iterator, $regex, $mode = self::MATCH, $flags = 0, $preg_flags = 0) { } + public function __construct( + RecursiveIterator $iterator, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::MATCH, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags = 0 + ) {} /** * Returns whether an iterator can be obtained for the current entry. * @link https://php.net/manual/en/recursiveregexiterator.haschildren.php * @return bool true if an iterator can be obtained for the current entry, otherwise returns false. - * @since 5.2 */ - public function hasChildren() { } + #[TentativeType] + public function hasChildren(): bool {} /** * Returns an iterator for the current entry. * @link https://php.net/manual/en/recursiveregexiterator.getchildren.php * @return RecursiveRegexIterator An iterator for the current entry, if it can be iterated over by the inner iterator. - * @since 5.2 */ - public function getChildren() { } + #[TentativeType] + public function getChildren(): RecursiveRegexIterator {} } /** * Allows iterating over a RecursiveIterator to generate an ASCII graphic tree. * @link https://php.net/manual/en/class.recursivetreeiterator.php */ -class RecursiveTreeIterator extends RecursiveIteratorIterator { - - const BYPASS_CURRENT = 4; - const BYPASS_KEY = 8; - - const PREFIX_LEFT = 0; - const PREFIX_MID_HAS_NEXT = 1; - const PREFIX_MID_LAST = 2; - const PREFIX_END_HAS_NEXT = 3; - const PREFIX_END_LAST = 4; - const PREFIX_RIGHT = 5; - +class RecursiveTreeIterator extends RecursiveIteratorIterator +{ + public const BYPASS_CURRENT = 4; + public const BYPASS_KEY = 8; + public const PREFIX_LEFT = 0; + public const PREFIX_MID_HAS_NEXT = 1; + public const PREFIX_MID_LAST = 2; + public const PREFIX_END_HAS_NEXT = 3; + public const PREFIX_END_LAST = 4; + public const PREFIX_RIGHT = 5; /** * Construct a RecursiveTreeIterator * @link https://php.net/manual/en/recursivetreeiterator.construct.php * @param RecursiveIterator|IteratorAggregate $iterator * @param int $flags [optional] Flags to control the behavior of the RecursiveTreeIterator object. - * @param int $caching_it_flags [optional] Flags to affect the behavior of the {@see RecursiveCachingIterator} used internally. + * @param int $cachingIteratorFlags [optional] Flags to affect the behavior of the {@see RecursiveCachingIterator} used internally. * @param int $mode [optional] Flags to affect the behavior of the {@see RecursiveIteratorIterator} used internally. - * @since 5.3 */ - public function __construct($iterator, $flags = self::BYPASS_KEY, $caching_it_flags = CachingIterator::CATCH_GET_CHILD, - $mode = self::SELF_FIRST) { } + public function __construct( + $iterator, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::BYPASS_KEY, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::SELF_FIRST + ) {} /** * Rewind iterator * @link https://php.net/manual/en/recursivetreeiterator.rewind.php * @return void - * @since 5.3 */ - public function rewind() { } + public function rewind(): void {} /** * Check validity * @link https://php.net/manual/en/recursivetreeiterator.valid.php * @return bool true if the current position is valid, otherwise false - * @since 5.3 */ - public function valid() { } + public function valid(): bool {} /** * Get the key of the current element * @link https://php.net/manual/en/recursivetreeiterator.key.php * @return string the current key prefixed and postfixed. - * @since 5.3 */ - public function key() { } + #[TentativeType] + public function key(): mixed {} /** * Get current element * @link https://php.net/manual/en/recursivetreeiterator.current.php * @return string the current element prefixed and postfixed. - * @since 5.3 */ - public function current() { } + #[TentativeType] + public function current(): mixed {} /** * Move to next element * @link https://php.net/manual/en/recursivetreeiterator.next.php * @return void - * @since 5.3 */ - public function next() { } + public function next(): void {} /** * Begin iteration * @link https://php.net/manual/en/recursivetreeiterator.beginiteration.php * @return RecursiveIterator A RecursiveIterator. - * @since 5.3 */ - public function beginIteration() { } + public function beginIteration() {} /** * End iteration * @link https://php.net/manual/en/recursivetreeiterator.enditeration.php * @return void - * @since 5.3 */ - public function endIteration() { } + public function endIteration() {} /** * Has children * @link https://php.net/manual/en/recursivetreeiterator.callhaschildren.php * @return bool true if there are children, otherwise false - * @since 5.3 */ - public function callHasChildren() { } + public function callHasChildren() {} /** * Get children * @link https://php.net/manual/en/recursivetreeiterator.callgetchildren.php * @return RecursiveIterator A RecursiveIterator. - * @since 5.3 */ - public function callGetChildren() { } + public function callGetChildren() {} /** * Begin children * @link https://php.net/manual/en/recursivetreeiterator.beginchildren.php * @return void - * @since 5.3 */ - public function beginChildren() { } + public function beginChildren() {} /** * End children * @link https://php.net/manual/en/recursivetreeiterator.endchildren.php * @return void - * @since 5.3 */ - public function endChildren() { } + public function endChildren() {} /** * Next element * @link https://php.net/manual/en/recursivetreeiterator.nextelement.php * @return void - * @since 5.3 */ - public function nextElement() { } + public function nextElement() {} /** * Get the prefix * @link https://php.net/manual/en/recursivetreeiterator.getprefix.php * @return string the string to place in front of current element - * @since 5.3 */ - public function getPrefix() { } + #[TentativeType] + public function getPrefix(): string {} /** * @param string $postfix */ - public function setPostfix($postfix) {} + #[TentativeType] + public function setPostfix(#[PhpStormStubsElementAvailable(from: '7.3')] string $postfix): void {} /** * Set a part of the prefix @@ -1515,137 +1498,149 @@ public function setPostfix($postfix) {} * The value to assign to the part of the prefix specified in part. * * @return void - * @since 5.3 */ - public function setPrefixPart($part, $value) { } + #[TentativeType] + public function setPrefixPart( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $part, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value + ): void {} /** * Get current entry * @link https://php.net/manual/en/recursivetreeiterator.getentry.php * @return string the part of the tree built for the current element. - * @since 5.3 */ - public function getEntry() { } + #[TentativeType] + public function getEntry(): string {} /** * Get the postfix * @link https://php.net/manual/en/recursivetreeiterator.getpostfix.php * @return string to place after the current element. - * @since 5.3 */ - public function getPostfix() { } + #[TentativeType] + public function getPostfix(): string {} } /** * This class allows objects to work as arrays. * @link https://php.net/manual/en/class.arrayobject.php + * @template TKey + * @template TValue + * @template-implements IteratorAggregate+ * @param TKey $key
* The index being checked. *
* @return bool true if the requested index exists, otherwise false - * @since 5.0 */ - public function offsetExists($index) { } + #[TentativeType] + public function offsetExists(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): bool {} /** * Returns the value at the specified index * @link https://php.net/manual/en/arrayobject.offsetget.php - * @param mixed $index+ * @param TKey $key
* The index with the value. *
- * @return mixed The value at the specified index or false. - * @since 5.0 + * @return mixed|false The value at the specified index or false. */ - public function offsetGet($index) { } + #[TentativeType] + public function offsetGet(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): mixed {} /** * Sets the value at the specified index to newval * @link https://php.net/manual/en/arrayobject.offsetset.php - * @param mixed $index+ * @param TKey $key
* The index being set. *
- * @param mixed $newval+ * @param TValue $value
* The new value for the index. *
* @return void - * @since 5.0 */ - public function offsetSet($index, $newval) { } + #[TentativeType] + public function offsetSet( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value + ): void {} /** * Unsets the value at the specified index * @link https://php.net/manual/en/arrayobject.offsetunset.php - * @param mixed $index+ * @param TKey $key
* The index being unset. *
* @return void - * @since 5.0 */ - public function offsetUnset($index) { } + #[TentativeType] + public function offsetUnset(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $key): void {} /** * Appends the value * @link https://php.net/manual/en/arrayobject.append.php - * @param mixed $value+ * @param TValue $value
* The value being appended. *
* @return void - * @since 5.0 */ - public function append($value) { } + #[TentativeType] + public function append(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} /** * Creates a copy of the ArrayObject. * @link https://php.net/manual/en/arrayobject.getarraycopy.php - * @return array a copy of the array. When the ArrayObject refers to an object + * @return array+ * @param callable(TValue, TValue):int $callback
* Function cmp_function should accept two * parameters which will be filled by pairs of entries. * The comparison function must return an integer less than, equal @@ -1712,15 +1709,15 @@ public function ksort() { } * be respectively less than, equal to, or greater than the * second. *
- * @return void - * @since 5.2 + * @return bool */ - public function uasort($cmp_function) { } + #[TentativeType] + public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} /** * Sort the entries by keys using a user-defined comparison function * @link https://php.net/manual/en/arrayobject.uksort.php - * @param callback $cmp_function+ * @param callable(TValue, TValue):int $callback
* The callback comparison function. *
*@@ -1731,95 +1728,104 @@ public function uasort($cmp_function) { } * be respectively less than, equal to, or greater than the * second. *
- * @return void - * @since 5.2 + * @return bool */ - public function uksort($cmp_function) { } + #[TentativeType] + public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} /** * Sort entries using a "natural order" algorithm * @link https://php.net/manual/en/arrayobject.natsort.php - * @return void - * @since 5.2 + * @return bool */ - public function natsort() { } + #[TentativeType] + public function natsort(): bool {} /** * Sort an array using a case insensitive "natural order" algorithm * @link https://php.net/manual/en/arrayobject.natcasesort.php - * @return void - * @since 5.2 + * @return bool */ - public function natcasesort() { } + #[TentativeType] + public function natcasesort(): bool {} /** * Unserialize an ArrayObject * @link https://php.net/manual/en/arrayobject.unserialize.php - * @param string $serialized+ * @param string $data
* The serialized ArrayObject. *
- * @return void The unserialized ArrayObject. - * @since 5.3 + * @return void */ - public function unserialize($serialized) { } + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} /** * Serialize an ArrayObject * @link https://php.net/manual/en/arrayobject.serialize.php * @return string The serialized representation of the ArrayObject. - * @since 5.3 */ - public function serialize() { } + #[TentativeType] + public function serialize(): string {} /** * @return array * @since 7.4 */ + #[TentativeType] + public function __debugInfo(): array {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] public function __serialize(): array {} /** * @param array $data * @since 7.4 */ + #[TentativeType] public function __unserialize(array $data): void {} /** * Create a new iterator from an ArrayObject instance * @link https://php.net/manual/en/arrayobject.getiterator.php - * @return ArrayIterator An iterator from an ArrayObject. - * @since 5.0 + * @return ArrayIterator+ * @param mixed $array
* The new array or object to exchange with the current array. *
* @return array the old array. - * @since 5.1 */ - public function exchangeArray($input) { } + #[TentativeType] + public function exchangeArray(#[LanguageLevelTypeAware(['8.0' => 'object|array'], default: '')] $array): array {} /** * Sets the iterator classname for the ArrayObject. * @link https://php.net/manual/en/arrayobject.setiteratorclass.php - * @param string $iterator_class
+ * @param class-string
* The classname of the array iterator to use when iterating over this object.
*
+ * @param string $key
* The offset being checked.
*
+ * @param string $key
* The offset to get the value from.
*
+ * @param string $key
* The index to set for.
*
+ * @param string $value
* The new value to store at the index.
*
+ * @param string $key
* The offset to unset.
*
+ * @param callable $callback
* The compare function used for the sort. *
* @return void - * @since 5.2 */ - public function uasort($cmp_function) { } + #[TentativeType] + public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} /** * User defined sort * @link https://php.net/manual/en/arrayiterator.uksort.php - * @param string $cmp_function+ * @param callable $callback
* The compare function used for the sort. *
* @return void - * @since 5.2 */ - public function uksort($cmp_function) { } + #[TentativeType] + public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} /** * Sort an array naturally * @link https://php.net/manual/en/arrayiterator.natsort.php - * @return void - * @since 5.2 + * @return bool */ - public function natsort() { } + #[TentativeType] + public function natsort(): bool {} /** * Sort an array naturally, case insensitive * @link https://php.net/manual/en/arrayiterator.natcasesort.php - * @return void - * @since 5.2 + * @return bool */ - public function natcasesort() { } + #[TentativeType] + public function natcasesort(): bool {} /** * Unserialize * @link https://php.net/manual/en/arrayiterator.unserialize.php - * @param string $serialized+ * @param string $data
* The serialized ArrayIterator object to be unserialized. *
- * @return string The ArrayIterator. - * @since 5.3 + * @return void */ - public function unserialize($serialized) { } + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} /** * Serialize * @link https://php.net/manual/en/arrayiterator.serialize.php * @return string The serialized ArrayIterator. - * @since 5.3 */ - public function serialize() { } + #[TentativeType] + public function serialize(): string {} /** * Rewind array back to the start * @link https://php.net/manual/en/arrayiterator.rewind.php * @return void - * @since 5.0 */ - public function rewind() { } + #[TentativeType] + public function rewind(): void {} /** * Return current array entry * @link https://php.net/manual/en/arrayiterator.current.php * @return mixed The current array entry. - * @since 5.0 */ - public function current() { } + #[TentativeType] + public function current(): mixed {} /** * Return current array key * @link https://php.net/manual/en/arrayiterator.key.php - * @return string|float|int|bool|null The current array key. - * @since 5.0 + * @return string|int|null The key of the current element. */ - public function key() { } + #[TentativeType] + public function key(): string|int|null {} /** * Move to next entry * @link https://php.net/manual/en/arrayiterator.next.php * @return void - * @since 5.0 */ - public function next() { } + #[TentativeType] + public function next(): void {} /** * Check whether array contains more entries * @link https://php.net/manual/en/arrayiterator.valid.php * @return bool - * @since 5.0 */ - public function valid() { } + #[TentativeType] + public function valid(): bool {} /** * Seek to position * @link https://php.net/manual/en/arrayiterator.seek.php - * @param int $position+ * @param int $offset
* The position to seek to. *
* @return void - * @since 5.0 */ - public function seek($position) { } + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} /** * @return array * @since 7.4 */ + #[TentativeType] public function __serialize(): array {} /** * @param array $data * @since 7.4 */ + #[TentativeType] public function __unserialize(array $data): void {} - } /** @@ -2084,36 +2106,24 @@ public function __unserialize(array $data): void {} * over the current iterator entry. * @link https://php.net/manual/en/class.recursivearrayiterator.php */ -class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { - const CHILD_ARRAYS_ONLY = 4; - +class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator +{ + public const CHILD_ARRAYS_ONLY = 4; /** * Returns whether current entry is an array or an object. * @link https://php.net/manual/en/recursivearrayiterator.haschildren.php * @return bool true if the current entry is an array or an object, * otherwise false is returned. - * @since 5.1 */ - public function hasChildren() { } + #[TentativeType] + public function hasChildren(): bool {} /** * Returns an iterator for the current entry if it is an array or an object. * @link https://php.net/manual/en/recursivearrayiterator.getchildren.php - * @return RecursiveArrayIterator An iterator for the current entry, if it is an array or object. - * @since 5.1 + * @return RecursiveArrayIterator|null An iterator for the current entry, if it is an array or object. */ - public function getChildren() { } + #[TentativeType] + public function getChildren(): ?RecursiveArrayIterator {} } - -/** - * @since 7.1 - */ -define ("MT_RAND_MT19937", 0); - -/** - * @since 7.1 - */ -define ("MT_RAND_PHP", 1); -// End of SPL v.0.2 -?> diff --git a/SPL/SPL_c1.php b/SPL/SPL_c1.php index 61447ac31..010b8dcda 100644 --- a/SPL/SPL_c1.php +++ b/SPL/SPL_c1.php @@ -1,2265 +1,2423 @@ - * Optional suffix to omit from the base name returned. - * - * @return string the base name without path information. - * @since 5.2.2 - */ - public function getBasename ($suffix = null) {} - - /** - * Gets the path to the file - * @link https://php.net/manual/en/splfileinfo.getpathname.php - * @return string The path to the file. - * @since 5.1.2 - */ - public function getPathname () {} - - /** - * Gets file permissions - * @link https://php.net/manual/en/splfileinfo.getperms.php - * @return int the file permissions. - * @since 5.1.2 - */ - public function getPerms () {} - - /** - * Gets the inode for the file - * @link https://php.net/manual/en/splfileinfo.getinode.php - * @return int the inode number for the filesystem object. - * @since 5.1.2 - */ - public function getInode () {} - - /** - * Gets file size - * @link https://php.net/manual/en/splfileinfo.getsize.php - * @return int The filesize in bytes. - * @since 5.1.2 - */ - public function getSize () {} - - /** - * Gets the owner of the file - * @link https://php.net/manual/en/splfileinfo.getowner.php - * @return int The owner id in numerical format. - * @since 5.1.2 - */ - public function getOwner () {} - - /** - * Gets the file group - * @link https://php.net/manual/en/splfileinfo.getgroup.php - * @return int The group id in numerical format. - * @since 5.1.2 - */ - public function getGroup () {} - - /** - * Gets last access time of the file - * @link https://php.net/manual/en/splfileinfo.getatime.php - * @return int the time the file was last accessed. - * @since 5.1.2 - */ - public function getATime () {} - - /** - * Gets the last modified time - * @link https://php.net/manual/en/splfileinfo.getmtime.php - * @return int the last modified time for the file, in a Unix timestamp. - * @since 5.1.2 - */ - public function getMTime () {} - - /** - * Gets the inode change time - * @link https://php.net/manual/en/splfileinfo.getctime.php - * @return int The last change time, in a Unix timestamp. - * @since 5.1.2 - */ - public function getCTime () {} - - /** - * Gets file type - * @link https://php.net/manual/en/splfileinfo.gettype.php - * @return string A string representing the type of the entry. - * May be one of file, link, - * or dir - * @since 5.1.2 - */ - public function getType () {} - - /** - * Tells if the entry is writable - * @link https://php.net/manual/en/splfileinfo.iswritable.php - * @return bool true if writable, false otherwise; - * @since 5.1.2 - */ - public function isWritable () {} - - /** - * Tells if file is readable - * @link https://php.net/manual/en/splfileinfo.isreadable.php - * @return bool true if readable, false otherwise. - * @since 5.1.2 - */ - public function isReadable () {} - - /** - * Tells if the file is executable - * @link https://php.net/manual/en/splfileinfo.isexecutable.php - * @return bool true if executable, false otherwise. - * @since 5.1.2 - */ - public function isExecutable () {} - - /** - * Tells if the object references a regular file - * @link https://php.net/manual/en/splfileinfo.isfile.php - * @return bool true if the file exists and is a regular file (not a link), false otherwise. - * @since 5.1.2 - */ - public function isFile () {} - - /** - * Tells if the file is a directory - * @link https://php.net/manual/en/splfileinfo.isdir.php - * @return bool true if a directory, false otherwise. - * @since 5.1.2 - */ - public function isDir () {} - - /** - * Tells if the file is a link - * @link https://php.net/manual/en/splfileinfo.islink.php - * @return bool true if the file is a link, false otherwise. - * @since 5.1.2 - */ - public function isLink () {} - - /** - * Gets the target of a link - * @link https://php.net/manual/en/splfileinfo.getlinktarget.php - * @return string the target of the filesystem link. - * @since 5.2.2 - */ - public function getLinkTarget () {} - - /** - * Gets absolute path to file - * @link https://php.net/manual/en/splfileinfo.getrealpath.php - * @return string|false the path to the file, or FALSE if the file does not exist. - * @since 5.2.2 - */ - public function getRealPath () {} - - /** - * Gets an SplFileInfo object for the file - * @link https://php.net/manual/en/splfileinfo.getfileinfo.php - * @param string $class_name [optional]- * Name of an SplFileInfo derived class to use. - *
- * @return SplFileInfo An SplFileInfo object created for the file. - * @since 5.1.2 - */ - public function getFileInfo ($class_name = null) {} - - /** - * Gets an SplFileInfo object for the path - * @link https://php.net/manual/en/splfileinfo.getpathinfo.php - * @param string $class_name [optional]- * Name of an SplFileInfo derived class to use. - *
- * @return SplFileInfo an SplFileInfo object for the parent path of the file. - * @since 5.1.2 - */ - public function getPathInfo ($class_name = null) {} - - /** - * Gets an SplFileObject object for the file - * @link https://php.net/manual/en/splfileinfo.openfile.php - * @param string $open_mode [optional]- * The mode for opening the file. See the fopen - * documentation for descriptions of possible modes. The default - * is read only. - *
- * @param bool $use_include_path [optional]- * ¶meter.use_include_path; - *
- * @param resource $context [optional]- * ¶meter.context; - *
- * @return SplFileObject The opened file as an SplFileObject object. - * @since 5.1.2 - */ - public function openFile ($open_mode = 'r', $use_include_path = false, $context = null) {} - - /** - * Sets the class name used with SplFileInfo::openFile - * @link https://php.net/manual/en/splfileinfo.setfileclass.php - * @param string $class_name [optional]- * The class name to use when openFile() is called. - *
- * @return void - * @since 5.1.2 - */ - public function setFileClass ($class_name = null) {} - - /** - * Sets the class used with getFileInfo and getPathInfo - * @link https://php.net/manual/en/splfileinfo.setinfoclass.php - * @param string $class_name [optional]- * The class name to use. - *
- * @return void - * @since 5.1.2 - */ - public function setInfoClass ($class_name = null) {} - - /** - * Returns the path to the file as a string - * @link https://php.net/manual/en/splfileinfo.tostring.php - * @return string the path to the file. - * @since 5.1.2 - */ - public function __toString () {} - - public final function _bad_state_ex (){} - - public function __wakeup() {} +class SplFileInfo implements Stringable +{ + /** + * Construct a new SplFileInfo object + * @link https://php.net/manual/en/splfileinfo.construct.php + * @param string $filename + * @since 5.1.2 + */ + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename) {} + + /** + * Gets the path without filename + * @link https://php.net/manual/en/splfileinfo.getpath.php + * @return string the path to the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getPath(): string {} + + /** + * Gets the filename + * @link https://php.net/manual/en/splfileinfo.getfilename.php + * @return string The filename. + * @since 5.1.2 + */ + #[TentativeType] + public function getFilename(): string {} + + /** + * Gets the file extension + * @link https://php.net/manual/en/splfileinfo.getextension.php + * @return string a string containing the file extension, or an + * empty string if the file has no extension. + * @since 5.3.6 + */ + #[TentativeType] + public function getExtension(): string {} + + /** + * Gets the base name of the file + * @link https://php.net/manual/en/splfileinfo.getbasename.php + * @param string $suffix [optional]+ * Optional suffix to omit from the base name returned. + *
+ * @return string the base name without path information. + * @since 5.2.2 + */ + #[TentativeType] + public function getBasename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $suffix = null): string {} + + /** + * Gets the path to the file + * @link https://php.net/manual/en/splfileinfo.getpathname.php + * @return string The path to the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getPathname(): string {} + + /** + * Gets file permissions + * @link https://php.net/manual/en/splfileinfo.getperms.php + * @return int|false The file permissions on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getPerms(): int|false {} + + /** + * Gets the inode for the file + * @link https://php.net/manual/en/splfileinfo.getinode.php + * @return int|false The inode number for the filesystem object on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getInode(): int|false {} + + /** + * Gets file size + * @link https://php.net/manual/en/splfileinfo.getsize.php + * @return int|false The filesize in bytes on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getSize(): int|false {} + + /** + * Gets the owner of the file + * @link https://php.net/manual/en/splfileinfo.getowner.php + * @return int|false The owner id in numerical format on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getOwner(): int|false {} + + /** + * Gets the file group + * @link https://php.net/manual/en/splfileinfo.getgroup.php + * @return int|false The group id in numerical format on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getGroup(): int|false {} + + /** + * Gets last access time of the file + * @link https://php.net/manual/en/splfileinfo.getatime.php + * @return int|false The time the file was last accessed on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getATime(): int|false {} + + /** + * Gets the last modified time + * @link https://php.net/manual/en/splfileinfo.getmtime.php + * @return int|false The last modified time for the file, in a Unix timestamp on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getMTime(): int|false {} + + /** + * Gets the inode change time + * @link https://php.net/manual/en/splfileinfo.getctime.php + * @return int|false The last change time, in a Unix timestamp on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getCTime(): int|false {} + + /** + * Gets file type + * @link https://php.net/manual/en/splfileinfo.gettype.php + * @return string|false A string representing the type of the entry. May be one of file, link, dir, block, fifo, char, socket, or unknown, or FALSE on failure. + * May be one of file, link, + * or dir + * @since 5.1.2 + */ + #[TentativeType] + public function getType(): string|false {} + + /** + * Tells if the entry is writable + * @link https://php.net/manual/en/splfileinfo.iswritable.php + * @return bool true if writable, false otherwise; + * @since 5.1.2 + */ + #[TentativeType] + public function isWritable(): bool {} + + /** + * Tells if file is readable + * @link https://php.net/manual/en/splfileinfo.isreadable.php + * @return bool true if readable, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isReadable(): bool {} + + /** + * Tells if the file is executable + * @link https://php.net/manual/en/splfileinfo.isexecutable.php + * @return bool true if executable, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isExecutable(): bool {} + + /** + * Tells if the object references a regular file + * @link https://php.net/manual/en/splfileinfo.isfile.php + * @return bool true if the file exists and is a regular file (not a link), false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isFile(): bool {} + + /** + * Tells if the file is a directory + * @link https://php.net/manual/en/splfileinfo.isdir.php + * @return bool true if a directory, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isDir(): bool {} + + /** + * Tells if the file is a link + * @link https://php.net/manual/en/splfileinfo.islink.php + * @return bool true if the file is a link, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isLink(): bool {} + + /** + * Gets the target of a link + * @link https://php.net/manual/en/splfileinfo.getlinktarget.php + * @return string|false The target of the filesystem link on success, or FALSE on failure. + * @since 5.2.2 + */ + #[TentativeType] + public function getLinkTarget(): string|false {} + + /** + * Gets absolute path to file + * @link https://php.net/manual/en/splfileinfo.getrealpath.php + * @return string|false the path to the file, or FALSE if the file does not exist. + * @since 5.2.2 + */ + #[TentativeType] + public function getRealPath(): string|false {} + + /** + * Gets an SplFileInfo object for the file + * @link https://php.net/manual/en/splfileinfo.getfileinfo.php + * @param string $class [optional]+ * Name of an SplFileInfo derived class to use. + *
+ * @return SplFileInfo An SplFileInfo object created for the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getFileInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = null): SplFileInfo {} + + /** + * Gets an SplFileInfo object for the path + * @link https://php.net/manual/en/splfileinfo.getpathinfo.php + * @param string $class [optional]+ * Name of an SplFileInfo derived class to use. + *
+ * @return SplFileInfo|null A SplFileInfo object for the parent path of the file on success, or NULL on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getPathInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = null): ?SplFileInfo {} + + /** + * Gets an SplFileObject object for the file + * @link https://php.net/manual/en/splfileinfo.openfile.php + * @param string $mode [optional]+ * The mode for opening the file. See the fopen + * documentation for descriptions of possible modes. The default + * is read only. + *
+ * @param bool $useIncludePath [optional]+ *
+ * @param resource $context [optional]+ *
+ * @return SplFileObject The opened file as an SplFileObject object. + * @since 5.1.2 + */ + #[TentativeType] + public function openFile( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r', + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, + $context = null + ): SplFileObject {} + + /** + * Sets the class name used with SplFileInfo::openFile + * @link https://php.net/manual/en/splfileinfo.setfileclass.php + * @param string $class [optional]+ * The class name to use when openFile() is called. + *
+ * @return void + * @since 5.1.2 + */ + #[TentativeType] + public function setFileClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class = SplFileObject::class): void {} + + /** + * Sets the class used with getFileInfo and getPathInfo + * @link https://php.net/manual/en/splfileinfo.setinfoclass.php + * @param string $class [optional]+ * The class name to use. + *
+ * @return void + * @since 5.1.2 + */ + #[TentativeType] + public function setInfoClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class = SplFileInfo::class): void {} + + /** + * Returns the path to the file as a string + * @link https://php.net/manual/en/splfileinfo.tostring.php + * @return string the path to the file. + * @since 5.1.2 + */ + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] + public function __toString() {} + + #[TentativeType] + final public function _bad_state_ex(): void {} + + public function __wakeup() {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} +} + +/** + * The DirectoryIterator class provides a simple interface for viewing + * the contents of filesystem directories. + * @link https://php.net/manual/en/class.directoryiterator.php + */ +class DirectoryIterator extends SplFileInfo implements SeekableIterator +{ + /** + * Constructs a new directory iterator from a path + * @link https://php.net/manual/en/directoryiterator.construct.php + * @param string $directory + * @throws UnexpectedValueException if the path cannot be opened. + * @throws RuntimeException if the path is an empty string. + */ + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory) {} + + /** + * Determine if current DirectoryIterator item is '.' or '..' + * @link https://php.net/manual/en/directoryiterator.isdot.php + * @return bool true if the entry is . or .., + * otherwise false + */ + #[TentativeType] + public function isDot(): bool {} + + /** + * Rewind the DirectoryIterator back to the start + * @link https://php.net/manual/en/directoryiterator.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Check whether current DirectoryIterator position is a valid file + * @link https://php.net/manual/en/directoryiterator.valid.php + * @return bool true if the position is valid, otherwise false + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Return the key for the current DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.key.php + * @return string The key for the current DirectoryIterator item. + */ + #[TentativeType] + public function key(): mixed {} + + /** + * Return the current DirectoryIterator item. + * @link https://php.net/manual/en/directoryiterator.current.php + * @return DirectoryIterator The current DirectoryIterator item. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Move forward to next DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Seek to a DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.seek.php + * @param int $offset+ * The zero-based numeric position to seek to. + *
+ * @return void + */ + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void {} +} + +/** + * The Filesystem iterator + * @link https://php.net/manual/en/class.filesystemiterator.php + */ +class FilesystemIterator extends DirectoryIterator +{ + public const CURRENT_MODE_MASK = 240; + public const CURRENT_AS_PATHNAME = 32; + public const CURRENT_AS_FILEINFO = 0; + public const CURRENT_AS_SELF = 16; + public const KEY_MODE_MASK = 3840; + public const KEY_AS_PATHNAME = 0; + public const FOLLOW_SYMLINKS = 16384; + public const KEY_AS_FILENAME = 256; + public const NEW_CURRENT_AND_KEY = 256; + public const SKIP_DOTS = 4096; + public const UNIX_PATHS = 8192; + public const OTHER_MODE_MASK = 28672; + + /** + * Constructs a new filesystem iterator + * @link https://php.net/manual/en/filesystemiterator.construct.php + * @param string $directory + * @param int $flags [optional] + * @throws UnexpectedValueException if the path cannot be found. + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO|FilesystemIterator::SKIP_DOTS + ) {} + + /** + * Rewinds back to the beginning + * @link https://php.net/manual/en/filesystemiterator.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Move to the next file + * @link https://php.net/manual/en/filesystemiterator.next.php + * @return void + */ + public function next() {} + + /** + * Retrieve the key for the current file + * @link https://php.net/manual/en/filesystemiterator.key.php + * @return string the pathname or filename depending on the set flags. + * See the FilesystemIterator constants. + */ + #[TentativeType] + public function key(): string {} + + /** + * The current file + * @link https://php.net/manual/en/filesystemiterator.current.php + * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator constants. + */ + #[TentativeType] + public function current(): SplFileInfo|FilesystemIterator|string {} + + /** + * Get the handling flags + * @link https://php.net/manual/en/filesystemiterator.getflags.php + * @return int The integer value of the set flags. + */ + #[TentativeType] + public function getFlags(): int {} + + /** + * Sets handling flags + * @link https://php.net/manual/en/filesystemiterator.setflags.php + * @param int $flags+ * The handling flags to set. + * See the FilesystemIterator constants. + *
+ * @return void + */ + #[TentativeType] + public function setFlags( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags = null, + #[PhpStormStubsElementAvailable(from: '8.0')] int $flags + ): void {} +} + +/** + * The RecursiveDirectoryIterator provides + * an interface for iterating recursively over filesystem directories. + * @link https://php.net/manual/en/class.recursivedirectoryiterator.php + */ +class RecursiveDirectoryIterator extends FilesystemIterator implements RecursiveIterator +{ + /** + * Constructs a RecursiveDirectoryIterator + * @link https://php.net/manual/en/recursivedirectoryiterator.construct.php + * @param string $directory + * @param int $flags [optional] + * @throws UnexpectedValueException if the path cannot be found or is not a directory. + * @since 5.1.2 + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO + ) {} + + /** + * Returns whether current entry is a directory and not '.' or '..' + * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php + * @param bool $allowLinks [optional]+ *
+ * @return bool whether the current entry is a directory, but not '.' or '..' + */ + #[TentativeType] + public function hasChildren(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $allowLinks = false): bool {} + + /** + * Returns an iterator for the current entry if it is a directory + * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php + * @return RecursiveDirectoryIterator An iterator for the current entry, if it is a directory. + */ + #[TentativeType] + public function getChildren(): RecursiveDirectoryIterator {} + + /** + * Get sub path + * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpath.php + * @return string The sub path (sub directory). + */ + #[TentativeType] + public function getSubPath(): string {} + + /** + * Get sub path and name + * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpathname.php + * @return string The sub path (sub directory) and filename. + */ + #[TentativeType] + public function getSubPathname(): string {} + + /** + * Rewinds back to the beginning + * @link https://php.net/manual/en/filesystemiterator.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Move to the next file + * @link https://php.net/manual/en/filesystemiterator.next.php + * @return void + */ + public function next() {} + + /** + * Retrieve the key for the current file + * @link https://php.net/manual/en/filesystemiterator.key.php + * @return string the pathname or filename depending on the set flags. + * See the FilesystemIterator constants. + */ + public function key() {} + + /** + * The current file + * @link https://php.net/manual/en/filesystemiterator.current.php + * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator constants. + */ + public function current() {} +} + +/** + * Iterates through a file system in a similar fashion to + * glob. + * @link https://php.net/manual/en/class.globiterator.php + */ +class GlobIterator extends FilesystemIterator implements Countable +{ + /** + * Construct a directory using glob + * @link https://php.net/manual/en/globiterator.construct.php + * @param $pattern + * @param int $flags [optional] + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO + ) {} + + /** + * Get the number of directories and files + * @link https://php.net/manual/en/globiterator.count.php + * @return int<0,max> The number of returned directories and files, as an + * integer. + */ + #[TentativeType] + public function count(): int {} +} + +/** + * The SplFileObject class offers an object oriented interface for a file. + * @link https://php.net/manual/en/class.splfileobject.php + */ +class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator +{ + /** + * Drop newlines at the end of a line. + */ + public const DROP_NEW_LINE = 1; + + /** + * Read on rewind/next. + */ + public const READ_AHEAD = 2; + + /** + * Skip empty lines in the file. This requires the {@see READ_AHEAD} flag to work as expected. + */ + public const SKIP_EMPTY = 4; + + /** + * Read lines as CSV rows. + */ + public const READ_CSV = 8; + + /** + * Construct a new file object. + * + * @link https://php.net/manual/en/splfileobject.construct.php + * + * @param string $filename The file to open + * @param string $mode [optional] The mode in which to open the file. See {@see fopen} for a list of allowed modes. + * @param bool $useIncludePath [optional] Whether to search in the include_path for filename + * @param resource $context [optional] A valid context resource created with {@see stream_context_create} + * + * @throws RuntimeException When the filename cannot be opened + * @throws LogicException When the filename is a directory + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r', + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, + $context = null + ) {} + + /** + * Rewind the file to the first line + * @link https://php.net/manual/en/splfileobject.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Reached end of file + * @link https://php.net/manual/en/splfileobject.eof.php + * @return bool true if file is at EOF, false otherwise. + */ + #[TentativeType] + public function eof(): bool {} + + /** + * Not at EOF + * @link https://php.net/manual/en/splfileobject.valid.php + * @return bool true if not reached EOF, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Gets line from file + * @link https://php.net/manual/en/splfileobject.fgets.php + * @return string a string containing the next line from the file. + */ + #[TentativeType] + public function fgets(): string {} + + /** + * Read from file + * @link https://php.net/manual/en/splfileobject.fread.php + * @param int $length+ * The number of bytes to read. + *
+ * @return string|false returns the string read from the file or FALSE on failure. + * @since 5.5.11 + */ + #[TentativeType] + public function fread(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length): string|false {} + + /** + * Gets line from file and parse as CSV fields + * @link https://php.net/manual/en/splfileobject.fgetcsv.php + * @param string $separator [optional]+ * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. + *
+ * @param string $escape [optional]+ * The escape character (one character only). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. + *
+ * @return array|false|null an indexed array containing the fields read, or false on error. + * + *+ * A blank line in a CSV file will be returned as an array + * comprising a single null field unless using SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE, + * in which case empty lines are skipped. + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.1' => 'array|false'], default: 'array|false|null')] + public function fgetcsv( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" + ) {} + + /** + * Write a field array as a CSV line + * @link https://php.net/manual/en/splfileobject.fputcsv.php + * @param array $fields An array of values + * @param string $separator [optional]
+ * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. + *
+ * @param string $escape The optional escape parameter sets the escape character (one character only). + * @return int|false Returns the length of the written string or FALSE on failure. + * @since 5.4 + */ + #[TentativeType] + public function fputcsv( + array $fields, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ',', + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = '"', + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\", + #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL + ): int|false {} + + /** + * Set the delimiter and enclosure character for CSV + * @link https://php.net/manual/en/splfileobject.setcsvcontrol.php + * @param string $separator [optional]+ * The field delimiter (one character only). + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). + *
+ * @param string $escape [optional]+ * The field escape character (one character only). + *
+ * @return void + */ + #[TentativeType] + public function setCsvControl( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" + ): void {} + + /** + * Get the delimiter and enclosure character for CSV + * @link https://php.net/manual/en/splfileobject.getcsvcontrol.php + * @return array an indexed array containing the delimiter and enclosure character. + */ + #[TentativeType] + public function getCsvControl(): array {} + + /** + * Portable file locking + * @link https://php.net/manual/en/splfileobject.flock.php + * @param int $operation+ * operation is one of the following: + * LOCK_SH to acquire a shared lock (reader). + *
+ * @param int &$wouldBlock [optional]+ * Set to 1 if the lock would block (EWOULDBLOCK errno condition). + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function flock(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $operation, &$wouldBlock = null): bool {} + + /** + * Flushes the output to the file + * @link https://php.net/manual/en/splfileobject.fflush.php + * @return bool true on success or false on failure. + */ + #[TentativeType] + public function fflush(): bool {} + + /** + * Return current file position + * @link https://php.net/manual/en/splfileobject.ftell.php + * @return int|false the position of the file pointer as an integer, or false on error. + */ + #[TentativeType] + public function ftell(): int|false {} + + /** + * Seek to a position + * @link https://php.net/manual/en/splfileobject.fseek.php + * @param int $offset+ * The offset. A negative value can be used to move backwards through the file which + * is useful when SEEK_END is used as the whence value. + *
+ * @param int $whence [optional]+ * whence values are: + * SEEK_SET - Set position equal to offset bytes. + * SEEK_CUR - Set position to current location plus offset. + * SEEK_END - Set position to end-of-file plus offset. + *
+ *+ * If whence is not specified, it is assumed to be SEEK_SET. + *
+ * @return int 0 if the seek was successful, -1 otherwise. Note that seeking + * past EOF is not considered an error. + */ + #[TentativeType] + public function fseek( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $whence = SEEK_SET + ): int {} + + /** + * Gets character from file + * @link https://php.net/manual/en/splfileobject.fgetc.php + * @return string|false a string containing a single character read from the file or false on EOF. + */ + #[TentativeType] + public function fgetc(): string|false {} + + /** + * Output all remaining data on a file pointer + * @link https://php.net/manual/en/splfileobject.fpassthru.php + * @return int the number of characters read from handle + * and passed through to the output. + */ + #[TentativeType] + public function fpassthru(): int {} + + /** + * Gets line from file and strip HTML tags + * @link https://php.net/manual/en/splfileobject.fgetss.php + * @param string $allowable_tags [optional]+ * You can use the optional third parameter to specify tags which should + * not be stripped. + *
+ * @return string|false a string containing the next line of the file with HTML and PHP + * code stripped, or false on error. + * @removed 8.0 + */ + #[Deprecated(since: '7.3')] + public function fgetss($allowable_tags = null) {} + + /** + * Parses input from file according to a format + * @link https://php.net/manual/en/splfileobject.fscanf.php + * @param string $format+ * The specified format as described in the sprintf documentation. + *
+ * @param mixed &...$vars [optional]+ * The optional assigned values. + *
+ * @return array|int|null If only one parameter is passed to this method, the values parsed will be + * returned as an array. Otherwise, if optional parameters are passed, the + * function will return the number of assigned values. The optional + * parameters must be passed by reference. + */ + #[TentativeType] + public function fscanf( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &...$vars + ): array|int|null {} + + /** + * Write to file + * @link https://php.net/manual/en/splfileobject.fwrite.php + * @param string $data+ * The string to be written to the file. + *
+ * @param int $length [optional]+ * If the length argument is given, writing will + * stop after length bytes have been written or + * the end of string is reached, whichever comes + * first. + *
+ * @return int|false the number of bytes written, or 0 (false since 7.4) on error. + */ + #[LanguageLevelTypeAware(['7.4' => 'int|false'], default: 'int')] + #[TentativeType] + public function fwrite( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = null + ): int|false {} + + /** + * Gets information about the file + * @link https://php.net/manual/en/splfileobject.fstat.php + * @return array an array with the statistics of the file; the format of the array + * is described in detail on the stat manual page. + */ + #[TentativeType] + public function fstat(): array {} + + /** + * Truncates the file to a given length + * @link https://php.net/manual/en/splfileobject.ftruncate.php + * @param int $size+ * The size to truncate to. + *
+ *+ * If size is larger than the file it is extended with null bytes. + *
+ *+ * If size is smaller than the file, the extra data will be lost. + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function ftruncate(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size): bool {} + + /** + * Retrieve current line of file + * @link https://php.net/manual/en/splfileobject.current.php + * @return string|array|false Retrieves the current line of the file. If the SplFileObject::READ_CSV flag is set, this method returns an array containing the current line parsed as CSV data. + */ + #[TentativeType] + public function current(): string|array|false {} + + /** + * Get line number + * @link https://php.net/manual/en/splfileobject.key.php + * @return int the current line number. + */ + #[TentativeType] + public function key(): int {} + + /** + * Read next line + * @link https://php.net/manual/en/splfileobject.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Sets flags for the SplFileObject + * @link https://php.net/manual/en/splfileobject.setflags.php + * @param int $flags+ * Bit mask of the flags to set. See + * SplFileObject constants + * for the available flags. + *
+ * @return void + */ + #[TentativeType] + public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} + + /** + * Gets flags for the SplFileObject + * @link https://php.net/manual/en/splfileobject.getflags.php + * @return int an integer representing the flags. + */ + #[TentativeType] + public function getFlags(): int {} + + /** + * Set maximum line length + * @link https://php.net/manual/en/splfileobject.setmaxlinelen.php + * @param int $maxLength+ * The maximum length of a line. + *
+ * @return void + */ + #[TentativeType] + public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength): void {} + + /** + * Get maximum line length + * @link https://php.net/manual/en/splfileobject.getmaxlinelen.php + * @return int<0, max> the maximum line length if one has been set with + * SplFileObject::setMaxLineLen, default is 0. + */ + #[TentativeType] + public function getMaxLineLen(): int {} + + /** + * SplFileObject does not have children + * @link https://php.net/manual/en/splfileobject.haschildren.php + * @return bool false + * @since 5.1.2 + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.2' => 'false'], default: 'bool')] + public function hasChildren() {} + + /** + * No purpose + * @link https://php.net/manual/en/splfileobject.getchildren.php + * @return null|RecursiveIterator An SplFileObject does not have children so this method returns NULL. + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.2' => 'null'], default: 'null|RecursiveIterator')] + public function getChildren() {} + + /** + * Seek to specified line + * @link https://php.net/manual/en/splfileobject.seek.php + * @param int $line+ * The zero-based line number to seek to. + *
+ * @return void + */ + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $line): void {} + + /** + * Alias of SplFileObject::fgets + * @link https://php.net/manual/en/splfileobject.getcurrentline.php + * @return string Returns a string containing the next line from the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getCurrentLine(): string {} + + /** + * Alias of SplFileObject::current + * @link https://php.net/manual/en/splfileobject.tostring.php + */ + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] + public function __toString() {} +} + +/** + * The SplTempFileObject class offers an object oriented interface for a temporary file. + * @link https://php.net/manual/en/class.spltempfileobject.php + */ +class SplTempFileObject extends SplFileObject +{ + /** + * Construct a new temporary file object + * @link https://php.net/manual/en/spltempfileobject.construct.php + * @param int $maxMemory [optional] + * @throws RuntimeException if an error occurs. + * @since 5.1.2 + */ + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxMemory = 2097152) {} +} + +/** + * @template TValue + * The SplDoublyLinkedList class provides the main functionalities of a doubly linked list. + * @link https://php.net/manual/en/class.spldoublylinkedlist.php + * @template-implements Iterator+ * The value to push. + *
+ * @return void + */ + #[TentativeType] + public function push(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Prepends the doubly linked list with an element + * @link https://php.net/manual/en/spldoublylinkedlist.unshift.php + * @param mixed $value+ * The value to unshift. + *
+ * @return void + */ + #[TentativeType] + public function unshift(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Peeks at the node from the end of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.top.php + * @return mixed The value of the last node. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Peeks at the node from the beginning of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.bottom.php + * @return mixed The value of the first node. + */ + #[TentativeType] + public function bottom(): mixed {} + + /** + * Counts the number of elements in the doubly linked list. + * @link https://php.net/manual/en/spldoublylinkedlist.count.php + * @return int the number of elements in the doubly linked list. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the doubly linked list is empty. + * @link https://php.net/manual/en/spldoublylinkedlist.isempty.php + * @return bool whether the doubly linked list is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return int + */ + #[TentativeType] + public function setIteratorMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): int {} + + /** + * Returns the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.getiteratormode.php + * @return int the different modes and flags that affect the iteration. + */ + #[TentativeType] + public function getIteratorMode(): int {} + + /** + * Returns whether the requested $index exists + * @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php + * @param mixed $index+ * The index being checked. + *
+ * @return bool true if the requested index exists, otherwise false + */ + #[TentativeType] + public function offsetExists($index): bool {} + + /** + * Returns the value at the specified $index + * @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php + * @param mixed $index+ * The index with the value. + *
+ * @return mixed The value at the specified index. + */ + #[TentativeType] + public function offsetGet($index): mixed {} + + /** + * Sets the value at the specified $index to $newval + * @link https://php.net/manual/en/spldoublylinkedlist.offsetset.php + * @param mixed $index+ * The index being set. + *
+ * @param mixed $value+ * The new value for the index. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Unsets the value at the specified $index + * @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php + * @param mixed $index+ * The index being unset. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($index): void {} + + /** + * Rewind iterator back to the start + * @link https://php.net/manual/en/spldoublylinkedlist.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current array entry + * @link https://php.net/manual/en/spldoublylinkedlist.current.php + * @return mixed The current node value. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/spldoublylinkedlist.key.php + * @return string|float|int|bool|null The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to next entry + * @link https://php.net/manual/en/spldoublylinkedlist.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Move to previous entry + * @link https://php.net/manual/en/spldoublylinkedlist.prev.php + * @return void + */ + #[TentativeType] + public function prev(): void {} + + /** + * Check whether the doubly linked list contains more nodes + * @link https://php.net/manual/en/spldoublylinkedlist.valid.php + * @return bool true if the doubly linked list contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Unserializes the storage + * @link https://php.net/manual/en/spldoublylinkedlist.serialize.php + * @param string $data The serialized string. + * @return void + * @since 5.4 + */ + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} + + /** + * Serializes the storage + * @link https://php.net/manual/en/spldoublylinkedlist.unserialize.php + * @return string The serialized string. + * @since 5.4 + */ + #[TentativeType] + public function serialize(): string {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __serialize(): array {} + + /** + * @param array $data + * @since 7.4 + */ + #[TentativeType] + public function __unserialize(array $data): void {} +} + +/** + * @template TValue + * The SplQueue class provides the main functionalities of a queue implemented using a doubly linked list. + * @link https://php.net/manual/en/class.splqueue.php + */ +class SplQueue extends SplDoublyLinkedList +{ + /** + * Adds an element to the queue. + * @link https://php.net/manual/en/splqueue.enqueue.php + * @param TValue $value+ * The value to enqueue. + *
+ * @return void + */ + #[TentativeType] + public function enqueue(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Dequeues a node from the queue + * @link https://php.net/manual/en/splqueue.dequeue.php + * @return TValue The value of the dequeued node. + */ + #[TentativeType] + public function dequeue(): mixed {} + + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return void + */ + public function setIteratorMode($mode) {} +} + +/** + * @template TValue + * The SplStack class provides the main functionalities of a stack implemented using a doubly linked list. + * @link https://php.net/manual/en/class.splstack.php + * @template-extends SplDoublyLinkedList+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return void + */ + public function setIteratorMode($mode) {} +} + +/** + * @template TValue + * The SplHeap class provides the main functionalities of an Heap. + * @link https://php.net/manual/en/class.splheap.php + * @template-implements Iterator+ * The value to insert. + *
+ * @return bool + */ + #[TentativeType] + public function insert(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): bool {} + + /** + * Peeks at the node from the top of the heap + * @link https://php.net/manual/en/splheap.top.php + * @return TValue The value of the node on the top. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Counts the number of elements in the heap. + * @link https://php.net/manual/en/splheap.count.php + * @return int the number of elements in the heap. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the heap is empty. + * @link https://php.net/manual/en/splheap.isempty.php + * @return bool whether the heap is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splheap.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splheap.current.php + * @return TValue The current node value. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/splheap.key.php + * @return int The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splheap.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Check whether the heap contains more nodes + * @link https://php.net/manual/en/splheap.valid.php + * @return bool true if the heap contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Recover from the corrupted state and allow further actions on the heap. + * @link https://php.net/manual/en/splheap.recoverfromcorruption.php + * @return bool + */ + #[TentativeType] + public function recoverFromCorruption(): bool {} + + /** + * Compare elements in order to place them correctly in the heap while sifting up. + * @link https://php.net/manual/en/splheap.compare.php + * @param mixed $value1+ * The value of the first node being compared. + *
+ * @param mixed $value2+ * The value of the second node being compared. + *
+ * @return int Result of the comparison, positive integer if value1 is greater than value2, 0 if they are equal, negative integer otherwise. + * + *
+ * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position.
+ */
+ abstract protected function compare($value1, $value2);
+
+ /**
+ * @return bool
+ */
+ #[TentativeType]
+ public function isCorrupted(): bool {}
+
+ /**
+ * @return array
+ * @since 7.4
+ */
+ #[TentativeType]
+ public function __debugInfo(): array {}
+}
+
+/**
+ * @template TValue
+ * The SplMinHeap class provides the main functionalities of a heap, keeping the minimum on the top.
+ * @link https://php.net/manual/en/class.splminheap.php
+ * @template-extends SplHeap
+ * The value of the first node being compared.
+ *
+ * The value of the second node being compared.
+ *
+ * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position. + */ + #[TentativeType] + protected function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 + ): int {} + + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splheap.extract.php + * @return TValue The value of the extracted node. + */ + public function extract() {} + + /** + * Inserts an element in the heap by sifting it up. + * @link https://php.net/manual/en/splheap.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @return void + */ + public function insert($value) {} + + /** + * Peeks at the node from the top of the heap + * @link https://php.net/manual/en/splheap.top.php + * @return TValue The value of the node on the top. + */ + public function top() {} + + /** + * Counts the number of elements in the heap. + * @link https://php.net/manual/en/splheap.count.php + * @return int the number of elements in the heap. + */ + public function count() {} + + /** + * Checks whether the heap is empty. + * @link https://php.net/manual/en/splheap.isempty.php + * @return bool whether the heap is empty. + */ + public function isEmpty() {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splheap.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splheap.current.php + * @return TValue The current node value. + */ + public function current() {} + + /** + * Return current node index + * @link https://php.net/manual/en/splheap.key.php + * @return int The current node index. + */ + public function key() {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splheap.next.php + * @return void + */ + public function next() {} + + /** + * Check whether the heap contains more nodes + * @link https://php.net/manual/en/splheap.valid.php + * @return bool true if the heap contains any more nodes, false otherwise. + */ + public function valid() {} + + /** + * Recover from the corrupted state and allow further actions on the heap. + * @link https://php.net/manual/en/splheap.recoverfromcorruption.php + * @return void + */ + public function recoverFromCorruption() {} +} + +/** + * @template TValue + * The SplMaxHeap class provides the main functionalities of a heap, keeping the maximum on the top. + * @link https://php.net/manual/en/class.splmaxheap.php + * @template-extends SplHeap+ * The value of the first node being compared. + *
+ * @param TValue $value2+ * The value of the second node being compared. + *
+ * @return int Result of the comparison, positive integer if value1 is greater than value2, 0 if they are equal, negative integer otherwise. + * + *
+ * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position.
+ */
+ #[TentativeType]
+ protected function compare(
+ #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1,
+ #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2
+ ): int {}
+}
+
+/**
+ * @template TPriority
+ * @template TValue
+ * The SplPriorityQueue class provides the main functionalities of an
+ * prioritized queue, implemented using a heap.
+ * @link https://php.net/manual/en/class.splpriorityqueue.php
+ * @template-implements Iterator
+ * The priority of the first node being compared.
+ *
+ * The priority of the second node being compared.
+ *
+ * Multiple elements with the same priority will get dequeued in no particular order. + */ + #[TentativeType] + public function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority2 + ): int {} + + /** + * Inserts an element in the queue by sifting it up. + * @link https://php.net/manual/en/splpriorityqueue.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @param TPriority $priority+ * The associated priority. + *
+ * @return true + */ + public function insert( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority + ) {} + + /** + * Sets the mode of extraction + * @link https://php.net/manual/en/splpriorityqueue.setextractflags.php + * @param int $flags+ * Defines what is extracted by SplPriorityQueue::current, + * SplPriorityQueue::top and + * SplPriorityQueue::extract. + *
+ * SplPriorityQueue::EXTR_DATA (0x00000001): Extract the data + * @return int + */ + #[TentativeType] + public function setExtractFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): int {} + + /** + * Peeks at the node from the top of the queue + * @link https://php.net/manual/en/splpriorityqueue.top.php + * @return TValue The value or priority (or both) of the top node, depending on the extract flag. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splpriorityqueue.extract.php + * @return TValue The value or priority (or both) of the extracted node, depending on the extract flag. + */ + #[TentativeType] + public function extract(): mixed {} + + /** + * Counts the number of elements in the queue. + * @link https://php.net/manual/en/splpriorityqueue.count.php + * @return int the number of elements in the queue. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the queue is empty. + * @link https://php.net/manual/en/splpriorityqueue.isempty.php + * @return bool whether the queue is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splpriorityqueue.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splpriorityqueue.current.php + * @return TValue The value or priority (or both) of the current node, depending on the extract flag. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/splpriorityqueue.key.php + * @return int The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splpriorityqueue.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Check whether the queue contains more nodes + * @link https://php.net/manual/en/splpriorityqueue.valid.php + * @return bool true if the queue contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Recover from the corrupted state and allow further actions on the queue. + * @link https://php.net/manual/en/splpriorityqueue.recoverfromcorruption.php + * @return void + */ + public function recoverFromCorruption() {} + + /** + * @return bool + */ + #[TentativeType] + public function isCorrupted(): bool {} + + /** + * @return int + */ + #[TentativeType] + public function getExtractFlags(): int {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } -/** - * The DirectoryIterator class provides a simple interface for viewing - * the contents of filesystem directories. - * @link https://php.net/manual/en/class.directoryiterator.php - */ -class DirectoryIterator extends SplFileInfo implements SeekableIterator { - - /** - * Constructs a new directory iterator from a path - * @link https://php.net/manual/en/directoryiterator.construct.php - * @param $path - * @throws UnexpectedValueException if the path cannot be opened. - * @throws RuntimeException if the path is an empty string. - * @since 5.0 - */ - public function __construct ($path) {} - - - /** - * Determine if current DirectoryIterator item is '.' or '..' - * @link https://php.net/manual/en/directoryiterator.isdot.php - * @return bool true if the entry is . or .., - * otherwise false - * @since 5.0 - */ - public function isDot () {} - - /** - * Rewind the DirectoryIterator back to the start - * @link https://php.net/manual/en/directoryiterator.rewind.php - * @return void - * @since 5.0 - */ - public function rewind () {} - - /** - * Check whether current DirectoryIterator position is a valid file - * @link https://php.net/manual/en/directoryiterator.valid.php - * @return bool true if the position is valid, otherwise false - * @since 5.0 - */ - public function valid () {} - - /** - * Return the key for the current DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.key.php - * @return string The key for the current DirectoryIterator item. - * @since 5.0 - */ - public function key () {} - - /** - * Return the current DirectoryIterator item. - * @link https://php.net/manual/en/directoryiterator.current.php - * @return DirectoryIterator The current DirectoryIterator item. - * @since 5.0 - */ - public function current () {} - - /** - * Move forward to next DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.next.php - * @return void - * @since 5.0 - */ - public function next () {} - - /** - * Seek to a DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.seek.php - * @param int $position- * The zero-based numeric position to seek to. - *
- * @return void - * @since 5.3 - */ - public function seek ($position) {} -} +/** + * @template TValue + * The SplFixedArray class provides the main functionalities of array. The + * main differences between a SplFixedArray and a normal PHP array is that + * the SplFixedArray is of fixed length and allows only integers within + * the range as indexes. The advantage is that it allows a faster array + * implementation. + * @link https://php.net/manual/en/class.splfixedarray.php + * @template-implements Iterator+ * The array to import. + *
+ * @param bool $preserveKeys [optional]+ * Try to save the numeric indexes used in the original array. + *
+ * @return SplFixedArray an instance of SplFixedArray + * containing the array content. + */ + #[TentativeType] + public static function fromArray( + #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $array, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $preserveKeys = true + ): SplFixedArray {} + + /** + * Gets the size of the array + * @link https://php.net/manual/en/splfixedarray.getsize.php + * @return int the size of the array, as an integer. + */ + #[TentativeType] + public function getSize(): int {} + + /** + * Change the size of an array + * @link https://php.net/manual/en/splfixedarray.setsize.php + * @param int $size+ * The new array size. + *
+ * @return bool + */ + public function setSize(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size) {} + + /** + * Returns whether the requested index exists + * @link https://php.net/manual/en/splfixedarray.offsetexists.php + * @param int $index+ * The index being checked. + *
+ * @return bool true if the requested index exists, otherwise false + */ + #[TentativeType] + public function offsetExists($index): bool {} + + /** + * Returns the value at the specified index + * @link https://php.net/manual/en/splfixedarray.offsetget.php + * @param int $index+ * The index with the value. + *
+ * @return TValue The value at the specified index. + */ + #[TentativeType] + public function offsetGet($index): mixed {} + + /** + * Sets a new value at a specified index + * @link https://php.net/manual/en/splfixedarray.offsetset.php + * @param int $index+ * The index being set. + *
+ * @param TValue $value+ * The new value for the index. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Unsets the value at the specified $index + * @link https://php.net/manual/en/splfixedarray.offsetunset.php + * @param int $index+ * The index being unset. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($index): void {} + + /** + * Rewind iterator back to the start + * @link https://php.net/manual/en/splfixedarray.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Return current array entry + * @link https://php.net/manual/en/splfixedarray.current.php + * @return TValue The current element value. + */ + public function current() {} + + /** + * Return current array index + * @link https://php.net/manual/en/splfixedarray.key.php + * @return int The current array index. + */ + public function key() {} + + /** + * Move to next entry + * @link https://php.net/manual/en/splfixedarray.next.php + * @return void + */ + public function next() {} + + /** + * Check whether the array contains more elements + * @link https://php.net/manual/en/splfixedarray.valid.php + * @return bool true if the array contains any more elements, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} -/** - * The Filesystem iterator - * @link https://php.net/manual/en/class.filesystemiterator.php - */ -class FilesystemIterator extends DirectoryIterator { - const CURRENT_MODE_MASK = 240; - const CURRENT_AS_PATHNAME = 32; - const CURRENT_AS_FILEINFO = 0; - const CURRENT_AS_SELF = 16; - const KEY_MODE_MASK = 3840; - const KEY_AS_PATHNAME = 0; - const FOLLOW_SYMLINKS = 512; - const KEY_AS_FILENAME = 256; - const NEW_CURRENT_AND_KEY = 256; - const SKIP_DOTS = 4096; - const UNIX_PATHS = 8192; - const OTHER_MODE_MASK = 12288; - - /** - * Constructs a new filesystem iterator - * @link https://php.net/manual/en/filesystemiterator.construct.php - * @param $path - * @param $flags [optional] - * @throws UnexpectedValueException if the path cannot be found. - * @since 5.3 - */ - public function __construct ($path, $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS) {} - - /** - * Rewinds back to the beginning - * @link https://php.net/manual/en/filesystemiterator.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Move to the next file - * @link https://php.net/manual/en/filesystemiterator.next.php - * @return void - * @since 5.3 - */ - public function next () {} - - /** - * Retrieve the key for the current file - * @link https://php.net/manual/en/filesystemiterator.key.php - * @return string the pathname or filename depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function key () {} - - /** - * The current file - * @link https://php.net/manual/en/filesystemiterator.current.php - * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function current () {} - - /** - * Get the handling flags - * @link https://php.net/manual/en/filesystemiterator.getflags.php - * @return int The integer value of the set flags. - * @since 5.3 - */ - public function getFlags () {} - - /** - * Sets handling flags - * @link https://php.net/manual/en/filesystemiterator.setflags.php - * @param int $flags [optional]- * The handling flags to set. - * See the FilesystemIterator constants. - *
- * @return void - * @since 5.3 - */ - public function setFlags ($flags = null) {} -} + #[TentativeType] + public function __wakeup(): void {} -/** - * The RecursiveDirectoryIterator provides - * an interface for iterating recursively over filesystem directories. - * @link https://php.net/manual/en/class.recursivedirectoryiterator.php - */ -class RecursiveDirectoryIterator extends FilesystemIterator implements RecursiveIterator { - - - /** - * Constructs a RecursiveDirectoryIterator - * @link https://php.net/manual/en/recursivedirectoryiterator.construct.php - * @param $path - * @param $flags [optional] - * @throws UnexpectedValueException if the path cannot be found or is not a directory. - * @since 5.1.2 - */ - public function __construct ($path, $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO) {} - - /** - * Returns whether current entry is a directory and not '.' or '..' - * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php - * @param bool $allow_links [optional]- *
- * @return bool whether the current entry is a directory, but not '.' or '..' - * @since 5.0 - */ - public function hasChildren ($allow_links = null) {} - - /** - * Returns an iterator for the current entry if it is a directory - * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php - * @return object An iterator for the current entry, if it is a directory. - * @since 5.1 - */ - public function getChildren () {} - - /** - * Get sub path - * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpath.php - * @return string The sub path (sub directory). - * @since 5.1 - */ - public function getSubPath () {} - - /** - * Get sub path and name - * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpathname.php - * @return string The sub path (sub directory) and filename. - * @since 5.1 - */ - public function getSubPathname () {} - - /** - * Rewinds back to the beginning - * @link https://php.net/manual/en/filesystemiterator.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Move to the next file - * @link https://php.net/manual/en/filesystemiterator.next.php - * @return void - * @since 5.3 - */ - public function next () {} - - /** - * Retrieve the key for the current file - * @link https://php.net/manual/en/filesystemiterator.key.php - * @return string the pathname or filename depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function key () {} - - /** - * The current file - * @link https://php.net/manual/en/filesystemiterator.current.php - * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator constants. - * @since 5.3 - */ - public function current () {} + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __serialize(): array {} -} + /** + * @param array $data + */ + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __unserialize(array $data): void {} -/** - * Iterates through a file system in a similar fashion to - * glob. - * @link https://php.net/manual/en/class.globiterator.php - */ -class GlobIterator extends FilesystemIterator implements Countable { - - /** - * Construct a directory using glob - * @link https://php.net/manual/en/globiterator.construct.php - * @param $path - * @param $flags [optional] - * @since 5.3 - */ - public function __construct ($path, $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO) {} - - /** - * Get the number of directories and files - * @link https://php.net/manual/en/globiterator.count.php - * @return int The number of returned directories and files, as an - * integer. - * @since 5.3 - */ - public function count () {} + /** + * @return Iterator- * The number of bytes to read. - *
- * @return string|false returns the string read from the file or FALSE on failure. - * @since 5.5.11 - */ - public function fread ($length) {} - - /** - * Gets line from file and parse as CSV fields - * @link https://php.net/manual/en/splfileobject.fgetcsv.php - * @param string $delimiter [optional]- * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. - *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. - *
- * @param string $escape [optional]- * The escape character (one character only). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. - *
- * @return array an indexed array containing the fields read, or false on error. - * - *- * A blank line in a CSV file will be returned as an array - * comprising a single null field unless using SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE, - * in which case empty lines are skipped. - * @since 5.1 - */ - public function fgetcsv ($delimiter = ",", $enclosure = "\"", $escape = "\\") {} - +interface SplObserver +{ /** - * Write a field array as a CSV line - * @link https://php.net/manual/en/splfileobject.fputcsv.php - * @param array $fields
- * An array of values - * @param string $delimiter [optional]
- * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + * Receive update from subject + * @link https://php.net/manual/en/splobserver.update.php + * @param SplSubject $subject
+ * The SplSubject notifying the observer of an update. *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. - *
- * @param string $escape The optional escape parameter sets the escape character (one character only). - * @return int|false Returns the length of the written string or FALSE on failure. - * @since 5.4 - * - */ - public function fputcsv (array $fields, $delimiter = ',' , $enclosure = '"', $escape = "\\") {} - - /** - * Set the delimiter and enclosure character for CSV - * @link https://php.net/manual/en/splfileobject.setcsvcontrol.php - * @param string $delimiter [optional]- * The field delimiter (one character only). - *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). - *
- * @param string $escape [optional]- * The field escape character (one character only). - *
- * @return void - * @since 5.2 - */ - public function setCsvControl ($delimiter = ",", $enclosure = "\"", $escape = "\\") {} - - /** - * Get the delimiter and enclosure character for CSV - * @link https://php.net/manual/en/splfileobject.getcsvcontrol.php - * @return array an indexed array containing the delimiter and enclosure character. - * @since 5.2 - */ - public function getCsvControl () {} - - /** - * Portable file locking - * @link https://php.net/manual/en/splfileobject.flock.php - * @param int $operation- * operation is one of the following: - * LOCK_SH to acquire a shared lock (reader). - * @param int $wouldblock [optional]
- * Set to true if the lock would block (EWOULDBLOCK errno condition). - *
- * @return bool true on success or false on failure. - * @since 5.1 - */ - public function flock ($operation, &$wouldblock = null) {} - - /** - * Flushes the output to the file - * @link https://php.net/manual/en/splfileobject.fflush.php - * @return bool true on success or false on failure. - * @since 5.1 - */ - public function fflush () {} - - /** - * Return current file position - * @link https://php.net/manual/en/splfileobject.ftell.php - * @return int|false the position of the file pointer as an integer, or false on error. - * @since 5.1 - */ - public function ftell () {} - - /** - * Seek to a position - * @link https://php.net/manual/en/splfileobject.fseek.php - * @param int $offset- * The offset. A negative value can be used to move backwards through the file which - * is useful when SEEK_END is used as the whence value. - *
- * @param int $whence [optional]- * whence values are: - * SEEK_SET - Set position equal to offset bytes. - * SEEK_CUR - Set position to current location plus offset. - * SEEK_END - Set position to end-of-file plus offset. - *
- *- * If whence is not specified, it is assumed to be SEEK_SET. - *
- * @return int 0 if the seek was successful, -1 otherwise. Note that seeking - * past EOF is not considered an error. - * @since 5.1 - */ - public function fseek ($offset, $whence = SEEK_SET) {} - - /** - * Gets character from file - * @link https://php.net/manual/en/splfileobject.fgetc.php - * @return string|false a string containing a single character read from the file or false on EOF. - * @since 5.1 - */ - public function fgetc () {} - - /** - * Output all remaining data on a file pointer - * @link https://php.net/manual/en/splfileobject.fpassthru.php - * @return int|false the number of characters read from handle - * and passed through to the output. - * @since 5.1 - */ - public function fpassthru () {} - - /** - * Gets line from file and strip HTML tags - * @link https://php.net/manual/en/splfileobject.fgetss.php - * @param string $allowable_tags [optional]- * You can use the optional third parameter to specify tags which should - * not be stripped. - *
- * @return string|false a string containing the next line of the file with HTML and PHP - * code stripped, or false on error. - * @since 5.1 - * @deprecated 7.3 - */ - public function fgetss ($allowable_tags = null) {} - - /** - * Parses input from file according to a format - * @link https://php.net/manual/en/splfileobject.fscanf.php - * @param string $format- * The specified format as described in the sprintf documentation. - *
- * @param mixed $_ [optional]- * The optional assigned values. - *
- * @return array|int If only one parameter is passed to this method, the values parsed will be - * returned as an array. Otherwise, if optional parameters are passed, the - * function will return the number of assigned values. The optional - * parameters must be passed by reference. - * @since 5.1 - */ - public function fscanf ($format, &$_ = null) {} - - /** - * Write to file - * @link https://php.net/manual/en/splfileobject.fwrite.php - * @param string $str- * The string to be written to the file. - *
- * @param int $length [optional]- * If the length argument is given, writing will - * stop after length bytes have been written or - * the end of string is reached, whichever comes - * first. - *
- * @return int the number of bytes written, or 0 on error. - * @since 5.1 - */ - public function fwrite ($str, $length = null) {} - - /** - * Gets information about the file - * @link https://php.net/manual/en/splfileobject.fstat.php - * @return array an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - * @since 5.1 - */ - public function fstat () {} - - /** - * Truncates the file to a given length - * @link https://php.net/manual/en/splfileobject.ftruncate.php - * @param int $size- * The size to truncate to. - *
- *- * If size is larger than the file it is extended with null bytes. - *
- *- * If size is smaller than the file, the extra data will be lost. - *
- * @return bool true on success or false on failure. - * @since 5.1 - */ - public function ftruncate ($size) {} - - /** - * Retrieve current line of file - * @link https://php.net/manual/en/splfileobject.current.php - * @return string|array|false Retrieves the current line of the file. If the SplFileObject::READ_CSV flag is set, this method returns an array containing the current line parsed as CSV data. - * @since 5.1 - */ - public function current () {} - - /** - * Get line number - * @link https://php.net/manual/en/splfileobject.key.php - * @return int the current line number. - * @since 5.1 - */ - public function key () {} - - /** - * Read next line - * @link https://php.net/manual/en/splfileobject.next.php - * @return void - * @since 5.1 - */ - public function next () {} - - /** - * Sets flags for the SplFileObject - * @link https://php.net/manual/en/splfileobject.setflags.php - * @param int $flags- * Bit mask of the flags to set. See - * SplFileObject constants - * for the available flags. - *
- * @return void - * @since 5.1 - */ - public function setFlags ($flags) {} - - /** - * Gets flags for the SplFileObject - * @link https://php.net/manual/en/splfileobject.getflags.php - * @return int an integer representing the flags. - * @since 5.1 - */ - public function getFlags () {} - - /** - * Set maximum line length - * @link https://php.net/manual/en/splfileobject.setmaxlinelen.php - * @param int $max_len- * The maximum length of a line. - *
- * @return void - * @since 5.1 - */ - public function setMaxLineLen ($max_len) {} - - /** - * Get maximum line length - * @link https://php.net/manual/en/splfileobject.getmaxlinelen.php - * @return int the maximum line length if one has been set with - * SplFileObject::setMaxLineLen, default is 0. - * @since 5.1 - */ - public function getMaxLineLen () {} - - /** - * SplFileObject does not have children - * @link https://php.net/manual/en/splfileobject.haschildren.php - * @return bool false - * @since 5.1.2 - */ - public function hasChildren () {} - - /** - * No purpose - * @link https://php.net/manual/en/splfileobject.getchildren.php - * @return null An SplFileObject does not have children so this method returns NULL. - * @since 5.1 - */ - public function getChildren () {} - - /** - * Seek to specified line - * @link https://php.net/manual/en/splfileobject.seek.php - * @param int $line_pos- * The zero-based line number to seek to. - *
- * @return void - * @since 5.1 - */ - public function seek ($line_pos) {} - - /** - * Alias of SplFileObject::fgets - * @link https://php.net/manual/en/splfileobject.getcurrentline.php - * @return string|false Returns a string containing the next line from the file, or FALSE on error. - * @since 5.1.2 - */ - public function getCurrentLine () {} - - /** - * Alias of SplFileObject::current - * @link https://php.net/manual/en/splfileobject.tostring.php - * @since 5.1 - */ - public function __toString () {} - + * @return void + */ + #[TentativeType] + public function update(SplSubject $subject): void; } /** - * The SplTempFileObject class offers an object oriented interface for a temporary file. - * @link https://php.net/manual/en/class.spltempfileobject.php + * The SplSubject interface is used alongside + * SplObserver to implement the Observer Design Pattern. + * @link https://php.net/manual/en/class.splsubject.php */ -class SplTempFileObject extends SplFileObject { +interface SplSubject +{ + /** + * Attach an SplObserver + * @link https://php.net/manual/en/splsubject.attach.php + * @param SplObserver $observer+ * The SplObserver to attach. + *
+ * @return void + */ + #[TentativeType] + public function attach(SplObserver $observer): void; + /** + * Detach an observer + * @link https://php.net/manual/en/splsubject.detach.php + * @param SplObserver $observer+ * The SplObserver to detach. + *
+ * @return void + */ + #[TentativeType] + public function detach(SplObserver $observer): void; - /** - * Construct a new temporary file object - * @link https://php.net/manual/en/spltempfileobject.construct.php - * @param $max_memory [optional] - * @throws RuntimeException if an error occurs. - * @since 5.1.2 - */ - public function __construct ($max_memory) {} + /** + * Notify an observer + * @link https://php.net/manual/en/splsubject.notify.php + * @return void + */ + #[TentativeType] + public function notify(): void; } /** - * The SplDoublyLinkedList class provides the main functionalities of a doubly linked list. - * @link https://php.net/manual/en/class.spldoublylinkedlist.php + * @template TObject of object + * @template TValue + * The SplObjectStorage class provides a map from objects to data or, by + * ignoring data, an object set. This dual purpose can be useful in many + * cases involving the need to uniquely identify objects. + * @link https://php.net/manual/en/class.splobjectstorage.php + * @template-implements Iterator- * The value to push. - *
- * @return void - * @since 5.3 - */ - public function push ($value) {} - - /** - * Prepends the doubly linked list with an element - * @link https://php.net/manual/en/spldoublylinkedlist.unshift.php - * @param mixed $value- * The value to unshift. - *
- * @return void - * @since 5.3 - */ - public function unshift ($value) {} - - /** - * Peeks at the node from the end of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.top.php - * @return mixed The value of the last node. - * @since 5.3 - */ - public function top () {} - - /** - * Peeks at the node from the beginning of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.bottom.php - * @return mixed The value of the first node. - * @since 5.3 - */ - public function bottom () {} - - /** - * Counts the number of elements in the doubly linked list. - * @link https://php.net/manual/en/spldoublylinkedlist.count.php - * @return int the number of elements in the doubly linked list. - * @since 5.3 - */ - public function count () {} - - /** - * Checks whether the doubly linked list is empty. - * @link https://php.net/manual/en/spldoublylinkedlist.isempty.php - * @return bool whether the doubly linked list is empty. - * @since 5.3 - */ - public function isEmpty () {} - - /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) - * @return void - * @since 5.3 - */ - public function setIteratorMode ($mode) {} - - /** - * Returns the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.getiteratormode.php - * @return int the different modes and flags that affect the iteration. - * @since 5.3 - */ - public function getIteratorMode () {} - - /** - * Returns whether the requested $index exists - * @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php - * @param mixed $index- * The index being checked. - *
- * @return bool true if the requested index exists, otherwise false - * @since 5.3 - */ - public function offsetExists ($index) {} - - /** - * Returns the value at the specified $index - * @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php - * @param mixed $index- * The index with the value. - *
- * @return mixed The value at the specified index. - * @since 5.3 - */ - public function offsetGet ($index) {} - - /** - * Sets the value at the specified $index to $newval - * @link https://php.net/manual/en/spldoublylinkedlist.offsetset.php - * @param mixed $index- * The index being set. - *
- * @param mixed $newval- * The new value for the index. - *
- * @return void - * @since 5.3 - */ - public function offsetSet ($index, $newval) {} - - /** - * Unsets the value at the specified $index - * @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php - * @param mixed $index- * The index being unset. - *
- * @return void - * @since 5.3 - */ - public function offsetUnset ($index) {} - - /** - * Rewind iterator back to the start - * @link https://php.net/manual/en/spldoublylinkedlist.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Return current array entry - * @link https://php.net/manual/en/spldoublylinkedlist.current.php - * @return mixed The current node value. - * @since 5.3 - */ - public function current () {} - - /** - * Return current node index - * @link https://php.net/manual/en/spldoublylinkedlist.key.php - * @return string|float|int|bool|null The current node index. - * @since 5.3 - */ - public function key () {} - - /** - * Move to next entry - * @link https://php.net/manual/en/spldoublylinkedlist.next.php - * @return void - * @since 5.3 - */ - public function next () {} - - /** - * Move to previous entry - * @link https://php.net/manual/en/spldoublylinkedlist.prev.php - * @return void - * @since 5.3 - */ - public function prev () {} - - /** - * Check whether the doubly linked list contains more nodes - * @link https://php.net/manual/en/spldoublylinkedlist.valid.php - * @return bool true if the doubly linked list contains any more nodes, false otherwise. - * @since 5.3 - */ - public function valid () {} - - /** - * Unserializes the storage - * @link https://php.net/manual/ru/spldoublylinkedlist.serialize.php - * @param string $serialized The serialized string. - * @return void - * @since 5.4 - */ - public function unserialize($serialized) {} - - /** - * Serializes the storage - * @link https://php.net/manual/ru/spldoublylinkedlist.unserialize.php - * @return string The serialized string. - * @since 5.4 - */ - public function serialize () {} - - /** - * @return array - * @since 7.4 - */ - public function __serialize(): array {} - - /** - * @param array $data - * @since 7.4 - */ - public function __unserialize(array $data): void {} + /** + * Adds an object in the storage + * @link https://php.net/manual/en/splobjectstorage.attach.php + * @param TObject $object+ * The object to add. + *
+ * @param TValue $info [optional]+ * The data to associate with the object. + *
+ * @return void + */ + #[TentativeType] + public function attach( + #[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null + ): void {} -} + /** + * Removes an object from the storage + * @link https://php.net/manual/en/splobjectstorage.detach.php + * @param TObject $object+ * The object to remove. + *
+ * @return void + */ + #[TentativeType] + public function detach(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): void {} -/** - * The SplQueue class provides the main functionalities of a queue implemented using a doubly linked list. - * @link https://php.net/manual/en/class.splqueue.php - */ -class SplQueue extends SplDoublyLinkedList { + /** + * Checks if the storage contains a specific object + * @link https://php.net/manual/en/splobjectstorage.contains.php + * @param TObject $object+ * The object to look for. + *
+ * @return bool true if the object is in the storage, false otherwise. + */ + #[TentativeType] + public function contains(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} + + /** + * Adds all objects from another storage + * @link https://php.net/manual/en/splobjectstorage.addall.php + * @param SplObjectStorage+ * The storage you want to import. + *
+ * @return int + */ + #[TentativeType] + public function addAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} + /** + * Removes objects contained in another storage from the current storage + * @link https://php.net/manual/en/splobjectstorage.removeall.php + * @param SplObjectStorage+ * The storage containing the elements to remove. + *
+ * @return int + */ + #[TentativeType] + public function removeAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - /** - * Adds an element to the queue. - * @link https://php.net/manual/en/splqueue.enqueue.php - * @param mixed $value- * The value to enqueue. - *
- * @return void - * @since 5.3 - */ - public function enqueue ($value) {} + /** + * Removes all objects except for those contained in another storage from the current storage + * @link https://php.net/manual/en/splobjectstorage.removeallexcept.php + * @param SplObjectStorage+ * The storage containing the elements to retain in the current storage. + *
+ * @return int + * @since 5.3.6 + */ + #[TentativeType] + public function removeAllExcept(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - /** - * Dequeues a node from the queue - * @link https://php.net/manual/en/splqueue.dequeue.php - * @return mixed The value of the dequeued node. - * @since 5.3 - */ - public function dequeue () {} + /** + * Returns the data associated with the current iterator entry + * @link https://php.net/manual/en/splobjectstorage.getinfo.php + * @return TValue The data associated with the current iterator position. + */ + #[TentativeType] + public function getInfo(): mixed {} /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: + * Sets the data associated with the current iterator entry + * @link https://php.net/manual/en/splobjectstorage.setinfo.php + * @param TValue $info
+ * The data to associate with the current iterator entry. *
- * The direction of the iteration (either one or the other): - * @since 5.3 -* SplDoublyLinkedList::IT_MODE_LIFO (Stack style) * @return void */ - public function setIteratorMode ($mode) {} + #[TentativeType] + public function setInfo(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info): void {} -} -/** - * The SplStack class provides the main functionalities of a stack implemented using a doubly linked list. - * @link https://php.net/manual/en/class.splstack.php - */ -class SplStack extends SplDoublyLinkedList { + /** + * Returns the number of objects in the storage + * @link https://php.net/manual/en/splobjectstorage.count.php + * @param int $mode [optional] + * @return int The number of objects in the storage. + */ + #[TentativeType] + public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {} /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * Rewind the iterator to the first storage element + * @link https://php.net/manual/en/splobjectstorage.rewind.php * @return void - * @since 5.3 */ - public function setIteratorMode ($mode) {} -} + #[TentativeType] + public function rewind(): void {} -/** - * The SplHeap class provides the main functionalities of an Heap. - * @link https://php.net/manual/en/class.splheap.php - */ -abstract class SplHeap implements Iterator, Countable { - - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splheap.extract.php - * @return mixed The value of the extracted node. - * @since 5.3 - */ - public function extract () {} - - /** - * Inserts an element in the heap by sifting it up. - * @link https://php.net/manual/en/splheap.insert.php - * @param mixed $value- * The value to insert. - *
- * @return void - * @since 5.3 - */ - public function insert ($value) {} - - /** - * Peeks at the node from the top of the heap - * @link https://php.net/manual/en/splheap.top.php - * @return mixed The value of the node on the top. - * @since 5.3 - */ - public function top () {} - - /** - * Counts the number of elements in the heap. - * @link https://php.net/manual/en/splheap.count.php - * @return int the number of elements in the heap. - * @since 5.3 - */ - public function count () {} - - /** - * Checks whether the heap is empty. - * @link https://php.net/manual/en/splheap.isempty.php - * @return bool whether the heap is empty. - * @since 5.3 - */ - public function isEmpty () {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splheap.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splheap.current.php - * @return mixed The current node value. - * @since 5.3 - */ - public function current () {} - - /** - * Return current node index - * @link https://php.net/manual/en/splheap.key.php - * @return int The current node index. - * @since 5.3 - */ - public function key () {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splheap.next.php - * @return void - * @since 5.3 - */ - public function next () {} - - /** - * Check whether the heap contains more nodes - * @link https://php.net/manual/en/splheap.valid.php - * @return bool true if the heap contains any more nodes, false otherwise. - * @since 5.3 - */ - public function valid () {} - - /** - * Recover from the corrupted state and allow further actions on the heap. - * @link https://php.net/manual/en/splheap.recoverfromcorruption.php - * @return void - * @since 5.3 - */ - public function recoverFromCorruption () {} - - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splheap.compare.php - * @param mixed $value1- * The value of the first node being compared. - *
- * @param mixed $value2- * The value of the second node being compared. - *
- * @return int Result of the comparison, positive integer if value1 is greater than value2, 0 if they are equal, negative integer otherwise. - * - *- * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position. - * @since 5.3 - */ - abstract protected function compare ($value1, $value2); + /** + * Returns if the current iterator entry is valid + * @link https://php.net/manual/en/splobjectstorage.valid.php + * @return bool true if the iterator entry is valid, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} /** - * @return bool + * Returns the index at which the iterator currently is + * @link https://php.net/manual/en/splobjectstorage.key.php + * @return int The index corresponding to the position of the iterator. */ - public function isCorrupted(){} + #[TentativeType] + public function key(): int {} -} + /** + * Returns the current storage entry + * @link https://php.net/manual/en/splobjectstorage.current.php + * @return TObject The object at the current iterator position. + */ + #[TentativeType] + public function current(): object {} -/** - * The SplMinHeap class provides the main functionalities of a heap, keeping the minimum on the top. - * @link https://php.net/manual/en/class.splminheap.php - */ -class SplMinHeap extends SplHeap { - - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splminheap.compare.php - * @param mixed $value1
- * The value of the first node being compared. - *
- * @param mixed $value2- * The value of the second node being compared. - *
- * @return void Result of the comparison, positive integer if value1 is lower than value2, 0 if they are equal, negative integer otherwise. - * - *- * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position. - * @since 5.3 - */ - protected function compare ($value1, $value2) {} - - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splheap.extract.php - * @return mixed The value of the extracted node. - * @since 5.3 - */ - public function extract () {} - - /** - * Inserts an element in the heap by sifting it up. - * @link https://php.net/manual/en/splheap.insert.php - * @param mixed $value
- * The value to insert. - *
- * @return void - * @since 5.3 - */ - public function insert ($value) {} - - /** - * Peeks at the node from the top of the heap - * @link https://php.net/manual/en/splheap.top.php - * @return mixed The value of the node on the top. - * @since 5.3 - */ - public function top () {} - - /** - * Counts the number of elements in the heap. - * @link https://php.net/manual/en/splheap.count.php - * @return int the number of elements in the heap. - * @since 5.3 - */ - public function count () {} - - /** - * Checks whether the heap is empty. - * @link https://php.net/manual/en/splheap.isempty.php - * @return bool whether the heap is empty. - * @since 5.3 - */ - public function isEmpty () {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splheap.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splheap.current.php - * @return mixed The current node value. - * @since 5.3 - */ - public function current () {} - - /** - * Return current node index - * @link https://php.net/manual/en/splheap.key.php - * @return int The current node index. - * @since 5.3 - */ - public function key () {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splheap.next.php - * @return void - * @since 5.3 - */ - public function next () {} - - /** - * Check whether the heap contains more nodes - * @link https://php.net/manual/en/splheap.valid.php - * @return bool true if the heap contains any more nodes, false otherwise. - * @since 5.3 - */ - public function valid () {} - - /** - * Recover from the corrupted state and allow further actions on the heap. - * @link https://php.net/manual/en/splheap.recoverfromcorruption.php - * @return void - * @since 5.3 - */ - public function recoverFromCorruption () {} + /** + * Move to the next entry + * @link https://php.net/manual/en/splobjectstorage.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} -} + /** + * Unserializes a storage from its string representation + * @link https://php.net/manual/en/splobjectstorage.unserialize.php + * @param string $data+ * The serialized representation of a storage. + *
+ * @return void + * @since 5.2.2 + */ + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} -/** - * The SplMaxHeap class provides the main functionalities of a heap, keeping the maximum on the top. - * @link https://php.net/manual/en/class.splmaxheap.php - */ -class SplMaxHeap extends SplHeap { + /** + * Serializes the storage + * @link https://php.net/manual/en/splobjectstorage.serialize.php + * @return string A string representing the storage. + * @since 5.2.2 + */ + #[TentativeType] + public function serialize(): string {} /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splmaxheap.compare.php - * @param mixed $value1- * The value of the first node being compared. + * Checks whether an object exists in the storage + * @link https://php.net/manual/en/splobjectstorage.offsetexists.php + * @param TObject $object
+ * The object to look for. *
- * @param mixed $value2- * The value of the second node being compared. + * @return bool true if the object exists in the storage, + * and false otherwise. + */ + #[TentativeType] + public function offsetExists($object): bool {} + + /** + * Associates data to an object in the storage + * @link https://php.net/manual/en/splobjectstorage.offsetset.php + * @param TObject $object
+ * The object to associate data with. *
- * @return void Result of the comparison, positive integer if value1 is greater than value2, 0 if they are equal, negative integer otherwise. + * @param TValue $info [optional]+ * The data to associate with the object. *
- *- * Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position. - * @since 5.3 + * @return void */ - protected function compare ($value1, $value2) {} + #[TentativeType] + public function offsetSet( + #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] $object, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null + ): void {} -} -/** - * The SplPriorityQueue class provides the main functionalities of an - * prioritized queue, implemented using a heap. - * @link https://php.net/manual/en/class.splpriorityqueue.php - */ -class SplPriorityQueue implements Iterator, Countable { - const EXTR_BOTH = 3; - const EXTR_PRIORITY = 2; - const EXTR_DATA = 1; - - - /** - * Compare priorities in order to place elements correctly in the heap while sifting up. - * @link https://php.net/manual/en/splpriorityqueue.compare.php - * @param mixed $priority1
- * The priority of the first node being compared. - *
- * @param mixed $priority2- * The priority of the second node being compared. - *
- * @return int Result of the comparison, positive integer if priority1 is greater than priority2, 0 if they are equal, negative integer otherwise. - * - *- * Multiple elements with the same priority will get dequeued in no particular order. - * @since 5.3 - */ - public function compare ($priority1, $priority2) {} - - /** - * Inserts an element in the queue by sifting it up. - * @link https://php.net/manual/en/splpriorityqueue.insert.php - * @param mixed $value
- * The value to insert. - *
- * @param mixed $priority- * The associated priority. - *
- * @return true - * @since 5.3 - */ - public function insert ($value, $priority) {} - - /** - * Sets the mode of extraction - * @link https://php.net/manual/en/splpriorityqueue.setextractflags.php - * @param int $flags- * Defines what is extracted by SplPriorityQueue::current, - * SplPriorityQueue::top and - * SplPriorityQueue::extract. - *
- * SplPriorityQueue::EXTR_DATA (0x00000001): Extract the data - * @return void - * @since 5.3 - */ - public function setExtractFlags ($flags) {} - - /** - * Peeks at the node from the top of the queue - * @link https://php.net/manual/en/splpriorityqueue.top.php - * @return mixed The value or priority (or both) of the top node, depending on the extract flag. - * @since 5.3 - */ - public function top () {} - - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splpriorityqueue.extract.php - * @return mixed The value or priority (or both) of the extracted node, depending on the extract flag. - * @since 5.3 - */ - public function extract () {} - - /** - * Counts the number of elements in the queue. - * @link https://php.net/manual/en/splpriorityqueue.count.php - * @return int the number of elements in the queue. - * @since 5.3 - */ - public function count () {} - - /** - * Checks whether the queue is empty. - * @link https://php.net/manual/en/splpriorityqueue.isempty.php - * @return bool whether the queue is empty. - * @since 5.3 - */ - public function isEmpty () {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splpriorityqueue.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splpriorityqueue.current.php - * @return mixed The value or priority (or both) of the current node, depending on the extract flag. - * @since 5.3 - */ - public function current () {} - - /** - * Return current node index - * @link https://php.net/manual/en/splpriorityqueue.key.php - * @return int The current node index. - * @since 5.3 - */ - public function key () {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splpriorityqueue.next.php - * @return void - * @since 5.3 - */ - public function next () {} - - /** - * Check whether the queue contains more nodes - * @link https://php.net/manual/en/splpriorityqueue.valid.php - * @return bool true if the queue contains any more nodes, false otherwise. - * @since 5.3 - */ - public function valid () {} - - /** - * Recover from the corrupted state and allow further actions on the queue. - * @link https://php.net/manual/en/splpriorityqueue.recoverfromcorruption.php - * @return void - * @since 5.3 - */ - public function recoverFromCorruption () {} + /** + * Removes an object from the storage + * @link https://php.net/manual/en/splobjectstorage.offsetunset.php + * @param TObject $object+ * The object to remove. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($object): void {} /** - * @return bool + * Returns the data associated with an+ * The object to look for. + *
+ * @return TValue The data previously associated with the object in the storage. */ - public function isCorrupted() {} + #[TentativeType] + public function offsetGet($object): mixed {} /** - * @return int + * Calculate a unique identifier for the contained objects + * @link https://php.net/manual/en/splobjectstorage.gethash.php + * @param TObject $object+ * object whose identifier is to be calculated. + *
+ * @return string A string with the calculated identifier. + * @since 5.4 + */ + #[TentativeType] + public function getHash(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): string {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __serialize(): array {} + + /** + * @param array $data + * @since 7.4 */ - public function getExtractFlags() {} + #[TentativeType] + public function __unserialize(array $data): void {} + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** - * The SplFixedArray class provides the main functionalities of array. The - * main differences between a SplFixedArray and a normal PHP array is that - * the SplFixedArray is of fixed length and allows only integers within - * the range as indexes. The advantage is that it allows a faster array - * implementation. - * @link https://php.net/manual/en/class.splfixedarray.php + * An Iterator that sequentially iterates over all attached iterators + * @link https://php.net/manual/en/class.multipleiterator.php */ -class SplFixedArray implements Iterator, ArrayAccess, Countable { - - /** - * Constructs a new fixed array - * @link https://php.net/manual/en/splfixedarray.construct.php - * @param int $size [optional] - * @since 5.3 - */ - public function __construct ($size = 0) {} - - /** - * Returns the size of the array - * @link https://php.net/manual/en/splfixedarray.count.php - * @return int the size of the array. - * @since 5.3 - */ - public function count () {} - - /** - * Returns a PHP array from the fixed array - * @link https://php.net/manual/en/splfixedarray.toarray.php - * @return array a PHP array, similar to the fixed array. - * @since 5.3 - */ - public function toArray () {} - - /** - * Import a PHP array in a SplFixedArray instance - * @link https://php.net/manual/en/splfixedarray.fromarray.php - * @param array $array- * The array to import. - *
- * @param bool $save_indexes [optional]- * Try to save the numeric indexes used in the original array. - *
- * @return SplFixedArray an instance of SplFixedArray - * containing the array content. - * @since 5.3 - */ - public static function fromArray (array $array, $save_indexes = true) {} - - /** - * Gets the size of the array - * @link https://php.net/manual/en/splfixedarray.getsize.php - * @return int the size of the array, as an integer. - * @since 5.3 - */ - public function getSize () {} - - /** - * Change the size of an array - * @link https://php.net/manual/en/splfixedarray.setsize.php - * @param int $size- * The new array size. - *
- * @return bool - * @since 5.3 - */ - public function setSize ($size) {} - - /** - * Returns whether the requested index exists - * @link https://php.net/manual/en/splfixedarray.offsetexists.php - * @param int $index- * The index being checked. - *
- * @return bool true if the requested index exists, otherwise false - * @since 5.3 - */ - public function offsetExists ($index) {} - - /** - * Returns the value at the specified index - * @link https://php.net/manual/en/splfixedarray.offsetget.php - * @param int $index- * The index with the value. - *
- * @return mixed The value at the specified index. - * @since 5.3 - */ - public function offsetGet ($index) {} - - /** - * Sets a new value at a specified index - * @link https://php.net/manual/en/splfixedarray.offsetset.php - * @param int $index- * The index being set. - *
- * @param mixed $newval- * The new value for the index. - *
- * @return void - * @since 5.3 - */ - public function offsetSet ($index, $newval) {} - - /** - * Unsets the value at the specified $index - * @link https://php.net/manual/en/splfixedarray.offsetunset.php - * @param int $index- * The index being unset. - *
- * @return void - * @since 5.3 - */ - public function offsetUnset ($index) {} - - /** - * Rewind iterator back to the start - * @link https://php.net/manual/en/splfixedarray.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Return current array entry - * @link https://php.net/manual/en/splfixedarray.current.php - * @return mixed The current element value. - * @since 5.3 - */ - public function current () {} - - /** - * Return current array index - * @link https://php.net/manual/en/splfixedarray.key.php - * @return int The current array index. - * @since 5.3 - */ - public function key () {} - - /** - * Move to next entry - * @link https://php.net/manual/en/splfixedarray.next.php - * @return void - * @since 5.3 - */ - public function next () {} - - /** - * Check whether the array contains more elements - * @link https://php.net/manual/en/splfixedarray.valid.php - * @return bool true if the array contains any more elements, false otherwise. - * @since 5.3 - */ - public function valid () {} - - public function __wakeup() - { - } +class MultipleIterator implements Iterator +{ + public const MIT_NEED_ANY = 0; + public const MIT_NEED_ALL = 1; + public const MIT_KEYS_NUMERIC = 0; + public const MIT_KEYS_ASSOC = 2; + /** + * Constructs a new MultipleIterator + * @link https://php.net/manual/en/multipleiterator.construct.php + * @param int $flags Defaults to MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC + */ + public function __construct( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags, + #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC + ) {} -} + /** + * Gets the flag information + * @link https://php.net/manual/en/multipleiterator.getflags.php + * @return int Information about the flags, as an integer. + */ + #[TentativeType] + public function getFlags(): int {} -/** - * The SplObserver interface is used alongside - * SplSubject to implement the Observer Design Pattern. - * @link https://php.net/manual/en/class.splobserver.php - */ -interface SplObserver { - - /** - * Receive update from subject - * @link https://php.net/manual/en/splobserver.update.php - * @param SplSubject $subject- * The SplSubject notifying the observer of an update. - *
- * @return void - * @since 5.1 - */ - public function update (SplSubject $subject); + /** + * Sets flags + * @link https://php.net/manual/en/multipleiterator.setflags.php + * @param int $flags+ * The flags to set, according to the + * Flag Constants + *
+ * @return void + */ + #[TentativeType] + public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} -} + /** + * Attaches iterator information + * @link https://php.net/manual/en/multipleiterator.attachiterator.php + * @param Iterator $iterator+ * The new iterator to attach. + *
+ * @param int|string|null $info [optional]+ * The associative information for the Iterator, which must be an + * integer, a string, or null. + *
+ * @return void Description... + */ + #[TentativeType] + public function attachIterator(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int|string|null'], default: '')] $info = null): void {} -/** - * The SplSubject interface is used alongside - * SplObserver to implement the Observer Design Pattern. - * @link https://php.net/manual/en/class.splsubject.php - */ -interface SplSubject { - - /** - * Attach an SplObserver - * @link https://php.net/manual/en/splsubject.attach.php - * @param SplObserver $observer- * The SplObserver to attach. - *
- * @return void - * @since 5.1 - */ - public function attach (SplObserver $observer); - - /** - * Detach an observer - * @link https://php.net/manual/en/splsubject.detach.php - * @param SplObserver $observer- * The SplObserver to detach. - *
- * @return void - * @since 5.1 - */ - public function detach (SplObserver $observer); - - /** - * Notify an observer - * @link https://php.net/manual/en/splsubject.notify.php - * @return void - * @since 5.1 - */ - public function notify (); + /** + * Detaches an iterator + * @link https://php.net/manual/en/multipleiterator.detachiterator.php + * @param Iterator $iterator+ * The iterator to detach. + *
+ * @return void + */ + #[TentativeType] + public function detachIterator(Iterator $iterator): void {} -} + /** + * Checks if an iterator is attached + * @link https://php.net/manual/en/multipleiterator.containsiterator.php + * @param Iterator $iterator+ * The iterator to check. + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function containsIterator(Iterator $iterator): bool {} -/** - * The SplObjectStorage class provides a map from objects to data or, by - * ignoring data, an object set. This dual purpose can be useful in many - * cases involving the need to uniquely identify objects. - * @link https://php.net/manual/en/class.splobjectstorage.php - */ -class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess { - - /** - * Adds an object in the storage - * @link https://php.net/manual/en/splobjectstorage.attach.php - * @param object $object- * The object to add. - *
- * @param mixed $data [optional]- * The data to associate with the object. - *
- * @return void - * @since 5.1 - */ - public function attach ($object, $data = null) {} - - /** - * Removes an object from the storage - * @link https://php.net/manual/en/splobjectstorage.detach.php - * @param object $object- * The object to remove. - *
- * @return void - * @since 5.1 - */ - public function detach ($object) {} - - /** - * Checks if the storage contains a specific object - * @link https://php.net/manual/en/splobjectstorage.contains.php - * @param object $object- * The object to look for. - *
- * @return bool true if the object is in the storage, false otherwise. - * @since 5.1 - */ - public function contains ($object) {} - - /** - * Adds all objects from another storage - * @link https://php.net/manual/en/splobjectstorage.addall.php - * @param SplObjectStorage $storage- * The storage you want to import. - *
- * @return void - * @since 5.3 - */ - public function addAll ($storage) {} - - /** - * Removes objects contained in another storage from the current storage - * @link https://php.net/manual/en/splobjectstorage.removeall.php - * @param SplObjectStorage $storage- * The storage containing the elements to remove. - *
- * @return void - * @since 5.3 - */ - public function removeAll ($storage) {} - - /** - * Removes all objects except for those contained in another storage from the current storage - * @link https://php.net/manual/en/splobjectstorage.removeallexcept.php - * @param SplObjectStorage $storage- * The storage containing the elements to retain in the current storage. - *
- * @return void - * @since 5.3.6 - */ - public function removeAllExcept ($storage) {} - - /** - * Returns the data associated with the current iterator entry - * @link https://php.net/manual/en/splobjectstorage.getinfo.php - * @return mixed The data associated with the current iterator position. - * @since 5.3 - */ - public function getInfo () {} - - /** - * Sets the data associated with the current iterator entry - * @link https://php.net/manual/en/splobjectstorage.setinfo.php - * @param mixed $data- * The data to associate with the current iterator entry. - *
- * @return void - * @since 5.3 - */ - public function setInfo ($data) {} - - /** - * Returns the number of objects in the storage - * @link https://php.net/manual/en/splobjectstorage.count.php - * @return int The number of objects in the storage. - * @since 5.1 - */ - public function count () {} - - /** - * Rewind the iterator to the first storage element - * @link https://php.net/manual/en/splobjectstorage.rewind.php - * @return void - * @since 5.1 - */ - public function rewind () {} - - /** - * Returns if the current iterator entry is valid - * @link https://php.net/manual/en/splobjectstorage.valid.php - * @return bool true if the iterator entry is valid, false otherwise. - * @since 5.1 - */ - public function valid () {} - - /** - * Returns the index at which the iterator currently is - * @link https://php.net/manual/en/splobjectstorage.key.php - * @return int The index corresponding to the position of the iterator. - * @since 5.1 - */ - public function key () {} - - /** - * Returns the current storage entry - * @link https://php.net/manual/en/splobjectstorage.current.php - * @return object The object at the current iterator position. - * @since 5.1 - */ - public function current () {} - - /** - * Move to the next entry - * @link https://php.net/manual/en/splobjectstorage.next.php - * @return void - * @since 5.1 - */ - public function next () {} - - /** - * Unserializes a storage from its string representation - * @link https://php.net/manual/en/splobjectstorage.unserialize.php - * @param string $serialized- * The serialized representation of a storage. - *
- * @return void - * @since 5.2.2 - */ - public function unserialize ($serialized) {} - - /** - * Serializes the storage - * @link https://php.net/manual/en/splobjectstorage.serialize.php - * @return string A string representing the storage. - * @since 5.2.2 - */ - public function serialize () {} - - /** - * Checks whether an object exists in the storage - * @link https://php.net/manual/en/splobjectstorage.offsetexists.php - * @param object $object- * The object to look for. - *
- * @return bool true if the object exists in the storage, - * and false otherwise. - * @since 5.3 - */ - public function offsetExists ($object) {} - - /** - * Associates data to an object in the storage - * @link https://php.net/manual/en/splobjectstorage.offsetset.php - * @param object $object- * The object to associate data with. - *
- * @param mixed $data [optional]- * The data to associate with the object. - *
- * @return void - * @since 5.3 - */ - public function offsetSet ($object, $data = null) {} - - /** - * Removes an object from the storage - * @link https://php.net/manual/en/splobjectstorage.offsetunset.php - * @param object $object- * The object to remove. - *
- * @return void - * @since 5.3 - */ - public function offsetUnset ($object) {} - - /** - * Returns the data associated with an- * The object to look for. - *
- * @return mixed The data previously associated with the object in the storage. - * @since 5.3 - */ - public function offsetGet ($object) {} - - /** - * Calculate a unique identifier for the contained objects - * @link https://php.net/manual/en/splobjectstorage.gethash.php - * @param $object- * object whose identifier is to be calculated. - * @return string A string with the calculated identifier. - * @since 5.4 - */ - public function getHash($object) {} - - /** - * @return array - * @since 7.4 - */ - public function __serialize(): array {} - - /** - * @param array $data - * @since 7.4 - */ - public function __unserialize(array $data): void {} + /** + * Gets the number of attached iterator instances + * @link https://php.net/manual/en/multipleiterator.countiterators.php + * @return int The number of attached iterator instances (as an integer). + */ + #[TentativeType] + public function countIterators(): int {} -} + /** + * Rewinds all attached iterator instances + * @link https://php.net/manual/en/multipleiterator.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} -/** - * An Iterator that sequentially iterates over all attached iterators - * @link https://php.net/manual/en/class.multipleiterator.php - */ -class MultipleIterator implements Iterator { - const MIT_NEED_ANY = 0; - const MIT_NEED_ALL = 1; - const MIT_KEYS_NUMERIC = 0; - const MIT_KEYS_ASSOC = 2; - - - /** - * Constructs a new MultipleIterator - * @link https://php.net/manual/en/multipleiterator.construct.php - * @param $flags [optional] Defaults to MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC - * @since 5.3 - */ - public function __construct ($flags = MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC) {} - - /** - * Gets the flag information - * @link https://php.net/manual/en/multipleiterator.getflags.php - * @return int Information about the flags, as an integer. - * @since 5.3 - */ - public function getFlags () {} - - /** - * Sets flags - * @link https://php.net/manual/en/multipleiterator.setflags.php - * @param int $flags
- * The flags to set, according to the - * Flag Constants - *
- * @return void - * @since 5.3 - */ - public function setFlags ($flags) {} - - /** - * Attaches iterator information - * @link https://php.net/manual/en/multipleiterator.attachiterator.php - * @param Iterator $iterator- * The new iterator to attach. - *
- * @param int|string|null $infos [optional]- * The associative information for the Iterator, which must be an - * integer, a string, or null. - *
- * @return void Description... - * @since 5.3 - */ - public function attachIterator (Iterator $iterator, $infos = null) {} - - /** - * Detaches an iterator - * @link https://php.net/manual/en/multipleiterator.detachiterator.php - * @param Iterator $iterator- * The iterator to detach. - *
- * @return void - * @since 5.3 - */ - public function detachIterator (Iterator $iterator) {} - - /** - * Checks if an iterator is attached - * @link https://php.net/manual/en/multipleiterator.containsiterator.php - * @param Iterator $iterator- * The iterator to check. - *
- * @return bool true on success or false on failure. - * @since 5.3 - */ - public function containsIterator (Iterator $iterator) {} - - /** - * Gets the number of attached iterator instances - * @link https://php.net/manual/en/multipleiterator.countiterators.php - * @return int The number of attached iterator instances (as an integer). - * @since 5.3 - */ - public function countIterators () {} - - /** - * Rewinds all attached iterator instances - * @link https://php.net/manual/en/multipleiterator.rewind.php - * @return void - * @since 5.3 - */ - public function rewind () {} - - /** - * Checks the validity of sub iterators - * @link https://php.net/manual/en/multipleiterator.valid.php - * @return bool true if one or all sub iterators are valid depending on flags, - * otherwise false - * @since 5.3 - */ - public function valid () {} - - /** - * Gets the registered iterator instances - * @link https://php.net/manual/en/multipleiterator.key.php - * @return array An array of all registered iterator instances, - * or false if no sub iterator is attached. - * @since 5.3 - */ - public function key () {} - - /** - * Gets the registered iterator instances - * @link https://php.net/manual/en/multipleiterator.current.php - * @return array|false An array containing the current values of each attached iterator, - * or false if no iterators are attached. - * @throws \RuntimeException if mode MIT_NEED_ALL is set and at least one attached iterator is not valid. - * @throws \InvalidArgumentException if a key is NULL and MIT_KEYS_ASSOC is set. - * @since 5.3 - */ - public function current () {} - - /** - * Moves all attached iterator instances forward - * @link https://php.net/manual/en/multipleiterator.next.php - * @return void - * @since 5.3 - */ - public function next () {} + /** + * Checks the validity of sub iterators + * @link https://php.net/manual/en/multipleiterator.valid.php + * @return bool true if one or all sub iterators are valid depending on flags, + * otherwise false + */ + #[TentativeType] + public function valid(): bool {} -} + /** + * Gets the registered iterator instances + * @link https://php.net/manual/en/multipleiterator.key.php + * @return array An array of all registered iterator instances, + * or false if no sub iterator is attached. + */ + #[TentativeType] + public function key(): array {} + + /** + * Gets the registered iterator instances + * @link https://php.net/manual/en/multipleiterator.current.php + * @return array An array containing the current values of each attached iterator, + * or false if no iterators are attached. + * @throws RuntimeException if mode MIT_NEED_ALL is set and at least one attached iterator is not valid. + * @throws InvalidArgumentException if a key is NULL and MIT_KEYS_ASSOC is set. + */ + #[TentativeType] + public function current(): array {} + + /** + * Moves all attached iterator instances forward + * @link https://php.net/manual/en/multipleiterator.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} +} diff --git a/SPL/SPL_f.php b/SPL/SPL_f.php index da20531b5..b0cb5f791 100644 --- a/SPL/SPL_f.php +++ b/SPL/SPL_f.php @@ -1,35 +1,36 @@ + * @param string $class*
- * @param string $file_extensions [optional]+ * @param string|null $file_extensions [optional]
* By default it checks all include paths to * contain filenames built up by the lowercase class name appended by the - * filename extensions .inc and .php. + * filename extensions .inc and .php. *
* @return void * @since 5.1.2 */ -function spl_autoload ($class_name, $file_extensions = null) {} +function spl_autoload(string $class, ?string $file_extensions): void {} /** * Register and return default file extensions for spl_autoload * @link https://php.net/manual/en/function.spl-autoload-extensions.php - * @param string $file_extensions [optional]+ * @param string|null $file_extensions [optional]
* When calling without an argument, it simply returns the current list * of extensions each separated by comma. To modify the list of file * extensions, simply invoke the functions with the new list of file @@ -40,61 +41,63 @@ function spl_autoload ($class_name, $file_extensions = null) {} * spl_autoload. * @since 5.1.2 */ -function spl_autoload_extensions ($file_extensions = null) {} +function spl_autoload_extensions(?string $file_extensions): string {} /** * Register given function as __autoload() implementation * @link https://php.net/manual/en/function.spl-autoload-register.php - * @param callback $autoload_function [optional]
+ * @param callable|null $callback [optional]
* The autoload function being registered. * If no parameter is provided, then the default implementation of * spl_autoload will be registered. *
* @param bool $throw This parameter specifies whether spl_autoload_register() should throw exceptions when the - * autoload_function cannot be registered. + * autoload_function cannot be registered. Ignored since since 8.0. * @param bool $prepend If true, spl_autoload_register() will prepend the autoloader on the autoload stack instead of - * appending it. + * appending it. * @return bool true on success or false on failure. + * @throws TypeError Since 8.0. * @since 5.1.2 */ -function spl_autoload_register ($autoload_function = null, $throw = true, $prepend = false) {} +function spl_autoload_register(?callable $callback, bool $throw = true, bool $prepend = false): bool {} /** * Unregister given function as __autoload() implementation * @link https://php.net/manual/en/function.spl-autoload-unregister.php - * @param mixed $autoload_function+ * @param callable $callback
* The autoload function being unregistered. *
* @return bool true on success or false on failure. * @since 5.1.2 */ -function spl_autoload_unregister ($autoload_function) {} +function spl_autoload_unregister(callable $callback): bool {} /** * Return all registered __autoload() functions * @link https://php.net/manual/en/function.spl-autoload-functions.php - * @return array An array of all registered __autoload functions. + * @return array|false An array of all registered __autoload functions. * If the autoload stack is not activated then the return value is false. * If no function is registered the return value will be an empty array. * @since 5.1.2 */ -function spl_autoload_functions () {} +#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] +function spl_autoload_functions() {} /** - * Try all registered __autoload() function to load the requested class + * Try all registered __autoload() functions to load the requested class * @link https://php.net/manual/en/function.spl-autoload-call.php - * @param string $class_name+ * @param string $class
* The class name being searched. *
* @return void * @since 5.1.2 */ -function spl_autoload_call ($class_name) {} +function spl_autoload_call(string $class): void {} /** * Return the parent classes of the given class * @link https://php.net/manual/en/function.class-parents.php - * @param mixed $class+ * @param object|string $object_or_class
* An object (class instance) or a string (class name). *
* @param bool $autoload [optional]@@ -102,15 +105,15 @@ function spl_autoload_call ($class_name) {} * the __autoload magic * method. *
- * @return array An array on success, or false on error. - * @since 5.1 + * @return string[]|false An array on success, or false on error. */ -function class_parents ($class, $autoload = null) {} +#[Pure] +function class_parents($object_or_class, bool $autoload = true): array|false {} /** * Return the interfaces which are implemented by the given class * @link https://php.net/manual/en/function.class-implements.php - * @param mixed $class+ * @param object|string $object_or_class
* An object (class instance) or a string (class name). *
* @param bool $autoload [optional]@@ -118,20 +121,20 @@ function class_parents ($class, $autoload = null) {} * the __autoload magic * method. *
- * @return array An array on success, or false on error. - * @since 5.1 + * @return string[]|false An array on success, or false on error. */ -function class_implements ($class, $autoload = null) {} +#[Pure] +function class_implements($object_or_class, bool $autoload = true): array|false {} /** * Return hash id for given object * @link https://php.net/manual/en/function.spl-object-hash.php - * @param object $obj + * @param object $object * @return string A string that is unique for each object and is always the same for * the same object. - * @since 5.2 */ -function spl_object_hash ($obj) {} +#[Pure] +function spl_object_hash(object $object): string {} /** * Copy the iterator into an array @@ -139,13 +142,12 @@ function spl_object_hash ($obj) {} * @param Traversable $iterator* The iterator being copied. *
- * @param bool $use_keys [optional]+ * @param bool $preserve_keys [optional]
* Whether to use the iterator element keys as index. *
* @return array An array containing the elements of the iterator. - * @since 5.1 */ -function iterator_to_array ($iterator, $use_keys = true) {} +function iterator_to_array(#[LanguageLevelTypeAware(['8.2' => 'Traversable|array'], default: 'Traversable')] $iterator, bool $preserve_keys = true): array {} /** * Count the elements in an iterator @@ -154,9 +156,9 @@ function iterator_to_array ($iterator, $use_keys = true) {} * The iterator being counted. * * @return int The number of elements in iterator. - * @since 5.1 */ -function iterator_count ($iterator) {} +#[Pure] +function iterator_count(#[LanguageLevelTypeAware(['8.2' => 'Traversable|array'], default: 'Traversable')] $iterator): int {} /** * Call a function for every element in an iterator @@ -164,38 +166,36 @@ function iterator_count ($iterator) {} * @param Traversable $iterator* The class to iterate over. *
- * @param callback $function+ * @param callable $callback
* The callback function to call on every element. * The function must return true in order to * continue iterating over the iterator. *
- * @param array $args [optional]+ * @param array|null $args [optional]
* Arguments to pass to the callback function. *
* @return int the iteration count. - * @since 5.1 */ -function iterator_apply ($iterator, $function, array $args = null) {} +function iterator_apply(Traversable $iterator, callable $callback, ?array $args): int {} // End of SPL v.0.2 /** * Return the traits used by the given class - * @param mixed $class An object (class instance) or a string (class name). + * @param object|string $object_or_class An object (class instance) or a string (class name). * @param bool $autoload Whether to allow this function to load the class automatically through the __autoload() magic method. - * @return array Array on success, or FALSE on error. + * @return string[]|false An array on success, or false on error. * @link https://php.net/manual/en/function.class-uses.php * @see class_parents() * @see get_declared_traits() * @since 5.4 */ -function class_uses($class, bool $autoload = true ) {} +function class_uses($object_or_class, bool $autoload = true): array|false {} /** - * @param object $obj + * return the integer object handle for given object + * @param object $object * @return int * @since 7.2 */ -function spl_object_id($obj) {} - -?> +function spl_object_id(object $object): int {} diff --git a/SQLite/SQLite.php b/SQLite/SQLite.php index 285b3e1aa..21613d692 100644 --- a/SQLite/SQLite.php +++ b/SQLite/SQLite.php @@ -1,545 +1,555 @@ The filename of the SQLite database. If the file does not exist, SQLite will attempt to create it. PHP must have write permissions to the file if data is inserted, the database schema is modified or to create the database if it does not exist. - * @param $mode [optional]The mode of the file. Intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value.
- * @param $error_message [optional]Passed by reference and is set to hold a descriptive error message explaining why the database could not be opened if there was an error.
- */ - final public function __construct ($filename, $mode = 0666, &$error_message) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * @link https://php.net/manual/en/function.sqlite-query.php - * @param $query- * The query to be executed. - *
- *- * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. - *
- * @param $result_type [optional] - *The optional result_type parameter accepts a constant and determines how the returned array will be indexed. Using SQLITE_ASSOC will return only associative indices (named fields) while SQLITE_NUM will return only numerical indices (ordinal field numbers). SQLITE_BOTH will return both associative and numerical indices. SQLITE_BOTH is the default for this function.
- * @param $error_message [optional]The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the {@see sqlite_last_error()} function.
- * @return resource|false- * This function will return a result handle or FALSE on failure. - * For queries that return rows, the result handle can then be used with - * functions such as {@see sqlite_fetch_array()} and - * {@see sqlite_seek()}. - *
- *- * Regardless of the query type, this function will return FALSE if the - * query failed. - *
- *- * {@see sqlite_query()} returns a buffered, seekable result - * handle. This is useful for reasonably small queries where you need to - * be able to randomly access the rows. Buffered result handles will - * allocate memory to hold the entire result and will not return until it - * has been fetched. If you only need sequential access to the data, it is - * recommended that you use the much higher performance - * {@see sqlite_unbuffered_query()} instead. - *
- */ - public function query ($query, $result_type, &$error_message) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * @link https://php.net/manual/en/function.sqlite-exec.php - * @param string $query- * The query to be executed. - *
- *- * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. - *
- * @param string $error_message [optional]The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the - * {@see sqlite_last_error()} function.
- * @return bool- * This function will return a boolean result; TRUE for success or FALSE for failure. - * If you need to run a query that returns rows, see {@see sqlite_query()}. - *
- *The column names returned by - * SQLITE_ASSOC and SQLITE_BOTH will be - * case-folded according to the value of the - * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration - * option.
- */ - public function queryExec ($query, &$error_message) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Execute a query against a given database and returns an array - * @link https://php.net/manual/en/function.sqlite-array-query.php - * @param $query- * The query to be executed. - *
- *- * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. - *
- * @param $result_type [optional]The optional result_type - * parameter accepts a constant and determines how the returned array will be - * indexed. Using SQLITE_ASSOC will return only associative - * indices (named fields) while SQLITE_NUM will return - * only numerical indices (ordinal field numbers). SQLITE_BOTH - * will return both associative and numerical indices. - * SQLITE_BOTH is the default for this function.
- * @param $decode_binary [optional]When the decode_binary - * parameter is set to TRUE (the default), PHP will decode the binary encoding - * it applied to the data if it was encoded using the - * {@see sqlite_escape_string()}. You should normally leave this - * value at its default, unless you are interoperating with databases created by - * other sqlite capable applications.
- *- * Returns an array of the entire result set; FALSE otherwise. - *
- *The column names returned by - * SQLITE_ASSOC and SQLITE_BOTH will be - * case-folded according to the value of the - * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration - * option.
- */ - public function arrayQuery ($query, $result_type, $decode_binary) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.1) - * Executes a query and returns either an array for one single column or the value of the first row - * @link https://php.net/manual/en/function.sqlite-single-query.php - * @param string $query - * @param bool $first_row_only [optional] - * @param bool $decode_binary [optional] - * @return array - */ - public function singleQuery ($query, $first_row_only, $decode_binary) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Execute a query that does not prefetch and buffer all data - * @link https://php.net/manual/en/function.sqlite-unbuffered-query.php - * @param $query- * The query to be executed. - *
- *- * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. - *
- * @param $result_type [optional]The optional result_type parameter accepts a constant and determines how the returned array will be indexed. - * Using SQLITE_ASSOC will return only associative indices (named fields) while SQLITE_NUM will return only numerical indices (ordinal field numbers). - * SQLITE_BOTH will return both associative and numerical indices. SQLITE_BOTH is the default for this function. - * @param $error_message [optional] - * @return resource Returns a result handle or FALSE on failure. - * {@see sqlite_unbuffered_query()} returns a sequential forward-only result set that can only be used to read each row, one after the other. - */ - public function unbufferedQuery ($query, $result_type = SQLITE_BOTH, &$error_message) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Returns the rowid of the most recently inserted row - * @link https://php.net/manual/en/function.sqlite-last-insert-rowid.php - * @return int Returns the row id, as an integer. - */ - public function lastInsertRowid () {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Returns the number of rows that were changed by the most recent SQL statement - * @link https://php.net/manual/en/function.sqlite-changes.php - * @return int Returns the number of changed rows. - */ - public function changes () {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Register an aggregating UDF for use in SQL statements - * @link https://php.net/manual/en/function.sqlite-create-aggregate.php - * @param $function_name
The name of the function used in SQL statements.
- * @param $step_funcCallback function called for each row of the result set. Function parameters are &$context, $value, ....
- * @param $finalize_funcCallback function to aggregate the "stepped" data from each row. Function parameter is &$context and the function should return the final result of aggregation.
- * @param $num_args [optional]Hint to the SQLite parser if the callback function accepts a predetermined number of arguments.
- */ - public function createAggregate ($function_name, $step_func, $finalize_func, $num_args = -1) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Registers a "regular" User Defined Function for use in SQL statements - * @link https://php.net/manual/en/function.sqlite-create-function.php - * @param $function_nameThe name of the function used in SQL statements.
- * @param $callback- * Callback function to handle the defined SQL function. - *
- *- * @param $num_args [optional]Note: - * Callback functions should return a type understood by SQLite (i.e. - * {@link https://php.net/manual/en/language.types.intro.php scalar type}). - *
- */ - public function createFunction ($function_name, $callback, $num_args = -1) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Set busy timeout duration, or disable busy handlers - * @link https://php.net/manual/en/function.sqlite-busy-timeout.php - * @param $millisecondsNote: Two alternative syntaxes are - * supported for compatibility with other database extensions (such as MySQL). - * The preferred form is the first, where the dbhandle - * parameter is the first parameter to the function.
The number of milliseconds. When set to 0, busy handlers will be disabled and SQLite will return immediately with a SQLITE_BUSY status code if another process/thread has the database locked for an update. - * PHP sets the default busy timeout to be 60 seconds when the database is opened.
- * @return intReturns an error code, or 0 if no error occurred.
- */ - public function busyTimeout ($milliseconds) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Returns the error code of the last error for a database - * @link https://php.net/manual/en/function.sqlite-last-error.php - * @return int Returns an error code, or 0 if no error occurred. - */ - public function lastError () {} - - /** - * (PHP 5 < 5.4.0) - * Return an array of column types from a particular table - * @link https://php.net/manual/en/function.sqlite-fetch-column-types.php - * @param $table_nameThe table name to query.
- * @param $result_type [optional]- * The optional result_type parameter accepts a - * constant and determines how the returned array will be indexed. Using - * SQLITE_ASSOC will return only associative indices - * (named fields) while SQLITE_NUM will return only - * numerical indices (ordinal field numbers). - * SQLITE_ASSOC is the default for - * this function. - *
- * @return array- * Returns an array of column data types; FALSE on error. - *
- *The column names returned by - * SQLITE_ASSOC and SQLITE_BOTH will be - * case-folded according to the value of the - * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration - * option.
- */ - public function fetchColumnTypes ($table_name, $result_type = SQLITE_ASSOC) {} - +class SQLiteDatabase +{ + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * @link https://php.net/manual/en/function.sqlite-open.php + * @param string $filenameThe filename of the SQLite database. If the file does not exist, SQLite will attempt to create it. PHP must have write permissions to the file if data is inserted, the database schema is modified or to create the database if it does not exist.
+ * @param int $mode [optional]The mode of the file. Intended to be used to open the database in read-only mode. Presently, this parameter is ignored by the sqlite library. The default value for mode is the octal value 0666 and this is the recommended value.
+ * @param string &$error_message [optional]Passed by reference and is set to hold a descriptive error message explaining why the database could not be opened if there was an error.
+ */ + final public function __construct($filename, $mode = 0666, &$error_message) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * @link https://php.net/manual/en/function.sqlite-query.php + * @param string $query+ * The query to be executed. + *
+ *+ * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. + *
+ * @param int $result_type [optional] + *The optional result_type parameter accepts a constant and determines how the returned array will be indexed. Using SQLITE_ASSOC will return only associative indices (named fields) while SQLITE_NUM will return only numerical indices (ordinal field numbers). SQLITE_BOTH will return both associative and numerical indices. SQLITE_BOTH is the default for this function.
+ * @param string &$error_message [optional]The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the {@see sqlite_last_error()} function.
+ * @return resource|false+ * This function will return a result handle or FALSE on failure. + * For queries that return rows, the result handle can then be used with + * functions such as {@see sqlite_fetch_array()} and + * {@see sqlite_seek()}. + *
+ *+ * Regardless of the query type, this function will return FALSE if the + * query failed. + *
+ *+ * {@see sqlite_query()} returns a buffered, seekable result + * handle. This is useful for reasonably small queries where you need to + * be able to randomly access the rows. Buffered result handles will + * allocate memory to hold the entire result and will not return until it + * has been fetched. If you only need sequential access to the data, it is + * recommended that you use the much higher performance + * {@see sqlite_unbuffered_query()} instead. + *
+ */ + public function query($query, $result_type, &$error_message) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * @link https://php.net/manual/en/function.sqlite-exec.php + * @param string $query+ * The query to be executed. + *
+ *+ * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. + *
+ * @param string &$error_message [optional]The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched using the + * {@see sqlite_last_error()} function.
+ * @return bool+ * This function will return a boolean result; TRUE for success or FALSE for failure. + * If you need to run a query that returns rows, see {@see sqlite_query()}. + *
+ *The column names returned by + * SQLITE_ASSOC and SQLITE_BOTH will be + * case-folded according to the value of the + * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration + * option.
+ */ + public function queryExec($query, &$error_message) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Execute a query against a given database and returns an array + * @link https://php.net/manual/en/function.sqlite-array-query.php + * @param string $query+ * The query to be executed. + *
+ *+ * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. + *
+ * @param int $result_type [optional]The optional result_type + * parameter accepts a constant and determines how the returned array will be + * indexed. Using SQLITE_ASSOC will return only associative + * indices (named fields) while SQLITE_NUM will return + * only numerical indices (ordinal field numbers). SQLITE_BOTH + * will return both associative and numerical indices. + * SQLITE_BOTH is the default for this function.
+ * @param bool $decode_binary [optional]When the decode_binary + * parameter is set to TRUE (the default), PHP will decode the binary encoding + * it applied to the data if it was encoded using the + * {@see sqlite_escape_string()}. You should normally leave this + * value at its default, unless you are interoperating with databases created by + * other sqlite capable applications.
+ *+ * @return array|false + * Returns an array of the entire result set; FALSE otherwise. + *
+ *The column names returned by + * SQLITE_ASSOC and SQLITE_BOTH will be + * case-folded according to the value of the + * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration + * option.
+ */ + public function arrayQuery($query, $result_type, $decode_binary) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.1) + * Executes a query and returns either an array for one single column or the value of the first row + * @link https://php.net/manual/en/function.sqlite-single-query.php + * @param string $query + * @param bool $first_row_only [optional] + * @param bool $decode_binary [optional] + * @return array + */ + public function singleQuery($query, $first_row_only, $decode_binary) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Execute a query that does not prefetch and buffer all data + * @link https://php.net/manual/en/function.sqlite-unbuffered-query.php + * @param string $query+ * The query to be executed. + *
+ *+ * Data inside the query should be {@link https://php.net/manual/en/function.sqlite-escape-string.php properly escaped}. + *
+ * @param int $result_type [optional]The optional result_type parameter accepts a constant and determines how the returned array will be indexed. + * Using SQLITE_ASSOC will return only associative indices (named fields) while SQLITE_NUM will return only numerical indices (ordinal field numbers). + * SQLITE_BOTH will return both associative and numerical indices. SQLITE_BOTH is the default for this function. + *
+ * @param string &$error_message [optional] + * @return resource Returns a result handle or FALSE on failure. + * {@see sqlite_unbuffered_query()} returns a sequential forward-only result set that can only be used to read each row, one after the other. + */ + public function unbufferedQuery($query, $result_type = SQLITE_BOTH, &$error_message = null) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Returns the rowid of the most recently inserted row + * @link https://php.net/manual/en/function.sqlite-last-insert-rowid.php + * @return int Returns the row id, as an integer. + */ + public function lastInsertRowid() {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Returns the number of rows that were changed by the most recent SQL statement + * @link https://php.net/manual/en/function.sqlite-changes.php + * @return int Returns the number of changed rows. + */ + public function changes() {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Register an aggregating UDF for use in SQL statements + * @link https://php.net/manual/en/function.sqlite-create-aggregate.php + * @param string $function_nameThe name of the function used in SQL statements.
+ * @param callable $step_funcCallback function called for each row of the result set. Function parameters are &$context, $value, ....
+ * @param callable $finalize_funcCallback function to aggregate the "stepped" data from each row. Function parameter is &$context and the function should return the final result of aggregation.
+ * @param int $num_args [optional]Hint to the SQLite parser if the callback function accepts a predetermined number of arguments.
+ */ + public function createAggregate($function_name, $step_func, $finalize_func, $num_args = -1) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Registers a "regular" User Defined Function for use in SQL statements + * @link https://php.net/manual/en/function.sqlite-create-function.php + * @param string $function_nameThe name of the function used in SQL statements.
+ * @param callable $callback+ * Callback function to handle the defined SQL function. + *
+ *+ * @param int $num_args [optional]Note: + * Callback functions should return a type understood by SQLite (i.e. + * {@link https://php.net/manual/en/language.types.intro.php scalar type}). + *
+ */ + public function createFunction($function_name, $callback, $num_args = -1) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Set busy timeout duration, or disable busy handlers + * @link https://php.net/manual/en/function.sqlite-busy-timeout.php + * @param int $millisecondsNote: Two alternative syntaxes are + * supported for compatibility with other database extensions (such as MySQL). + * The preferred form is the first, where the dbhandle + * parameter is the first parameter to the function.
The number of milliseconds. When set to 0, busy handlers will be disabled and SQLite will return immediately with a SQLITE_BUSY status code if another process/thread has the database locked for an update. + * PHP sets the default busy timeout to be 60 seconds when the database is opened.
+ * @return intReturns an error code, or 0 if no error occurred.
+ */ + public function busyTimeout($milliseconds) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Returns the error code of the last error for a database + * @link https://php.net/manual/en/function.sqlite-last-error.php + * @return int Returns an error code, or 0 if no error occurred. + */ + public function lastError() {} + + /** + * (PHP 5 < 5.4.0) + * Return an array of column types from a particular table + * @link https://php.net/manual/en/function.sqlite-fetch-column-types.php + * @param string $table_nameThe table name to query.
+ * @param int $result_type [optional]+ * The optional result_type parameter accepts a + * constant and determines how the returned array will be indexed. Using + * SQLITE_ASSOC will return only associative indices + * (named fields) while SQLITE_NUM will return only + * numerical indices (ordinal field numbers). + * SQLITE_ASSOC is the default for + * this function. + *
+ * @return array+ * Returns an array of column data types; FALSE on error. + *
+ *The column names returned by + * SQLITE_ASSOC and SQLITE_BOTH will be + * case-folded according to the value of the + * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration + * option.
+ */ + public function fetchColumnTypes($table_name, $result_type = SQLITE_ASSOC) {} } /** * @link https://php.net/manual/en/ref.sqlite.php */ -final class SQLiteResult implements Iterator, Countable { - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Fetches the next row from a result set as an array - * @link https://php.net/manual/en/function.sqlite-fetch-array.php - * @param $result_type [optional] - *- * The optional result_type - * parameter accepts a constant and determines how the returned array will be - * indexed. Using SQLITE_ASSOC will return only associative - * indices (named fields) while SQLITE_NUM will return - * only numerical indices (ordinal field numbers). SQLITE_BOTH - * will return both associative and numerical indices. - * SQLITE_BOTH is the default for this function. - * @param $decode_binary [optional]
When the decode_binary - * parameter is set to TRUE (the default), PHP will decode the binary encoding - * it applied to the data if it was encoded using the - *{@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}. You should normally leave this - * value at its default, unless you are interoperating with databases created by - * other sqlite capable applications.
- * @return array- * Returns an array of the next row from a result set; FALSE if the - * next position is beyond the final row. - *
- *The column names returned by - * SQLITE_ASSOC and SQLITE_BOTH will be - * case-folded according to the value of the - * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration - * option.
- */ - public function fetch ($result_type = SQLITE_BOTH, $decode_binary = true) {} - - /** - * (PHP 5 < 5.4.0) - * Fetches the next row from a result set as an object - * @link https://php.net/manual/en/function.sqlite-fetch-object.php - * @param string $class_name [optional] - * @param array $ctor_params [optional] - * @param bool $decode_binary [optional] - * @return object - */ - public function fetchObject ($class_name, $ctor_params, $decode_binary = true) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.1) - * Fetches the first column of a result set as a string - * @link https://php.net/manual/en/function.sqlite-fetch-single.php - * @param bool $decode_binary [optional] - * @return stringReturns the first column value, as a string.
- */ - public function fetchSingle ($decode_binary = true) {} - - /** - * (PHP 5 < 5.4.0) - * Fetches the next row from a result set as an object - * @link https://php.net/manual/en/function.sqlite-fetch-object.php - * @param resource $result_type [optional] - * @param array $ctor_params [optional] - * @param bool $decode_binary [optional] - * @return object - */ - public function fetchAll ($result_type, array $ctor_params, $decode_binary = true) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Fetches a column from the current row of a result set - * @link https://php.net/manual/en/function.sqlite-column.php - * @param $index_or_name - * @param $decode_binary [optional]When the decode_binary - * parameter is set to TRUE (the default), PHP will decode the binary encoding - * it applied to the data if it was encoded using the - * {@see sqlite_escape_string()}. You should normally leave this - * value at its default, unless you are interoperating with databases created by - * other sqlite capable applications.
- * @return mixedReturns the column value
- */ - public function column ($index_or_name, $decode_binary = true) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Returns the number of fields in a result set - * @link https://php.net/manual/en/function.sqlite-num-fields.php - * @return intReturns the number of fields, as an integer.
- */ - public function numFields () {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Returns the name of a particular field - * @link https://php.net/manual/en/function.sqlite-field-name.php - * @param $field_indexThe ordinal column number in the result set.
- * @return string- * Returns the name of a field in an SQLite result set, given the ordinal - * column number; FALSE on error. - *
- *The column names returned by - * SQLITE_ASSOC and SQLITE_BOTH will be - * case-folded according to the value of the - * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}configuration - * option.
- * - */ - public function fieldName ($field_index) {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Fetches the current row from a result set as an array - * @link https://php.net/manual/en/function.sqlite-current.php - * @param $result_type [optional]The optional result_type - * parameter accepts a constant and determines how the returned array will be - * indexed. Using SQLITE_ASSOC will return only associative - * indices (named fields) while SQLITE_NUM will return - * only numerical indices (ordinal field numbers). SQLITE_BOTH - * will return both associative and numerical indices. - * SQLITE_BOTH is the default for this function.
- * @param $decode_binary [optional]When the decode_binary - * parameter is set to TRUE (the default), PHP will decode the binary encoding - * it applied to the data if it was encoded using the - * {@see sqlite_escape_string()}. You should normally leave this - * value at its default, unless you are interoperating with databases created by - * other sqlite capable applications.
- * @return array- * Returns an array of the current row from a result set; FALSE if the - * current position is beyond the final row. - *
- *The column names returned by - * SQLITE_ASSOC and SQLITE_BOTH will be - * case-folded according to the value of the - * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration - * option.
- */ - public function current ($result_type = SQLITE_BOTH , $decode_binary = true) {} - /** - * Return the key of the current element - * @link https://php.net/manual/en/iterator.key.php - * @return mixed scalar on success, or null on failure. - * @since 5.0.0 - */ - public function key () {} - /** - * Seek to the next row number - * @link https://php.net/manual/en/function.sqlite-next.php - * @return bool Returns TRUE on success, or FALSE if there are no more rows. - * @since 5.0.0 - */ - public function next () {} - /** - * Checks if current position is valid - * @link https://php.net/manual/en/iterator.valid.php - * @return bool- * Returns TRUE if there are more rows available from the - * result handle, or FALSE otherwise. - *
- * @since 5.0.0 - */ - public function valid () {} - /** - * Rewind the Iterator to the first element - * @link https://php.net/manual/en/iterator.rewind.php - * @return void Any returned value is ignored. - * @since 5.0.0 - */ - public function rewind () {} - - /** - * Count elements of an object - * @link https://php.net/manual/en/countable.count.php - * @return intThe custom count as an integer. - *
- *- * The return value is cast to an integer. - *
- * @since 5.1.0 - */ - public function count () {} - - /** - * Seek to the previous row number of a result set - * @link https://php.net/manual/en/function.sqlite-prev.php - * @return boolReturns TRUE on success, or FALSE if there are no more previous rows. - *
- * @since 5.4.0 - */ - public function prev () {} - - /** - *@since 5.4.0 - * Returns whether or not a previous row is available - * @link https://php.net/manual/en/function.sqlite-has-prev.php - * @return bool- * Returns TRUE if there are more previous rows available from the - * result handle, or FALSE otherwise. - *
- */ - public function hasPrev () {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Returns the number of rows in a buffered result set - * @link https://php.net/manual/en/function.sqlite-num-rows.php - * @return int Returns the number of rows, as an integer. - */ - public function numRows () {} - - /** - * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) - * Seek to a particular row number of a buffered result set - * @link https://php.net/manual/en/function.sqlite-seek.php - * @param $row - *- * The ordinal row number to seek to. The row number is zero-based (0 is - * the first row). - *
- *- */ - public function seek ($row) {} - +final class SQLiteResult implements Iterator, Countable +{ + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Fetches the next row from a result set as an array + * @link https://php.net/manual/en/function.sqlite-fetch-array.php + * @param int $result_type [optional] + *Note:
This function cannot be used with - * unbuffered result handles.
+ * The optional result_type + * parameter accepts a constant and determines how the returned array will be + * indexed. Using SQLITE_ASSOC will return only associative + * indices (named fields) while SQLITE_NUM will return + * only numerical indices (ordinal field numbers). SQLITE_BOTH + * will return both associative and numerical indices. + * SQLITE_BOTH is the default for this function. + *
+ * @param bool $decode_binary [optional]When the decode_binary + * parameter is set to TRUE (the default), PHP will decode the binary encoding + * it applied to the data if it was encoded using the + * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}. You should normally leave this + * value at its default, unless you are interoperating with databases created by + * other sqlite capable applications.
+ * @return array + *+ * Returns an array of the next row from a result set; FALSE if the + * next position is beyond the final row. + *
+ *The column names returned by + * SQLITE_ASSOC and SQLITE_BOTH will be + * case-folded according to the value of the + * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration + * option.
+ */ + public function fetch($result_type = SQLITE_BOTH, $decode_binary = true) {} + + /** + * (PHP 5 < 5.4.0) + * Fetches the next row from a result set as an object + * @link https://php.net/manual/en/function.sqlite-fetch-object.php + * @param string $class_name [optional] + * @param array $ctor_params [optional] + * @param bool $decode_binary [optional] + * @return object + */ + public function fetchObject($class_name, $ctor_params, $decode_binary = true) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.1) + * Fetches the first column of a result set as a string + * @link https://php.net/manual/en/function.sqlite-fetch-single.php + * @param bool $decode_binary [optional] + * @return stringReturns the first column value, as a string.
+ */ + public function fetchSingle($decode_binary = true) {} + + /** + * (PHP 5 < 5.4.0) + * Fetches the next row from a result set as an object + * @link https://www.php.net/manual/en/function.sqlite-fetch-all.php + * @param int $result_type [optional]+ * The optional result_type parameter accepts a constant and determines how the returned array will be indexed. + * Using SQLITE_ASSOC will return only associative indices (named fields) while SQLITE_NUM will return only numerical indices (ordinal field numbers). + * {@see SQLITE_BOTH} will return both associative and numerical indices. {@see SQLITE_BOTH} is the default for this function.
+ * @param bool $decode_binary [optional]When the decode_binary parameter is set to TRUE (the default), + * PHP will decode the binary encoding it applied to the data if it was encoded using the {@see sqlite_escape_string()}. + * You should normally leave this value at its default, unless you are interoperating with databases created by other sqlite capable applications.
+ * @return object + */ + public function fetchAll($result_type, $decode_binary = true) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Fetches a column from the current row of a result set + * @link https://php.net/manual/en/function.sqlite-column.php + * @param $index_or_name + * @param $decode_binary [optional]When the decode_binary + * parameter is set to TRUE (the default), PHP will decode the binary encoding + * it applied to the data if it was encoded using the + * {@see sqlite_escape_string()}. You should normally leave this + * value at its default, unless you are interoperating with databases created by + * other sqlite capable applications.
+ * @return mixedReturns the column value
+ */ + public function column($index_or_name, $decode_binary = true) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Returns the number of fields in a result set + * @link https://php.net/manual/en/function.sqlite-num-fields.php + * @return intReturns the number of fields, as an integer.
+ */ + public function numFields() {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Returns the name of a particular field + * @link https://php.net/manual/en/function.sqlite-field-name.php + * @param int $field_indexThe ordinal column number in the result set.
+ * @return string+ * Returns the name of a field in an SQLite result set, given the ordinal + * column number; FALSE on error. + *
+ *The column names returned by + * SQLITE_ASSOC and SQLITE_BOTH will be + * case-folded according to the value of the + * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}configuration + * option.
+ */ + public function fieldName($field_index) {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Fetches the current row from a result set as an array + * @link https://php.net/manual/en/function.sqlite-current.php + * @param int $result_type [optional]The optional result_type + * parameter accepts a constant and determines how the returned array will be + * indexed. Using {@see SQLITE_ASSOC} will return only associative + * indices (named fields) while {@see SQLITE_NUM} will return + * only numerical indices (ordinal field numbers). SQLITE_BOTH + * will return both associative and numerical indices. + * {@see SQLITE_BOTH} is the default for this function.
+ * @param bool $decode_binary [optional]When the decode_binary + * parameter is set to TRUE (the default), PHP will decode the binary encoding + * it applied to the data if it was encoded using the + * {@see sqlite_escape_string()}. You should normally leave this + * value at its default, unless you are interoperating with databases created by + * other sqlite capable applications.
+ * @return array+ * Returns an array of the current row from a result set; FALSE if the + * current position is beyond the final row. + *
+ *The column names returned by + * SQLITE_ASSOC and SQLITE_BOTH will be + * case-folded according to the value of the + * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration + * option.
+ */ + public function current($result_type = SQLITE_BOTH, $decode_binary = true) {} + + /** + * Return the key of the current element + * @link https://php.net/manual/en/iterator.key.php + * @return mixed scalar on success, or null on failure. + * @since 5.0.0 + */ + public function key() {} + + /** + * Seek to the next row number + * @link https://php.net/manual/en/function.sqlite-next.php + * @return bool Returns TRUE on success, or FALSE if there are no more rows. + * @since 5.0.0 + */ + public function next() {} + + /** + * Checks if current position is valid + * @link https://php.net/manual/en/iterator.valid.php + * @return bool+ * Returns TRUE if there are more rows available from the + * result handle, or FALSE otherwise. + *
+ * @since 5.0.0 + */ + public function valid() {} + + /** + * Rewind the Iterator to the first element + * @link https://php.net/manual/en/iterator.rewind.php + * @return void Any returned value is ignored. + * @since 5.0.0 + */ + public function rewind() {} + + /** + * Count elements of an object + * @link https://php.net/manual/en/countable.count.php + * @return intThe custom count as an integer. + *
+ *+ * The return value is cast to an integer. + *
+ * @since 5.1.0 + */ + public function count() {} + + /** + * Seek to the previous row number of a result set + * @link https://php.net/manual/en/function.sqlite-prev.php + * @return boolReturns TRUE on success, or FALSE if there are no more previous rows. + *
+ * @since 5.4.0 + */ + public function prev() {} + + /** + *@since 5.4.0 + * Returns whether or not a previous row is available + * @link https://php.net/manual/en/function.sqlite-has-prev.php + * @return bool+ * Returns TRUE if there are more previous rows available from the + * result handle, or FALSE otherwise. + *
+ */ + public function hasPrev() {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Returns the number of rows in a buffered result set + * @link https://php.net/manual/en/function.sqlite-num-rows.php + * @return int Returns the number of rows, as an integer. + */ + public function numRows() {} + + /** + * (PHP 5 < 5.4.0, PECL sqlite >= 1.0.0) + * Seek to a particular row number of a buffered result set + * @link https://php.net/manual/en/function.sqlite-seek.php + * @param $row + *+ * The ordinal row number to seek to. The row number is zero-based (0 is + * the first row). + *
+ *+ */ + public function seek($row) {} } /** * Represents an unbuffered SQLite result set. Unbuffered results sets are sequential, forward-seeking only. * @link https://php.net/manual/en/ref.sqlite.php */ -final class SQLiteUnbuffered { - - /** - * @param $result_type [optional] - * @param $decode_binary [optional] - */ - public function fetch ($result_type, $decode_binary) {} - - /** - * @param $class_name [optional] - * @param $ctor_params [optional] - * @param $decode_binary [optional] - */ - public function fetchObject ($class_name, $ctor_params, $decode_binary) {} - - /** - * @param $decode_binary [optional] - */ - public function fetchSingle ($decode_binary) {} - - /** - * @param $result_type [optional] - * @param $decode_binary [optional] - */ - public function fetchAll ($result_type, $decode_binary) {} - - /** - * @param $index_or_name - * @param $decode_binary [optional] - */ - public function column ($index_or_name, $decode_binary) {} - - public function numFields () {} - - /** - * @param $field_index - */ - public function fieldName ($field_index) {} - - /** - * @param $result_type [optional] - * @param $decode_binary [optional] - */ - public function current ($result_type, $decode_binary) {} - - public function next () {} - - public function valid () {} - +final class SQLiteUnbuffered +{ + /** + * @param int $result_type [optional] + * @param bool $decode_binary [optional] + */ + public function fetch($result_type, $decode_binary) {} + + /** + * @link https://www.php.net/manual/en/function.sqlite-fetch-object.php + * @param string $class_name [optional] + * @param array $ctor_params [optional] + * @param bool $decode_binary [optional] + */ + public function fetchObject($class_name, $ctor_params, $decode_binary) {} + + /** + * @param bool $decode_binary [optional] + */ + public function fetchSingle($decode_binary) {} + + /** + * @param int $result_type [optional] + * @param bool $decode_binary [optional] + */ + public function fetchAll($result_type, $decode_binary) {} + + /** + * @param $index_or_name + * @param $decode_binary [optional] + */ + public function column($index_or_name, $decode_binary) {} + + public function numFields() {} + + /** + * @param int $field_index + */ + public function fieldName($field_index) {} + + /** + * @param int $result_type [optional] + * @param bool $decode_binary [optional] + */ + public function current($result_type, $decode_binary) {} + + public function next() {} + + public function valid() {} } -final class SQLiteException extends RuntimeException { - protected $message; - protected $code; - protected $file; - protected $line; - - - /** - * Clone the exception - * @link https://php.net/manual/en/exception.clone.php - * @return void - * @since 5.1.0 - */ - final private function __clone () {} - - /** - * Construct the exception - * @link https://php.net/manual/en/exception.construct.php - * @param $message [optional] - * @param $code [optional] - * @param $previous [optional] - * @since 5.1.0 - */ - public function __construct ($message, $code, $previous) {} - - /** - * String representation of the exception - * @link https://php.net/manual/en/exception.tostring.php - * @return string the string representation of the exception. - * @since 5.1.0 - */ - public function __toString () {} - +final class SQLiteException extends RuntimeException +{ + protected $message; + protected $code; + protected $file; + protected $line; + + /** + * Clone the exception + * @link https://php.net/manual/en/exception.clone.php + * @return void + * @since 5.1.0 + */ + final private function __clone() {} + + /** + * Construct the exception + * @link https://php.net/manual/en/exception.construct.php + * @param $message [optional] + * @param $code [optional] + * @param $previous [optional] + * @since 5.1.0 + */ + #[Pure] + public function __construct($message, $code, $previous) {} + + /** + * String representation of the exception + * @link https://php.net/manual/en/exception.tostring.php + * @return string the string representation of the exception. + * @since 5.1.0 + */ + public function __toString() {} } /** @@ -558,13 +568,13 @@ public function __toString () {} * library. The default value for mode is the octal value * 0666 and this is the recommended value. * - * @param string $error_message [optional]Note:
This function cannot be used with + * unbuffered result handles.
+ * @param string &$error_message [optional]
* Passed by reference and is set to hold a descriptive error message * explaining why the database could not be opened if there was an error. *
* @return resource|false a resource (database handle) on success, false on error. */ -function sqlite_open ($filename, $mode = null, &$error_message = null) {} +function sqlite_open($filename, $mode = null, &$error_message = null) {} /** * (PHP 5, PECL sqlite >= 1.0.0)+ * @param string &$error_message [optional]
* Passed by reference and is set to hold a descriptive error message * explaining why the database could not be opened if there was an error. *
* @return resource|falsea resource (database handle) on success, false on error.
*/ -function sqlite_popen ($filename, $mode = null, &$error_message = null) {} +function sqlite_popen($filename, $mode = null, &$error_message = null) {} /** * (PHP 5, PECL sqlite >= 1.0.0)The optional result_type + * @param int $result_type [optional]
The optional result_type * parameter accepts a constant and determines how the returned array will be * indexed. Using SQLITE_ASSOC will return only associative * indices (named fields) while SQLITE_NUM will return * only numerical indices (ordinal field numbers). SQLITE_BOTH * will return both associative and numerical indices. * SQLITE_BOTH is the default for this function.
- * @param mixed $error_msg [optional]+ * @param string &$error_msg [optional]
* The specified variable will be filled if an error occurs. This is
* specially important because SQL syntax errors can't be fetched using
* the
@@ -646,7 +656,7 @@ function sqlite_close ($dbhandle) {}
* recommended that you use the much higher performance
* {@see sqlite_unbuffered_query} instead.
*/
-function sqlite_query ($query, $dbhandle, $result_type = null, &$error_msg = SQLITE_BOTH) {}
+function sqlite_query($query, $dbhandle, $result_type = SQLITE_BOTH, &$error_msg = null) {}
/**
* (PHP 5, PECL sqlite >= 1.0.3)
@@ -663,7 +673,7 @@ function sqlite_query ($query, $dbhandle, $result_type = null, &$error_msg = SQL
* {@see sqlite_open()} when used procedurally. This parameter
* is not required when using the object-oriented method.
*
+ * @param string &$error_msg [optional]
* The specified variable will be filled if an error occurs. This is * specially important because SQL syntax errors can't be fetched using * the @@ -672,7 +682,7 @@ function sqlite_query ($query, $dbhandle, $result_type = null, &$error_msg = SQL * @return bool
This function will return a boolean result; true for success or false for failure. * If you need to run a query that returns rows, see sqlite_query.
*/ -function sqlite_exec ($dbhandle, $query, &$error_msg = null) {} +function sqlite_exec($dbhandle, $query, &$error_msg = null) {} /** * (PHP 5, PECL sqlite >= 1.0.0)The optional result_type + * @param int $result_type [optional]
The optional result_type * parameter accepts a constant and determines how the returned array will be * indexed. Using SQLITE_ASSOC will return only associative * indices (named fields) while SQLITE_NUM will return * only numerical indices (ordinal field numbers). SQLITE_BOTH * will return both associative and numerical indices. * SQLITE_BOTH is the default for this function.
- * @param bool $decode_binary [optional] &sqlite.decode-bin;When the decode_binary + * @param bool $decode_binary [optional]
When the decode_binary * parameter is set to TRUE (the default), PHP will decode the binary encoding * it applied to the data if it was encoded using the * {@link sqlite_escape_string()}. You should normally leave this @@ -710,7 +720,7 @@ function sqlite_exec ($dbhandle, $query, &$error_msg = null) {} * {@link php.net/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration * option.
*/ -function sqlite_array_query ($dbhandle, $query, $result_type = null, $decode_binary = null) {} +function sqlite_array_query($dbhandle, $query, $result_type = null, $decode_binary = null) {} /** * (PHP 5, PECL sqlite >= 1.0.1)The SQLite result resource. This parameter is not required when using the object-oriented method.
- * @param int $result_type [optional] &sqlite.result-type; - * @param bool $decode_binary [optional] &sqlite.decode-bin; + * @param int $result_type [optional] + * @param bool $decode_binary [optional] * @return array|falsean array of the next row from a result set; false if the * next position is beyond the final row.
*/ -function sqlite_fetch_array ($result, $result_type = SQLITE_BOTH, $decode_binary = null) {} +function sqlite_fetch_array($result, $result_type = SQLITE_BOTH, $decode_binary = null) {} /** * Fetches the next row from a result set as an object * @link https://php.net/manual/en/function.sqlite-fetch-object.php * @param resource $result - * @param string $class_name [optional] - * @param array $ctor_params [optional] - * @param bool $decode_binary [optional] + * @param string $class_name [optional] + * @param null|array $ctor_params [optional] + * @param bool $decode_binary [optional] * @return object - * @since 5.0 */ -function sqlite_fetch_object ($result, $class_name = null, array $ctor_params = null, $decode_binary = null) {} +function sqlite_fetch_object($result, $class_name = null, ?array $ctor_params = null, $decode_binary = null) {} /** * (PHP 5, PECL sqlite >= 1.0.1)the first column value, as a string.
*/ -function sqlite_fetch_single ($result, $decode_binary = null) {} +function sqlite_fetch_single($result, $decode_binary = null) {} /** * (PHP 5, PECL sqlite >= 1.0.0)The SQLite result resource. This parameter is not required when using the object-oriented method.
* @param bool $decode_binary [optional]When the decode_binary @@ -776,14 +786,14 @@ function sqlite_fetch_single ($result, $decode_binary = null) {} * other sqlite capable applications.
* @return stringthe first column value, as a string.
*/ -function sqlite_fetch_string ($result, $decode_binary) {} +function sqlite_fetch_string($result, $decode_binary) {} /** * (PHP 5, PECL sqlite >= 1.0.0)an array of the remaining rows in a result set. If called right * after * {@see sqlite_query}, it returns all rows. If called @@ -793,7 +803,7 @@ function sqlite_fetch_string ($result, $decode_binary) {} *
The column names returned by SQLITE_ASSOC and SQLITE_BOTH will be case-folded according to the value of the * {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case} configuration option.
*/ -function sqlite_fetch_all ($result_type = null, $decode_binary = null) {} +function sqlite_fetch_all($result_type = null, $decode_binary = null) {} /** * (PHP 5, PECL sqlite >= 1.0.0)+ * @param resource $result
* The SQLite result resource. This parameter is not required when using * the object-oriented method. *
@@ -873,7 +883,7 @@ function sqlite_last_insert_rowid ($dbhandle) {} * unbuffered result handles. * @return int the number of rows, as an integer. */ -function sqlite_num_rows ($result) {} +function sqlite_num_rows($result) {} /** * (PHP 5, PECL sqlite >= 1.0.0)The SQLite result resource. This parameter is not required when using the object-oriented method.
* @return int the number of fields, as an integer. */ -function sqlite_num_fields ($result) {} +function sqlite_num_fields($result) {} /** * (PHP 5, PECL sqlite >= 1.0.0)* @return bool true on success, or false if there are no more previous rows. - * @since 5.0 */ -function sqlite_prev ($result) {} +function sqlite_prev($result) {} /** * Returns whether more rows are available @@ -968,9 +977,8 @@ function sqlite_prev ($result) {} * unbuffered result handles. * @return bool TRUE if there are more rows available from the * result handle, or FALSE otherwise. - * @since 5.0 */ -function sqlite_valid ($result) {} +function sqlite_valid($result) {} /** * (PHP 5, PECL sqlite >= 1.0.0)Note:
This function cannot be used with * unbuffered result handles.
* Data inside the query should be properly escaped. *
- * @param int $result_type [optional] &sqlite.result-type; - * @param string $error_msg [optional]+ * @param int $result_type [optional] + * @param string &$error_msg [optional]
* The specified variable will be filled if an error occurs. This is * specially important because SQL syntax errors can't be fetched using * the sqlite_last_error function. *
* @return SQLiteUnbuffered|false a result handle or false on failure. - * ** sqlite_unbuffered_query returns a sequential * forward-only result set that can only be used to read each row, one after * the other. + *
*/ -function sqlite_unbuffered_query ($dbhandle, $query, $result_type = SQLITE_BOTH, &$error_msg = null) {} +function sqlite_unbuffered_query($dbhandle, $query, $result_type = SQLITE_BOTH, &$error_msg = null) {} /** * (PHP 5, PECL sqlite >= 1.0.0)The SQLite Database resource; returned from * {@see sqlite_open()} when used procedurally. - * This parameter is not required when using the object-oriented method. + * This parameter is not required when using the object-oriented method.
* @param string $function_name* The name of the function used in SQL statements. *
- * @param callback $step_func+ * @param callable $step_func
* Callback function called for each row of the result set. *
- * @param callback $finalize_func+ * @param callable $finalize_func
* Callback function to aggregate the "stepped" data from each row. *
* @param int $num_args [optional]@@ -1112,7 +1119,7 @@ function sqlite_unbuffered_query ($dbhandle, $query, $result_type = SQLITE_BOTH, *
* @return void */ -function sqlite_create_aggregate ($dbhandle, $function_name, $step_func, $finalize_func, $num_args = null) {} +function sqlite_create_aggregate($dbhandle, $function_name, $step_func, $finalize_func, $num_args = null) {} /** * (PHP 5, sqlite >= 1.0.0)The SQLite Database resource; returned from * {@see sqlite_open()} when used procedurally. - * This parameter is not required when using the object-oriented method. + * This parameter is not required when using the object-oriented method.
* @param string $function_name* The name of the function used in SQL statements. *
- * @param callback $callback+ * @param callable $callback
* Callback function to handle the defined SQL function. *
* Callback functions should return a type understood by SQLite (i.e. @@ -1135,7 +1142,7 @@ function sqlite_create_aggregate ($dbhandle, $function_name, $step_func, $finali * * @return void */ -function sqlite_create_function ($dbhandle, $function_name, $callback, $num_args = null) {} +function sqlite_create_function($dbhandle, $function_name, $callback, $num_args = null) {} /** * Opens a SQLite database and returns a SQLiteDatabase object @@ -1149,14 +1156,13 @@ function sqlite_create_function ($dbhandle, $function_name, $callback, $num_args * library. The default value for mode is the octal value * 0666 and this is the recommended value. * - * @param string $error_message [optional]+ * @param string &$error_message [optional]
* Passed by reference and is set to hold a descriptive error message * explaining why the database could not be opened if there was an error. *
- * @return SQLiteDatabase a SQLiteDatabase object on success, &null; on error. - * @since 5.0 + * @return SQLiteDatabase|null a SQLiteDatabase object on success, null on error. */ -function sqlite_factory ($filename, $mode = null, &$error_message = null) {} +function sqlite_factory($filename, $mode = null, &$error_message = null) {} /** * (PHP 5, PECL sqlite >= 1.0.0)* The encoded data that will be decoded, data that was applied by either * sqlite_udf_encode_binary or - * sqlite_escape_string. + * sqlite_escape_string. *
* @return string The decoded string. */ -function sqlite_udf_decode_binary ($data) {} +function sqlite_udf_decode_binary($data) {} /** * Return an array of column types from a particular table @@ -1202,205 +1208,194 @@ function sqlite_udf_decode_binary ($data) {} * this function. * * @return array|false an array of column data types; false on error. - * @since 5.0 */ -function sqlite_fetch_column_types ($dbhandle, $table_name, $result_type = null) {} - +function sqlite_fetch_column_types($dbhandle, $table_name, $result_type = null) {} /** * Columns are returned into the array having both a numerical index * and the field name as the array index. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_BOTH', 3); +define('SQLITE_BOTH', 3); /** * Columns are returned into the array having a numerical index to the * fields. This index starts with 0, the first field in the result. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_NUM', 2); +define('SQLITE_NUM', 2); /** * Columns are returned into the array having the field name as the array * index. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_ASSOC', 1); +define('SQLITE_ASSOC', 1); /** * Successful result. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_OK', 0); +define('SQLITE_OK', 0); /** * SQL error or missing database. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_ERROR', 1); +define('SQLITE_ERROR', 1); /** * An internal logic error in SQLite. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_INTERNAL', 2); +define('SQLITE_INTERNAL', 2); /** * Access permission denied. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_PERM', 3); +define('SQLITE_PERM', 3); /** * Callback routine requested an abort. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_ABORT', 4); +define('SQLITE_ABORT', 4); /** * The database file is locked. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_BUSY', 5); +define('SQLITE_BUSY', 5); /** * A table in the database is locked. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_LOCKED', 6); +define('SQLITE_LOCKED', 6); /** * Memory allocation failed. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_NOMEM', 7); +define('SQLITE_NOMEM', 7); /** * Attempt to write a readonly database. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_READONLY', 8); +define('SQLITE_READONLY', 8); /** * Operation terminated internally. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_INTERRUPT', 9); +define('SQLITE_INTERRUPT', 9); /** * Disk I/O error occurred. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_IOERR', 10); +define('SQLITE_IOERR', 10); /** * The database disk image is malformed. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_CORRUPT', 11); +define('SQLITE_CORRUPT', 11); /** * (Internal) Table or record not found. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_NOTFOUND', 12); +define('SQLITE_NOTFOUND', 12); /** * Insertion failed because database is full. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_FULL', 13); +define('SQLITE_FULL', 13); /** * Unable to open the database file. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_CANTOPEN', 14); +define('SQLITE_CANTOPEN', 14); /** * Database lock protocol error. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_PROTOCOL', 15); +define('SQLITE_PROTOCOL', 15); /** * (Internal) Database table is empty. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_EMPTY', 16); +define('SQLITE_EMPTY', 16); /** * The database schema changed. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_SCHEMA', 17); +define('SQLITE_SCHEMA', 17); /** * Too much data for one row of a table. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_TOOBIG', 18); +define('SQLITE_TOOBIG', 18); /** * Abort due to constraint violation. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_CONSTRAINT', 19); +define('SQLITE_CONSTRAINT', 19); /** * Data type mismatch. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_MISMATCH', 20); +define('SQLITE_MISMATCH', 20); /** * Library used incorrectly. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_MISUSE', 21); +define('SQLITE_MISUSE', 21); /** * Uses of OS features not supported on host. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_NOLFS', 22); +define('SQLITE_NOLFS', 22); /** * Authorized failed. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_AUTH', 23); +define('SQLITE_AUTH', 23); /** * File opened that is not a database file. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_NOTADB', 26); +define('SQLITE_NOTADB', 26); /** * Auxiliary database format error. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_FORMAT', 24); +define('SQLITE_FORMAT', 24); /** * Internal process has another row ready. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_ROW', 100); +define('SQLITE_ROW', 100); /** * Internal process has finished executing. * @link https://php.net/manual/en/sqlite.constants.php */ -define ('SQLITE_DONE', 101); - -/** - * Specifies that a function created with {@see SQLite3::createFunction()} is deterministic, - * i.e. it always returns the same result given the same inputs within a single SQL statement. - * @since 7.1.4 - * @link https://php.net/manual/en/sqlite.constants.php - */ -define('SQLITE3_DETERMINISTIC', 2048); - +define('SQLITE_DONE', 101); diff --git a/SaxonC/SaxonC.php b/SaxonC/SaxonC.php index 0240109ba..e86bab24e 100644 --- a/SaxonC/SaxonC.php +++ b/SaxonC/SaxonC.php @@ -1,11 +1,12 @@ 'string'], default: '')] $data, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $dataIsURL = false, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespaceOrPrefix = "", + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false + ) {} - /** + /** * Provides access to element's children - * @access private Method not callable directly, stub exists for typehint only + * private Method not callable directly, stub exists for typehint only * @param string $name child name - * @return SimpleXMLElement + * @return static */ private function __get($name) {} - /** - * Return a well-formed XML string based on SimpleXML element - * @link https://php.net/manual/en/simplexmlelement.asxml.php - * @param string $filename [optional]- * If specified, the function writes the data to the file rather than - * returning it. - *
- * @return mixed If the filename isn't specified, this function - * returns a string on success and FALSE on error. If the - * parameter is specified, it returns TRUE if the file was written - * successfully and FALSE otherwise. - * @since 5.0.1 - */ - public function asXML ($filename = null) {} - - /** - * Alias of SimpleXMLElement::asXML + /** + * Return a well-formed XML string based on SimpleXML element + * @link https://php.net/manual/en/simplexmlelement.asxml.php + * @param string $filename [optional]+ * If specified, the function writes the data to the file rather than + * returning it. + *
+ * @return string|bool If the filename isn't specified, this function + * returns a string on success and FALSE on error. If the + * parameter is specified, it returns TRUE if the file was written + * successfully and FALSE otherwise. + * @since 5.0.1 + */ + #[TentativeType] + public function asXML(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null): string|bool {} + + /** + * Alias of SimpleXMLElement::asXML * Return a well-formed XML string based on SimpleXML element - * @link https://php.net/manual/en/simplexmlelement.savexml.php + * @link https://php.net/manual/en/simplexmlelement.savexml.php * @param string $filename [optional]- * If specified, the function writes the data to the file rather than - * returning it. - *
- * @return mixed If the filename isn't specified, this function - * returns a string on success and false on error. If the - * parameter is specified, it returns true if the file was written - * successfully and false otherwise. - * @since 5.2 - */ - public function saveXML ($filename = null) {} - - /** - * Runs XPath query on XML data - * @link https://php.net/manual/en/simplexmlelement.xpath.php - * @param string $path- * An XPath path - *
- * @return SimpleXMLElement[] an array of SimpleXMLElement objects or FALSE in - * case of an error. - * @since 5.2 - */ - public function xpath ($path) {} - - /** - * Creates a prefix/ns context for the next XPath query - * @link https://php.net/manual/en/simplexmlelement.registerxpathnamespace.php - * @param string $prefix- * The namespace prefix to use in the XPath query for the namespace given in - * ns. - *
- * @param string $ns- * The namespace to use for the XPath query. This must match a namespace in - * use by the XML document or the XPath query using - * prefix will not return any results. - *
- * @return bool TRUE on success or FALSE on failure. - * @since 5.2 - */ - public function registerXPathNamespace ($prefix, $ns) {} - - /** - * Identifies an element's attributes - * @link https://php.net/manual/en/simplexmlelement.attributes.php - * @param string $ns [optional]- * An optional namespace for the retrieved attributes - *
- * @param bool $is_prefix [optional]- * Default to FALSE - *
- * @return SimpleXMLElement a SimpleXMLElement object that can be - * iterated over to loop through the attributes on the tag. - * - *- * Returns NULL if called on a SimpleXMLElement - * object that already represents an attribute and not a tag. - * @since 5.0.1 - */ - public function attributes ($ns = null, $is_prefix = false) {} - - /** - * Finds children of given node - * @link https://php.net/manual/en/simplexmlelement.children.php - * @param string $ns [optional]
- * An XML namespace. - *
- * @param bool $is_prefix [optional]- * If is_prefix is TRUE, - * ns will be regarded as a prefix. If FALSE, - * ns will be regarded as a namespace - * URL. - *
- * @return SimpleXMLElement a SimpleXMLElement element, whether the node - * has children or not. - * @since 5.0.1 - */ - public function children ($ns = null, $is_prefix = false) {} - - /** - * Returns namespaces used in document - * @link https://php.net/manual/en/simplexmlelement.getnamespaces.php - * @param bool $recursive [optional]- * If specified, returns all namespaces used in parent and child nodes. - * Otherwise, returns only namespaces used in root node. - *
- * @return array The getNamespaces method returns an array of - * namespace names with their associated URIs. - * @since 5.1.2 - */ - public function getNamespaces ($recursive = false) {} - - /** - * Returns namespaces declared in document - * @link https://php.net/manual/en/simplexmlelement.getdocnamespaces.php - * @param bool $recursive [optional]- * If specified, returns all namespaces declared in parent and child nodes. - * Otherwise, returns only namespaces declared in root node. - *
- * @param bool $from_root [optional]- * Allows you to recursively check namespaces under a child node instead of - * from the root of the XML doc. - *
- * @return array The getDocNamespaces method returns an array - * of namespace names with their associated URIs. - * @since 5.1.2 - */ - public function getDocNamespaces ($recursive = false, $from_root = true) {} - - /** - * Gets the name of the XML element - * @link https://php.net/manual/en/simplexmlelement.getname.php - * @return string The getName method returns as a string the - * name of the XML tag referenced by the SimpleXMLElement object. - * @since 5.1.3 - */ - public function getName () {} - - /** - * Adds a child element to the XML node - * @link https://php.net/manual/en/simplexmlelement.addchild.php - * @param string $name- * The name of the child element to add. - *
- * @param string $value [optional]- * If specified, the value of the child element. - *
- * @param string $namespace [optional]- * If specified, the namespace to which the child element belongs. - *
- * @return SimpleXMLElement The addChild method returns a SimpleXMLElement - * object representing the child added to the XML node. - * @since 5.1.3 - */ - public function addChild ($name, $value = null, $namespace = null) {} - - /** - * Adds an attribute to the SimpleXML element - * @link https://php.net/manual/en/simplexmlelement.addattribute.php - * @param string $name- * The name of the attribute to add. - *
- * @param string $value [optional]- * The value of the attribute. - *
- * @param string $namespace [optional]- * If specified, the namespace to which the attribute belongs. - *
- * @return void No value is returned. - * @since 5.1.3 - */ - public function addAttribute ($name, $value = null, $namespace = null) {} - - /** - * (No version information available, might only be in SVN)+ * An XPath path + *
+ * @return static[]|false|null an array of SimpleXMLElement objects or FALSE in + * case of an error. + */ + #[TentativeType] + public function xpath(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $expression): array|false|null {} + + /** + * Creates a prefix/ns context for the next XPath query + * @link https://php.net/manual/en/simplexmlelement.registerxpathnamespace.php + * @param string $prefix+ * The namespace prefix to use in the XPath query for the namespace given in + * ns. + *
+ * @param string $namespace+ * The namespace to use for the XPath query. This must match a namespace in + * use by the XML document or the XPath query using + * prefix will not return any results. + *
+ * @return bool TRUE on success or FALSE on failure. + */ + #[TentativeType] + public function registerXPathNamespace( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace + ): bool {} + + /** + * Identifies an element's attributes + * @link https://php.net/manual/en/simplexmlelement.attributes.php + * @param string $namespaceOrPrefix [optional]+ * An optional namespace for the retrieved attributes + *
+ * @param bool $isPrefix [optional]+ * Default to FALSE + *
+ * @return static|null a SimpleXMLElement object that can be + * iterated over to loop through the attributes on the tag. + * + *+ * Returns NULL if called on a SimpleXMLElement + * object that already represents an attribute and not a tag. + * @since 5.0.1 + */ + #[TentativeType] + public function attributes( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespaceOrPrefix = null, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false + ): ?static {} + + /** + * Finds children of given node + * @link https://php.net/manual/en/simplexmlelement.children.php + * @param string $namespaceOrPrefix [optional]
+ * An XML namespace. + *
+ * @param bool $isPrefix [optional]+ * If is_prefix is TRUE, + * ns will be regarded as a prefix. If FALSE, + * ns will be regarded as a namespace + * URL. + *
+ * @return static|null a SimpleXMLElement element, whether the node + * has children or not. + * @since 5.0.1 + */ + #[Pure] + #[TentativeType] + public function children( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespaceOrPrefix = null, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isPrefix = false + ): ?static {} + + /** + * Returns namespaces used in document + * @link https://php.net/manual/en/simplexmlelement.getnamespaces.php + * @param bool $recursive [optional]+ * If specified, returns all namespaces used in parent and child nodes. + * Otherwise, returns only namespaces used in root node. + *
+ * @return array The getNamespaces method returns an array of + * namespace names with their associated URIs. + * @since 5.1.2 + */ + #[Pure] + #[TentativeType] + public function getNamespaces(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $recursive = false): array {} + + /** + * Returns namespaces declared in document + * @link https://php.net/manual/en/simplexmlelement.getdocnamespaces.php + * @param bool $recursive [optional]+ * If specified, returns all namespaces declared in parent and child nodes. + * Otherwise, returns only namespaces declared in root node. + *
+ * @param bool $fromRoot [optional]+ * Allows you to recursively check namespaces under a child node instead of + * from the root of the XML doc. + *
+ * @return array The getDocNamespaces method returns an array + * of namespace names with their associated URIs. + * @since 5.1.2 + */ + #[Pure] + #[TentativeType] + public function getDocNamespaces( + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $recursive = false, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $fromRoot = true + ): array|false {} + + /** + * Gets the name of the XML element + * @link https://php.net/manual/en/simplexmlelement.getname.php + * @return string The getName method returns as a string the + * name of the XML tag referenced by the SimpleXMLElement object. + * @since 5.1.3 + */ + #[Pure] + #[TentativeType] + public function getName(): string {} + + /** + * Adds a child element to the XML node + * @link https://php.net/manual/en/simplexmlelement.addchild.php + * @param string $qualifiedName+ * The name of the child element to add. + *
+ * @param string $value [optional]+ * If specified, the value of the child element. + *
+ * @param string $namespace [optional]+ * If specified, the namespace to which the child element belongs. + *
+ * @return static|null The addChild method returns a SimpleXMLElement + * object representing the child added to the XML node. + * @since 5.1.3 + */ + #[TentativeType] + public function addChild( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace = null + ): ?static {} + + /** + * Adds an attribute to the SimpleXML element + * @link https://php.net/manual/en/simplexmlelement.addattribute.php + * @param string $qualifiedName+ * The name of the attribute to add. + *
+ * @param string $value+ * The value of the attribute. + *
+ * @param string $namespace [optional]+ * If specified, the namespace to which the attribute belongs. + *
+ * @return void No value is returned. + * @since 5.1.3 + */ + #[TentativeType] + public function addAttribute( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $value = null, + #[PhpStormStubsElementAvailable(from: '8.0')] string $value, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace = null + ): void {} + + /** + * Returns the string content + * @link https://php.net/manual/en/simplexmlelement.tostring.php + * @return string the string content on success or an empty string on failure. + * @since 5.3 + */ + #[TentativeType] + public function __toString(): string {} + + /** + * Counts the children of an element + * @link https://php.net/manual/en/simplexmlelement.count.php + * @return int<0,max> the number of elements of an element. + */ + #[Pure] + #[TentativeType] + public function count(): int {} /** * Class provides access to children by position, and attributes by name - * @access private Method not callable directly, stub exists for typehint only + * private Method not callable directly, stub exists for typehint only * @param string|int $offset * @return bool true on success or false on failure. */ - private function offsetExists ($offset) {} + #[Pure] + public function offsetExists($offset) {} /** * Class provides access to children by position, and attributes by name - * @access private Method not callable directly, stub exists for typehint only + * private Method not callable directly, stub exists for typehint only * @param string|int $offset - * @return SimpleXMLElement Either a named attribute or an element from a list of children + * @return static Either a named attribute or an element from a list of children */ - private function offsetGet ($offset) {} + #[Pure] + public function offsetGet($offset) {} /** * Class provides access to children by position, and attributes by name - * @access private Method not callable directly, stub exists for typehint only + * private Method not callable directly, stub exists for typehint only * @param string|int $offset * @param mixed $value * @return void */ - private function offsetSet ($offset, $value) {} + public function offsetSet($offset, $value) {} /** * Class provides access to children by position, and attributes by name - * @access private Method not callable directly, stub exists for typehint only + * private Method not callable directly, stub exists for typehint only * @param string|int $offset * @return void */ - private function offsetUnset ($offset) {} + public function offsetUnset($offset) {} + + /** + * Rewind to the first element + * @link https://php.net/manual/en/simplexmliterator.rewind.php + * @return void No value is returned. + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Check whether the current element is valid + * @link https://php.net/manual/en/simplexmliterator.valid.php + * @return bool TRUE if the current element is valid, otherwise FALSE + */ + #[Pure] + #[TentativeType] + public function valid(): bool {} + + /** + * Returns the current element + * @link https://php.net/manual/en/simplexmliterator.current.php + * @return static|null the current element as a SimpleXMLElement object or NULL on failure. + */ + #[Pure] + #[TentativeType] + public function current(): ?static {} + + /** + * Return current key + * @link https://php.net/manual/en/simplexmliterator.key.php + * @return string|false the XML tag name of the element referenced by the current SimpleXMLIterator object + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.0' => 'string'], default: 'string|false')] + public function key() {} + + /** + * Move to next element + * @link https://php.net/manual/en/simplexmliterator.next.php + * @return void No value is returned. + */ + #[TentativeType] + public function next(): void {} + + /** + * @return bool + * @since 8.0 + */ + #[Pure] + #[TentativeType] + public function hasChildren(): bool {} + + /** + * @since 8.0 + */ + #[Pure] + #[TentativeType] + public function getChildren(): ?SimpleXMLElement {} } /** * The SimpleXMLIterator provides recursive iteration over all nodes of a SimpleXMLElement object. * @link https://php.net/manual/en/class.simplexmliterator.php */ -class SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator, Countable { - - /** - * Rewind to the first element - * @link https://php.net/manual/en/simplexmliterator.rewind.php - * @return void No value is returned. - * @since 5.1 - */ - public function rewind () {} - - /** - * Check whether the current element is valid - * @link https://php.net/manual/en/simplexmliterator.valid.php - * @return bool TRUE if the current element is valid, otherwise FALSE - * @since 5.1 - */ - public function valid () {} - - /** - * Returns the current element - * @link https://php.net/manual/en/simplexmliterator.current.php - * @return mixed the current element as a SimpleXMLIterator object or NULL on failure. - * @since 5.1 - */ - public function current () {} - - /** - * Return current key - * @link https://php.net/manual/en/simplexmliterator.key.php - * @return mixed the XML tag name of the element referenced by the current SimpleXMLIterator object or FALSE - * @since 5.1 - */ - public function key () {} - - /** - * Move to next element - * @link https://php.net/manual/en/simplexmliterator.next.php - * @return void No value is returned. - * @since 5.1 - */ - public function next () {} - - /** - * Checks whether the current element has sub elements. - * @link https://php.net/manual/en/simplexmliterator.haschildren.php - * @return bool TRUE if the current element has sub-elements, otherwise FALSE - * @since 5.1 - */ - public function hasChildren () {} - - /** - * Returns the sub-elements of the current element - * @link https://php.net/manual/en/simplexmliterator.getchildren.php - * @return SimpleXMLIterator a SimpleXMLIterator object containing - * the sub-elements of the current element. - * @since 5.1 - */ - public function getChildren () {} - - /** - * (No version information available, might only be in SVN)* Libxml 2 unescapes the URI, so if you want to pass e.g. - * b&c as the URI parameter a, + * b&c as the URI parameter a, * you have to call * simplexml_load_file(rawurlencode('https://example.com/?a=' . - * urlencode('b&c'))). Since PHP 5.1.0 you don't need to do + * urlencode('b&c'))). Since PHP 5.1.0 you don't need to do * this because PHP will do it for you. *
- * @param string $class_name [optional]+ * @param string|null $class_name [optional]
* You may use this optional parameter so that * simplexml_load_file will return an object of * the specified class. That class should extend the @@ -355,18 +458,17 @@ public function count () {} * Since PHP 5.1.0 and Libxml 2.6.0, you may also use the * options parameter to specify additional Libxml parameters. *
- * @param string $ns [optional]+ * @param string $namespace_or_prefix [optional]
* Namespace prefix or URI. *
* @param bool $is_prefix [optional]* TRUE if ns is a prefix, FALSE if it's a URI; * defaults to FALSE. *
- * @return SimpleXMLElement an object of class SimpleXMLElement with + * @return SimpleXMLElement|false an object of class SimpleXMLElement with * properties containing the data held within the XML document, or FALSE on failure. - * @since 5.0 */ -function simplexml_load_file ($filename, $class_name = "SimpleXMLElement", $options = 0, $ns = "", $is_prefix = false) {} +function simplexml_load_file(string $filename, ?string $class_name = "SimpleXMLElement", int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {} /** * Interprets a string of XML into an object @@ -374,7 +476,7 @@ function simplexml_load_file ($filename, $class_name = "SimpleXMLElement", $opti * @param string $data* A well-formed XML string *
- * @param string $class_name [optional]+ * @param string|null $class_name [optional]
* You may use this optional parameter so that * simplexml_load_string will return an object of * the specified class. That class should extend the @@ -384,34 +486,32 @@ function simplexml_load_file ($filename, $class_name = "SimpleXMLElement", $opti * Since PHP 5.1.0 and Libxml 2.6.0, you may also use the * options parameter to specify additional Libxml parameters. *
- * @param string $ns [optional]+ * @param string $namespace_or_prefix [optional]
* Namespace prefix or URI. *
* @param bool $is_prefix [optional]* TRUE if ns is a prefix, FALSE if it's a URI; * defaults to FALSE. *
- * @return SimpleXMLElement an object of class SimpleXMLElement with + * @return SimpleXMLElement|false an object of class SimpleXMLElement with * properties containing the data held within the xml document, or FALSE on failure. - * @since 5.0 */ -function simplexml_load_string ($data, $class_name = "SimpleXMLElement", $options = 0, $ns = "", $is_prefix = false) {} +function simplexml_load_string(string $data, ?string $class_name = "SimpleXMLElement", int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {} /** * Get a SimpleXMLElement object from a DOM node. * @link https://php.net/manual/en/function.simplexml-import-dom.php - * @param DOMNode $node+ * @param SimpleXMLElement|DOMNode $node
* A DOM Element node *
- * @param string $class_name [optional]+ * @param string|null $class_name [optional]
* You may use this optional parameter so that * simplexml_import_dom will return an object of * the specified class. That class should extend the * SimpleXMLElement class. *
- * @return SimpleXMLElement a SimpleXMLElement or FALSE on failure. - * @since 5.0 + * @return SimpleXMLElement|null a SimpleXMLElement or FALSE on failure. */ -function simplexml_import_dom (DOMNode $node, $class_name = "SimpleXMLElement") {} +function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_name = "SimpleXMLElement"): ?SimpleXMLElement {} // End of SimpleXML v.0.1 diff --git a/SplType/SplType.php b/SplType/SplType.php index e80474974..d4b840d94 100644 --- a/SplType/SplType.php +++ b/SplType/SplType.php @@ -5,12 +5,13 @@ * * @link https://php.net/manual/en/class.spltype.php */ -abstract class SplType { +abstract class SplType +{ /** * @var null Default value * @link https://php.net/manual/en/class.spltype.php#spltype.constants.default */ - const __default = null; + public const __default = null; /** * Creates a new value of some type @@ -19,7 +20,7 @@ abstract class SplType { * @param bool $strict If set to true then will throw UnexpectedValueException if value of other type will be assigned. True by default * @link https://php.net/manual/en/spltype.construct.php */ - public function __construct ($initial_value = self::__default, $strict = true ){ } + public function __construct($initial_value = self::__default, $strict = true) {} } /** @@ -27,11 +28,12 @@ public function __construct ($initial_value = self::__default, $strict = true ){ * * @link https://php.net/manual/en/class.splint.php */ -class SplInt extends SplType { +class SplInt extends SplType +{ /** * @link https://php.net/manual/en/class.splint.php#splint.constants.default */ - const __default = 0 ; + public const __default = 0; } /** @@ -39,8 +41,9 @@ class SplInt extends SplType { * * @link https://php.net/manual/en/class.splfloat.php */ -class SplFloat extends SplType { - const __default = 0 ; +class SplFloat extends SplType +{ + public const __default = 0; } /** @@ -48,11 +51,12 @@ class SplFloat extends SplType { * * @link https://php.net/manual/en/class.splenum.php */ -class SplEnum extends SplType { +class SplEnum extends SplType +{ /** * @link https://php.net/manual/en/class.splenum.php#splenum.constants.default */ - const __default = null ; + public const __default = null; /** * Returns all consts (possible values) as an array. @@ -61,7 +65,7 @@ class SplEnum extends SplType { * @return array * @link https://php.net/manual/en/splenum.getconstlist.php */ - public function getConstList ($include_default = false) {} + public function getConstList($include_default = false) {} } /** @@ -69,21 +73,22 @@ public function getConstList ($include_default = false) {} * * @link https://php.net/manual/en/class.splbool.php */ -class SplBool extends SplEnum { +class SplBool extends SplEnum +{ /** * @link https://php.net/manual/en/class.splbool.php#splbool.constants.default */ - const __default = false ; + public const __default = false; /** * @link https://php.net/manual/en/class.splbool.php#splbool.constants.false */ - const false = false ; + public const false = false; /** * @link https://php.net/manual/en/class.splbool.php#splbool.constants.true */ - const true = true ; + public const true = true; } /** @@ -91,9 +96,10 @@ class SplBool extends SplEnum { * * @link https://php.net/manual/en/class.splstring.php */ -class SplString extends SplType { +class SplString extends SplType +{ /** * @link https://php.net/manual/en/class.splstring.php#splstring.constants.default */ - const __default = 0 ; + public const __default = 0; } diff --git a/Zend OPcache/OPcache.php b/Zend OPcache/OPcache.php index 11db3159b..0e959fa1e 100644 --- a/Zend OPcache/OPcache.php +++ b/Zend OPcache/OPcache.php @@ -1,61 +1,84 @@ * Compiles and caches a PHP script without executing it * @link https://secure.php.net/manual/en/function.opcache-compile-file.php - * @param string $file The path to the PHP script to be compiled. + * @param string $filename The path to the PHP script to be compiled. * @return bool * Returns TRUE if the opcode cache for script was * invalidated or if there was nothing to invalidate, or FALSE if the opcode * cache is disabled. + * @since 5.5 */ -function opcache_compile_file($file) { } +function opcache_compile_file(string $filename): bool {} /** * (PHP 5 >= 5.5.0, PECL ZendOpcache >= 7.0.0 )The path to the script being invalidated.
+ * @param string $filenameThe path to the script being invalidated.
* @param bool $force [optional]If set to TRUE, the script will be invalidated regardless of whether invalidation is necessary.
* @return bool * Returns TRUE if the opcode cache for script was * invalidated or if there was nothing to invalidate, or FALSE if the opcode * cache is disabled. + * @since 5.5 */ -function opcache_invalidate($script, $force = FALSE) { } +function opcache_invalidate(string $filename, bool $force = false): bool {} /** * (PHP 5 >= 5.5.0, PECL ZendOpcache >= 7.0.0 )Include script specific state information
- * @return arrayReturns an array of information, optionally containing script specific state information
+ * @param bool $include_scriptsInclude script specific state information
+ * @return array|falseReturns an array of information, optionally containing script specific state information
+ * @since 5.5 */ -function opcache_get_status ($get_scripts = TRUE) {} +#[ArrayShape([ + 'opcache_enabled' => 'bool', + 'file_cache' => 'string', + 'file_cache_only' => 'bool', + 'cache_full' => 'bool', + 'restart_pending' => 'bool', + 'restart_in_progress' => 'bool', + 'memory_usage' => 'array', + 'interned_strings_usage' => 'array', + 'opcache_statistics' => 'array', + 'preload_statistics' => 'array', + 'scripts' => 'array', + 'jit' => 'array', +])] +function opcache_get_status(bool $include_scripts = true): array|false {} /** * (PHP 5 >= 5.5.5, PECL ZendOpcache >= 7.0.2 )Returns an array of information, including ini, blacklist and version
+ * @return array|falseReturns an array of information, including ini, blacklist and version
+ * @since 5.5 */ -function opcache_get_configuration() {} +#[ArrayShape(["directives" => "array", "version" => "string[]", "blacklist" => "array"])] +function opcache_get_configuration(): array|false {} /** * (PHP 5 >= 5.6, PECL ZendOpcache >= 7.0.4 )* The left operand, as a string. *
- * @param string $right_operand+ * @param string $num2
* The right operand, as a string. *
- * @param int $scale [optional]+ * @param int|null $scale
* This optional parameter is used to set the number of digits after the * decimal place in the result. If omitted, it will default to the scale * set globally with the {@link bcscale()} function, or fallback to 0 if * this has not been set. *
* @return string The sum of the two operands, as a string. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function bcadd ($left_operand, $right_operand, $scale = 0) {} +#[Pure] +function bcadd(string $num1, string $num2, ?int $scale = null): string {} /** * Subtract one arbitrary precision number from another * @link https://php.net/manual/en/function.bcsub.php - * @param string $left_operand+ * @param string $num1
* The left operand, as a string. *
- * @param string $right_operand+ * @param string $num2
* The right operand, as a string. *
- * @param int $scale [optional]+ * @param int|null $scale
* This optional parameter is used to set the number of digits after the * decimal place in the result. If omitted, it will default to the scale * set globally with the {@link bcscale()} function, or fallback to 0 if * this has not been set. *
* @return string The result of the subtraction, as a string. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function bcsub ($left_operand, $right_operand, $scale = 0) {} +#[Pure] +function bcsub(string $num1, string $num2, ?int $scale = null): string {} /** * Multiply two arbitrary precision numbers * @link https://php.net/manual/en/function.bcmul.php - * @param string $left_operand+ * @param string $num1
* The left operand, as a string. *
- * @param string $right_operand+ * @param string $num2
* The right operand, as a string. *
- * @param int $scale [optional]+ * @param int|null $scale
* This optional parameter is used to set the number of digits after the * decimal place in the result. If omitted, it will default to the scale * set globally with the {@link bcscale()} function, or fallback to 0 if * this has not been set. *
* @return string the result as a string. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function bcmul ($left_operand, $right_operand, $scale = 0) {} +#[Pure] +function bcmul(string $num1, string $num2, ?int $scale = null): string {} /** * Divide two arbitrary precision numbers * @link https://php.net/manual/en/function.bcdiv.php - * @param string $dividend+ * @param string $num1
* The dividend, as a string. *
- * @param string $divisor+ * @param string $num2
* The divisor, as a string. *
- * @param int $scale [optional]+ * @param int|null $scale [optional]
* This optional parameter is used to set the number of digits after the * decimal place in the result. If omitted, it will default to the scale * set globally with the {@link bcscale()} function, or fallback to 0 if @@ -83,40 +81,81 @@ function bcmul ($left_operand, $right_operand, $scale = 0) {} *
* @return string|null the result of the division as a string, or NULL if * divisor is 0. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function bcdiv ($dividend, $divisor, $scale = 0) {} +#[Pure] +#[PhpStormStubsElementAvailable(to: '7.4')] +function bcdiv(string $num1, string $num2, ?int $scale = 0): ?string {} /** - * Get modulus of an arbitrary precision number - * @link https://php.net/manual/en/function.bcmod.php - * @param string $dividend+ * Divide two arbitrary precision numbers + * @link https://php.net/manual/en/function.bcdiv.php + * @param string $num1
* The dividend, as a string. *
- * @param string $divisor+ * @param string $num2
* The divisor, as a string. *
- * @param int $scale [optional]+ * @param int|null $scale [optional]
* This optional parameter is used to set the number of digits after the * decimal place in the result. If omitted, it will default to the scale * set globally with the {@link bcscale()} function, or fallback to 0 if * this has not been set. *
+ * @return string the result of the division as a string. + * @throws \DivisionByZeroError if divisor is 0. Available since PHP 8.0. + */ +#[Pure] +#[PhpStormStubsElementAvailable('8.0')] +function bcdiv(string $num1, string $num2, ?int $scale = null): string {} + +/** + * Get modulus of an arbitrary precision number + * @link https://php.net/manual/en/function.bcmod.php + * @param string $num1+ * The dividend, as a string. Since PHP 7.2, the divided is no longer truncated to an integer. + *
+ * @param string $num2+ * The divisor, as a string. Since PHP 7.2, the divisor is no longer truncated to an integer. + *
+ * @param int|null $scale [optional]+ * This optional parameter is used to set the number of digits after the + * decimal place in the result. If omitted, it will default to the scale + * set globally with the {@link bcscale()} function, or fallback to 0 if + * this has not been set. Available since PHP 7.2. + *
* @return string|null the modulus as a string, or NULL if * divisor is 0. - * @since 4.0 - * @since 5.0 - * @since 7.0 - * @since 7.2 scale param added, dividend/divisor no longer truncated */ -function bcmod ($dividend, $divisor, $scale = 0) {} +#[Pure] +#[PhpStormStubsElementAvailable(to: '7.4')] +function bcmod(string $num1, string $num2, ?int $scale = 0): ?string {} + +/** + * Get modulus of an arbitrary precision number + * @link https://php.net/manual/en/function.bcmod.php + * @param string $num1+ * The dividend, as a string. Since PHP 7.2, the divided is no longer truncated to an integer. + *
+ * @param string $num2+ * The divisor, as a string. Since PHP 7.2, the divisor is no longer truncated to an integer. + *
+ * @param int|null $scale [optional]+ * This optional parameter is used to set the number of digits after the + * decimal place in the result. If omitted, it will default to the scale + * set globally with the {@link bcscale()} function, or fallback to 0 if + * this has not been set. Available since PHP 7.2. + *
+ * @return string the modulus as a string. + * @throws \DivisionByZeroError if divisor is 0. Available since PHP 8.0. + */ +#[Pure] +#[PhpStormStubsElementAvailable('8.0')] +function bcmod(string $num1, string $num2, ?int $scale = null): string {} /** * Raise an arbitrary precision number to another * @link https://php.net/manual/en/function.bcpow.php - * @param string $base+ * @param string $num
* The base, as a string. *
* @param string $exponent@@ -124,57 +163,53 @@ function bcmod ($dividend, $divisor, $scale = 0) {} * The valid range of the exponent is platform specific, but is at least * -2147483648 to 2147483647. *
- * @param int $scale [optional]+ * @param int|null $scale
* This optional parameter is used to set the number of digits after the * decimal place in the result. If omitted, it will default to the scale * set globally with the {@link bcscale()} function, or fallback to 0 if * this has not been set. *
* @return string the result as a string. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function bcpow ($base, $exponent, $scale = 0) {} +#[Pure] +function bcpow(string $num, string $exponent, ?int $scale = null): string {} /** * Get the square root of an arbitrary precision number * @link https://php.net/manual/en/function.bcsqrt.php - * @param string $operand+ * @param string $num
* The operand, as a string. *
- * @param int $scale [optional] - * @return string the square root as a string, or NULL if + * @param int|null $scale [optional] + * @return string|null the square root as a string, or NULL if * operand is negative. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function bcsqrt ($operand, $scale = null) {} +#[Pure] +#[LanguageLevelTypeAware(["8.0" => "string"], default: "?string")] +function bcsqrt(string $num, ?int $scale) {} /** * Set default scale parameter for all bc math functions * @link https://php.net/manual/en/function.bcscale.php - * @param int $scale- * The scale factor. - *
- * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 - * @since 7.0 + * @param int $scale + * @return int|bool */ -function bcscale ($scale) {} +#[LanguageLevelTypeAware(['7.3' => 'int'], default: 'bool')] +function bcscale( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] int $scale, + #[PhpStormStubsElementAvailable(from: '7.3')] #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: 'int')] $scale = null +) {} /** * Compare two arbitrary precision numbers * @link https://php.net/manual/en/function.bccomp.php - * @param string $left_operand+ * @param string $num1
* The left operand, as a string. *
- * @param string $right_operand+ * @param string $num2
* The right operand, as a string. *
- * @param int $scale [optional]+ * @param int|null $scale
* The optional scale parameter is used to set the * number of digits after the decimal place which will be used in the * comparison. @@ -182,16 +217,14 @@ function bcscale ($scale) {} * @return int 0 if the two operands are equal, 1 if the * left_operand is larger than the * right_operand, -1 otherwise. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function bccomp ($left_operand, $right_operand, $scale = 0) {} +#[Pure] +function bccomp(string $num1, string $num2, ?int $scale = null): int {} /** * Raise an arbitrary precision number to another, reduced by a specified modulus * @link https://php.net/manual/en/function.bcpowmod.php - * @param string $base
+ * @param string $num
* The base, as an integral string (i.e. the scale has to be zero). *
* @param string $exponent@@ -201,7 +234,7 @@ function bccomp ($left_operand, $right_operand, $scale = 0) {} * @param string $modulus
* The modulus, as an integral string (i.e. the scale has to be zero). *
- * @param int $scale [optional]+ * @param int|null $scale
* This optional parameter is used to set the number of digits after the * decimal place in the result. If omitted, it will default to the scale * set globally with the {@link bcscale()} function, or fallback to 0 if @@ -209,7 +242,7 @@ function bccomp ($left_operand, $right_operand, $scale = 0) {} *
* @return string|null the result as a string, or NULL if modulus * is 0 or exponent is negative. - * @since 5.0 - * @since 7.0 */ -function bcpowmod ($base, $exponent, $modulus, $scale = 0) {} +#[Pure] +#[LanguageLevelTypeAware(["8.0" => "string"], default: "?string")] +function bcpowmod(string $num, string $exponent, string $modulus, ?int $scale = null) {} diff --git a/blackfire/blackfire.php b/blackfire/blackfire.php new file mode 100644 index 000000000..c5bf55503 --- /dev/null +++ b/blackfire/blackfire.php @@ -0,0 +1,137 @@ + + * @param string $file* The name of the file to open, or an existing stream resource. *
* @param string $mode@@ -11,12 +16,11 @@ * and 'w' (write) are supported. Everything else will cause bzopen * to return FALSE. *
- * @return resource If the open fails, bzopen returns FALSE, otherwise + * @return resource|false If the open fails, bzopen returns FALSE, otherwise * it returns a pointer to the newly opened file. - * @since 4.0.4 - * @since 5.0 */ -function bzopen ($filename, $mode) {} +#[Pure] +function bzopen($file, string $mode) {} /** * Binary safe bzip2 file read @@ -25,16 +29,14 @@ function bzopen ($filename, $mode) {} * The file pointer. It must be valid and must point to a file * successfully opened by bzopen. * - * @param int $length [optional]+ * @param int<1024, 8192> $length [optional]
* If not specified, bzread will read 1024 * (uncompressed) bytes at a time. A maximum of 8192 * uncompressed bytes will be read at a time. *
- * @return string the uncompressed data, or FALSE on error. - * @since 4.0.4 - * @since 5.0 + * @return string|false the uncompressed data, or FALSE on error. */ -function bzread ($bz, $length = 1024) {} +function bzread($bz, int $length = 1024): string|false {} /** * Binary safe bzip2 file write @@ -46,16 +48,14 @@ function bzread ($bz, $length = 1024) {} * @param string $data* The written data. *
- * @param int $length [optional]+ * @param int|null $length [optional]
* If supplied, writing will stop after length * (uncompressed) bytes have been written or the end of * data is reached, whichever comes first. *
- * @return int the number of bytes written, or FALSE on error. - * @since 4.0.4 - * @since 5.0 + * @return int|false the number of bytes written, or FALSE on error. */ -function bzwrite ($bz, $data, $length = null) {} +function bzwrite($bz, string $data, ?int $length): int|false {} /** * Force a write of all buffered data @@ -65,10 +65,8 @@ function bzwrite ($bz, $data, $length = null) {} * successfully opened by bzopen. * * @return bool TRUE on success or FALSE on failure. - * @since 4.0.4 - * @since 5.0 */ -function bzflush ($bz) {} +function bzflush($bz): bool {} /** * Close a bzip2 file @@ -78,10 +76,8 @@ function bzflush ($bz) {} * successfully opened by bzopen. * * @return bool TRUE on success or FALSE on failure. - * @since 4.0.4 - * @since 5.0 */ -function bzclose ($bz) {} +function bzclose($bz): bool {} /** * Returns a bzip2 error number @@ -91,10 +87,10 @@ function bzclose ($bz) {} * successfully opened by bzopen. * * @return int the error number as an integer. - * @since 4.0.4 - * @since 5.0 */ -function bzerrno ($bz) {} +#[Pure] +#[LanguageLevelTypeAware(['8.1' => 'int', '8.0' => 'int|false'], default: 'int')] +function bzerrno($bz) {} /** * Returns a bzip2 error string @@ -104,10 +100,10 @@ function bzerrno ($bz) {} * successfully opened by bzopen. * * @return string a string containing the error message. - * @since 4.0.4 - * @since 5.0 */ -function bzerrstr ($bz) {} +#[Pure] +#[LanguageLevelTypeAware(['8.1' => 'string', '8.0' => 'string|false'], default: 'string')] +function bzerrstr($bz) {} /** * Returns the bzip2 error number and error string in an array @@ -119,23 +115,24 @@ function bzerrstr ($bz) {} * @return array an associative array, with the error code in the * errno entry, and the error message in the * errstr entry. - * @since 4.0.4 - * @since 5.0 */ -function bzerror ($bz) {} +#[Pure] +#[LanguageLevelTypeAware(['8.1' => 'array', '8.0' => 'array|false'], default: 'array')] +#[ArrayShape(["errno" => "int", "errstr" => "string"])] +function bzerror($bz) {} /** * Compress a string into bzip2 encoded data * @link https://php.net/manual/en/function.bzcompress.php - * @param string $source+ * @param string $data
* The string to compress. *
- * @param int $blocksize [optional]+ * @param int $block_size
* Specifies the blocksize used during compression and should be a number * from 1 to 9 with 9 giving the best compression, but using more * resources to do so. *
- * @param int $workfactor [optional]+ * @param int $work_factor [optional]
* Controls how the compression phase behaves when presented with worst * case, highly repetitive, input data. The value can be between 0 and * 250 with 0 being a special case. @@ -144,19 +141,23 @@ function bzerror ($bz) {} * Regardless of the workfactor, the generated * output is the same. *
- * @return mixed The compressed string, or an error number if an error occurred. - * @since 4.0.4 - * @since 5.0 + * @return string|int The compressed string, or an error number if an error occurred. */ -function bzcompress ($source, $blocksize = 4, $workfactor = 0) {} +#[Pure] +function bzcompress( + string $data, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] int $blocksize, + #[PhpStormStubsElementAvailable(from: '7.1')] int $block_size = 4, + int $work_factor = 0 +): string|int {} /** * Decompresses bzip2 encoded data * @link https://php.net/manual/en/function.bzdecompress.php - * @param string $source+ * @param string $data
* The string to decompress. *
- * @param int $small [optional]+ * @param bool $use_less_memory [optional]
* If TRUE, an alternative decompression algorithm will be used which * uses less memory (the maximum memory requirement drops to around 2300K) * but works at roughly half the speed. @@ -165,8 +166,7 @@ function bzcompress ($source, $blocksize = 4, $workfactor = 0) {} * See the bzip2 documentation for more * information about this feature. *
- * @return mixed The decompressed string, or an error number if an error occurred. - * @since 4.0.4 - * @since 5.0 + * @return string|int|false The decompressed string, or an error number if an error occurred. */ -function bzdecompress ($source, $small = 0) {} +#[Pure] +function bzdecompress(string $data, bool $use_less_memory = false): string|int|false {} diff --git a/calendar/calendar.php b/calendar/calendar.php index decc33f50..3aef6c220 100644 --- a/calendar/calendar.php +++ b/calendar/calendar.php @@ -1,18 +1,18 @@ + * @param int $julian_day* A julian day number as integer *
* @return string The gregorian date as a string in the form "month/day/year" - * @since 4.0 - * @since 5.0 */ -function jdtogregorian ($julianday) {} +function jdtogregorian(int $julian_day): string {} /** * Converts a Gregorian date to Julian Day Count @@ -27,22 +27,18 @@ function jdtogregorian ($julianday) {} * The year as a number between -4714 and 9999 * * @return int The julian day for the given gregorian date as an integer. - * @since 4.0 - * @since 5.0 */ -function gregoriantojd ($month, $day, $year) {} +function gregoriantojd(int $month, int $day, int $year): int {} /** * Converts a Julian Day Count to a Julian Calendar Date * @link https://php.net/manual/en/function.jdtojulian.php - * @param int $julianday+ * @param int $julian_day
* A julian day number as integer *
* @return string The julian date as a string in the form "month/day/year" - * @since 4.0 - * @since 5.0 */ -function jdtojulian ($julianday) {} +function jdtojulian(int $julian_day): string {} /** * Converts a Julian Calendar date to Julian Day Count @@ -57,31 +53,27 @@ function jdtojulian ($julianday) {} * The year as a number between -4713 and 9999 * * @return int The julian day for the given julian date as an integer. - * @since 4.0 - * @since 5.0 */ -function juliantojd ($month, $day, $year) {} +function juliantojd(int $month, int $day, int $year): int {} /** * Converts a Julian day count to a Jewish calendar date * @link https://php.net/manual/en/function.jdtojewish.php - * @param int $juliandaycount + * @param int $julian_day * @param bool $hebrew [optional]* If the hebrew parameter is set to TRUE, the * fl parameter is used for Hebrew, string based, * output format. *
- * @param int $fl [optional]+ * @param int $flags [optional]
* The available formats are: * CAL_JEWISH_ADD_ALAFIM_GERESH, * CAL_JEWISH_ADD_ALAFIM, * CAL_JEWISH_ADD_GERESHAYIM. *
* @return string The jewish date as a string in the form "month/day/year" - * @since 4.0 - * @since 5.0 */ -function jdtojewish ($juliandaycount, $hebrew = false, $fl = 0) {} +function jdtojewish(int $julian_day, bool $hebrew = false, int $flags = 0): string {} /** * Converts a date in the Jewish Calendar to Julian Day Count @@ -96,20 +88,16 @@ function jdtojewish ($juliandaycount, $hebrew = false, $fl = 0) {} * The year as a number between 1 and 9999 * * @return int The julian day for the given jewish date as an integer. - * @since 4.0 - * @since 5.0 */ -function jewishtojd ($month, $day, $year) {} +function jewishtojd(int $month, int $day, int $year): int {} /** * Converts a Julian Day Count to the French Republican Calendar * @link https://php.net/manual/en/function.jdtofrench.php - * @param int $juliandaycount + * @param int $julian_day * @return string The french revolution date as a string in the form "month/day/year" - * @since 4.0 - * @since 5.0 */ -function jdtofrench ($juliandaycount) {} +function jdtofrench(int $julian_day): string {} /** * Converts a date from the French Republican Calendar to a Julian Day Count @@ -124,15 +112,13 @@ function jdtofrench ($juliandaycount) {} * The year as a number between 1 and 14 * * @return int The julian day for the given french revolution date as an integer. - * @since 4.0 - * @since 5.0 */ -function frenchtojd ($month, $day, $year) {} +function frenchtojd(int $month, int $day, int $year): int {} /** * Returns the day of the week * @link https://php.net/manual/en/function.jddayofweek.php - * @param int $julianday+ * @param int $julian_day
* A julian day number as integer *
* @param int $mode [optional]+ * @param int|null $year [optional]
* The year as a number between 1970 an 2037 *
+ * @param int $mode [optional] Allows Easter dates to be calculated based on the Julian calendar when set to CAL_EASTER_ALWAYS_JULIAN * @return int The easter date as a unix timestamp. - * @since 4.0 - * @since 5.0 */ -function easter_date ($year = null) {} +function easter_date(?int $year, #[PhpStormStubsElementAvailable(from: '8.0')] int $mode = CAL_EASTER_DEFAULT): int {} /** * Get number of days after March 21 on which Easter falls for a given year * @link https://php.net/manual/en/function.easter-days.php - * @param int $year [optional]+ * @param positive-int|null $year [optional]
* The year as a positive number *
- * @param int $method [optional]+ * @param int $mode [optional]
* Allows to calculate easter dates based * on the Gregorian calendar during the years 1582 - 1752 when set to * CAL_EASTER_ROMAN. See the calendar constants for more valid @@ -205,34 +186,28 @@ function easter_date ($year = null) {} *
* @return int The number of days after March 21st that the Easter Sunday * is in the given year. - * @since 4.0 - * @since 5.0 */ -function easter_days ($year = null, $method = CAL_EASTER_DEFAULT) {} +function easter_days(?int $year, int $mode = CAL_EASTER_DEFAULT): int {} /** * Convert Unix timestamp to Julian Day * @link https://php.net/manual/en/function.unixtojd.php - * @param int $timestamp [optional] defaults to time()+ * @param int|null $timestamp defaults to time()
* A unix timestamp to convert. *
- * @return int A julian day number as integer. - * @since 4.0 - * @since 5.0 + * @return int|false A julian day number as integer. */ -function unixtojd ($timestamp = 0) {} +function unixtojd(?int $timestamp = null): int|false {} /** * Convert Julian Day to Unix timestamp * @link https://php.net/manual/en/function.jdtounix.php - * @param int $jday+ * @param int $julian_day
* A julian day number between 2440588 and 2465342. *
* @return int The unix timestamp for the start of the given julian day. - * @since 4.0 - * @since 5.0 */ -function jdtounix ($jday) {} +function jdtounix(int $julian_day): int {} /** * Converts from a supported calendar to Julian Day Count @@ -257,15 +232,13 @@ function jdtounix ($jday) {} * on the calendar * * @return int A Julian Day number. - * @since 4.1 - * @since 5.0 */ -function cal_to_jd ($calendar, $month, $day, $year) {} +function cal_to_jd(int $calendar, int $month, int $day, int $year): int {} /** * Converts from Julian Day Count to a supported calendar * @link https://php.net/manual/en/function.cal-from-jd.php - * @param int $jd+ * @param int $julian_day
* Julian day as integer *
* @param int $calendar@@ -274,10 +247,19 @@ function cal_to_jd ($calendar, $month, $day, $year) {} * @return array an array containing calendar information like month, day, year, * day of week, abbreviated and full names of weekday and month and the * date in string form "month/day/year". - * @since 4.1 - * @since 5.0 */ -function cal_from_jd ($jd, $calendar) {} +#[ArrayShape([ + "date" => "string", + "month" => "int", + "day" => "int", + "year" => "int", + "dow" => "int", + "abbrevdayname" => "string", + "dayname" => "string", + "abbrevmonth" => "string", + "monthname" => "string" +])] +function cal_from_jd(int $julian_day, int $calendar): array {} /** * Return the number of days in a month for a given year and calendar @@ -292,10 +274,8 @@ function cal_from_jd ($jd, $calendar) {} * Year in the selected calendar *
* @return int The length in days of the selected month in the given calendar - * @since 4.1 - * @since 5.0 */ -function cal_days_in_month ($calendar, $month, $year) {} +function cal_days_in_month(int $calendar, int $month, int $year): int {} /** * Returns information about a particular calendar @@ -305,31 +285,30 @@ function cal_days_in_month ($calendar, $month, $year) {} * information about all calendars is returned. * * @return array - * @since 4.1 - * @since 5.0 */ -function cal_info ($calendar = -1) {} +#[ArrayShape(["months" => "array", "abbrevmonths" => "array", "maxdaysinmonth" => "int", "calname" => "string", "calsymbol" => "string"])] +function cal_info(int $calendar = -1): array {} -define ('CAL_GREGORIAN', 0); -define ('CAL_JULIAN', 1); -define ('CAL_JEWISH', 2); -define ('CAL_FRENCH', 3); -define ('CAL_NUM_CALS', 4); -define ('CAL_DOW_DAYNO', 0); -define ('CAL_DOW_SHORT', 2); -define ('CAL_DOW_LONG', 1); -define ('CAL_MONTH_GREGORIAN_SHORT', 0); -define ('CAL_MONTH_GREGORIAN_LONG', 1); -define ('CAL_MONTH_JULIAN_SHORT', 2); -define ('CAL_MONTH_JULIAN_LONG', 3); -define ('CAL_MONTH_JEWISH', 4); -define ('CAL_MONTH_FRENCH', 5); -define ('CAL_EASTER_DEFAULT', 0); -define ('CAL_EASTER_ROMAN', 1); -define ('CAL_EASTER_ALWAYS_GREGORIAN', 2); -define ('CAL_EASTER_ALWAYS_JULIAN', 3); -define ('CAL_JEWISH_ADD_ALAFIM_GERESH', 2); -define ('CAL_JEWISH_ADD_ALAFIM', 4); -define ('CAL_JEWISH_ADD_GERESHAYIM', 8); +define('CAL_GREGORIAN', 0); +define('CAL_JULIAN', 1); +define('CAL_JEWISH', 2); +define('CAL_FRENCH', 3); +define('CAL_NUM_CALS', 4); +define('CAL_DOW_DAYNO', 0); +define('CAL_DOW_SHORT', 2); +define('CAL_DOW_LONG', 1); +define('CAL_MONTH_GREGORIAN_SHORT', 0); +define('CAL_MONTH_GREGORIAN_LONG', 1); +define('CAL_MONTH_JULIAN_SHORT', 2); +define('CAL_MONTH_JULIAN_LONG', 3); +define('CAL_MONTH_JEWISH', 4); +define('CAL_MONTH_FRENCH', 5); +define('CAL_EASTER_DEFAULT', 0); +define('CAL_EASTER_ROMAN', 1); +define('CAL_EASTER_ALWAYS_GREGORIAN', 2); +define('CAL_EASTER_ALWAYS_JULIAN', 3); +define('CAL_JEWISH_ADD_ALAFIM_GERESH', 2); +define('CAL_JEWISH_ADD_ALAFIM', 4); +define('CAL_JEWISH_ADD_GERESHAYIM', 8); // End of calendar v. diff --git a/cassandra/cassandra.php b/cassandra/cassandra.php index 5d2ebde1d..23deaa61e 100644 --- a/cassandra/cassandra.php +++ b/cassandra/cassandra.php @@ -27,7 +27,6 @@ */ namespace { - /** * The main entry point to the PHP Driver for Apache Cassandra. * @@ -37,16 +36,15 @@ */ final class Cassandra { - /** * Consistency level ANY means the request is fulfilled as soon as the data * has been written on the Coordinator. Requests with this consistency level - * are not guranteed to make it to Replica nodes. + * are not guaranteed to make it to Replica nodes. * * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_ANY */ - const CONSISTENCY_ANY = 0; + public const CONSISTENCY_ANY = 0; /** * Consistency level ONE guarantees that data has been written to at least @@ -55,7 +53,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_ONE */ - const CONSISTENCY_ONE = 1; + public const CONSISTENCY_ONE = 1; /** * Consistency level TWO guarantees that data has been written to at least @@ -64,7 +62,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_TWO */ - const CONSISTENCY_TWO = 2; + public const CONSISTENCY_TWO = 2; /** * Consistency level THREE guarantees that data has been written to at least @@ -73,7 +71,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_THREE */ - const CONSISTENCY_THREE = 3; + public const CONSISTENCY_THREE = 3; /** * Consistency level QUORUM guarantees that data has been written to at least @@ -86,7 +84,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_QUORUM */ - const CONSISTENCY_QUORUM = 4; + public const CONSISTENCY_QUORUM = 4; /** * Consistency level ALL guarantees that data has been written to all @@ -95,7 +93,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_ALL */ - const CONSISTENCY_ALL = 5; + public const CONSISTENCY_ALL = 5; /** * Same as `CONSISTENCY_QUORUM`, but confined to the local data center. This @@ -104,7 +102,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_LOCAL_QUORUM */ - const CONSISTENCY_LOCAL_QUORUM = 6; + public const CONSISTENCY_LOCAL_QUORUM = 6; /** * Consistency level EACH_QUORUM guarantees that data has been written to at @@ -114,7 +112,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_EACH_QUORUM */ - const CONSISTENCY_EACH_QUORUM = 7; + public const CONSISTENCY_EACH_QUORUM = 7; /** * This is a serial consistency level, it is used in conditional updates, @@ -128,7 +126,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_SERIAL */ - const CONSISTENCY_SERIAL = 8; + public const CONSISTENCY_SERIAL = 8; /** * Same as `CONSISTENCY_SERIAL`, but confined to the local data center. This @@ -137,7 +135,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_LOCAL_SERIAL */ - const CONSISTENCY_LOCAL_SERIAL = 9; + public const CONSISTENCY_LOCAL_SERIAL = 9; /** * Same as `CONSISTENCY_ONE`, but confined to the local data center. This @@ -146,7 +144,7 @@ final class Cassandra * @see \Cassandra\Session::execute() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CONSISTENCY_LOCAL_ONE */ - const CONSISTENCY_LOCAL_ONE = 10; + public const CONSISTENCY_LOCAL_ONE = 10; /** * Perform no verification of nodes when using SSL encryption. @@ -154,7 +152,7 @@ final class Cassandra * @see \Cassandra\SSLOptions\Builder::withVerifyFlags() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERIFY_NONE */ - const VERIFY_NONE = 0; + public const VERIFY_NONE = 0; /** * Verify presence and validity of SSL certificates. @@ -162,7 +160,7 @@ final class Cassandra * @see \Cassandra\SSLOptions\Builder::withVerifyFlags() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERIFY_PEER_CERT */ - const VERIFY_PEER_CERT = 1; + public const VERIFY_PEER_CERT = 1; /** * Verify that the IP address matches the SSL certificate’s common name or @@ -172,67 +170,67 @@ final class Cassandra * @see \Cassandra\SSLOptions\Builder::withVerifyFlags() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERIFY_PEER_IDENTITY */ - const VERIFY_PEER_IDENTITY = 2; + public const VERIFY_PEER_IDENTITY = 2; /** * @see \Cassandra\BatchStatement::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-BATCH_LOGGED */ - const BATCH_LOGGED = 0; + public const BATCH_LOGGED = 0; /** * @see \Cassandra\BatchStatement::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-BATCH_UNLOGGED */ - const BATCH_UNLOGGED = 1; + public const BATCH_UNLOGGED = 1; /** * @see \Cassandra\BatchStatement::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-BATCH_COUNTER */ - const BATCH_COUNTER = 2; + public const BATCH_COUNTER = 2; /** * Used to disable logging. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_DISABLED */ - const LOG_DISABLED = 0; + public const LOG_DISABLED = 0; /** * Allow critical level logging. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_CRITICAL */ - const LOG_CRITICAL = 1; + public const LOG_CRITICAL = 1; /** * Allow error level logging. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_ERROR */ - const LOG_ERROR = 2; + public const LOG_ERROR = 2; /** * Allow warning level logging. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_WARN */ - const LOG_WARN = 3; + public const LOG_WARN = 3; /** * Allow info level logging. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_INFO */ - const LOG_INFO = 4; + public const LOG_INFO = 4; /** * Allow debug level logging. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_DEBUG */ - const LOG_DEBUG = 5; + public const LOG_DEBUG = 5; /** * Allow trace level logging. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-LOG_TRACE */ - const LOG_TRACE = 6; + public const LOG_TRACE = 6; /** * When using a map, collection or set of type text, all of its elements @@ -243,7 +241,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TEXT */ - const TYPE_TEXT = 'text'; + public const TYPE_TEXT = 'text'; /** * When using a map, collection or set of type ascii, all of its elements @@ -254,7 +252,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_ASCII */ - const TYPE_ASCII = 'ascii'; + public const TYPE_ASCII = 'ascii'; /** * When using a map, collection or set of type varchar, all of its elements @@ -265,7 +263,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_VARCHAR */ - const TYPE_VARCHAR = 'varchar'; + public const TYPE_VARCHAR = 'varchar'; /** * When using a map, collection or set of type bigint, all of its elements @@ -276,7 +274,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_BIGINT */ - const TYPE_BIGINT = 'bigint'; + public const TYPE_BIGINT = 'bigint'; /** * When using a map, collection or set of type smallint, all of its elements @@ -287,7 +285,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_SMALLINT */ - const TYPE_SMALLINT = 'smallint'; + public const TYPE_SMALLINT = 'smallint'; /** * When using a map, collection or set of type tinyint, all of its elements @@ -298,7 +296,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TINYINT */ - const TYPE_TINYINT = 'tinyint'; + public const TYPE_TINYINT = 'tinyint'; /** * When using a map, collection or set of type blob, all of its elements @@ -309,7 +307,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_BLOB */ - const TYPE_BLOB = 'blob'; + public const TYPE_BLOB = 'blob'; /** * When using a map, collection or set of type bool, all of its elements @@ -320,7 +318,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_BOOLEAN */ - const TYPE_BOOLEAN = 'boolean'; + public const TYPE_BOOLEAN = 'boolean'; /** * When using a map, collection or set of type counter, all of its elements @@ -331,7 +329,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_COUNTER */ - const TYPE_COUNTER = 'counter'; + public const TYPE_COUNTER = 'counter'; /** * When using a map, collection or set of type decimal, all of its elements @@ -342,7 +340,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_DECIMAL */ - const TYPE_DECIMAL = 'decimal'; + public const TYPE_DECIMAL = 'decimal'; /** * When using a map, collection or set of type double, all of its elements @@ -353,7 +351,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_DOUBLE */ - const TYPE_DOUBLE = 'double'; + public const TYPE_DOUBLE = 'double'; /** * When using a map, collection or set of type float, all of its elements @@ -364,7 +362,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_FLOAT */ - const TYPE_FLOAT = 'float'; + public const TYPE_FLOAT = 'float'; /** * When using a map, collection or set of type int, all of its elements @@ -375,7 +373,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_INT */ - const TYPE_INT = 'int'; + public const TYPE_INT = 'int'; /** * When using a map, collection or set of type timestamp, all of its elements @@ -386,7 +384,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TIMESTAMP */ - const TYPE_TIMESTAMP = 'timestamp'; + public const TYPE_TIMESTAMP = 'timestamp'; /** * When using a map, collection or set of type uuid, all of its elements @@ -397,7 +395,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_UUID */ - const TYPE_UUID = 'uuid'; + public const TYPE_UUID = 'uuid'; /** * When using a map, collection or set of type varint, all of its elements @@ -408,7 +406,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_VARINT */ - const TYPE_VARINT = 'varint'; + public const TYPE_VARINT = 'varint'; /** * When using a map, collection or set of type timeuuid, all of its elements @@ -419,7 +417,7 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_TIMEUUID */ - const TYPE_TIMEUUID = 'timeuuid'; + public const TYPE_TIMEUUID = 'timeuuid'; /** * When using a map, collection or set of type inet, all of its elements @@ -430,19 +428,19 @@ final class Cassandra * @see Map::__construct() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-TYPE_INET */ - const TYPE_INET = 'inet'; + public const TYPE_INET = 'inet'; /** * The current version of the extension. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-VERSION */ - const VERSION = '1.3.2'; + public const VERSION = '1.3.2'; /** * The version of the cpp-driver the extension is compiled against. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#constant-CPP_DRIVER_VERSION */ - const CPP_DRIVER_VERSION = '2.13.0'; + public const CPP_DRIVER_VERSION = '2.13.0'; /** * Creates a new cluster builder for constructing a Cluster object. @@ -450,9 +448,7 @@ final class Cassandra * @return \Cassandra\Cluster\Builder A cluster builder object with default settings * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#method-cluster */ - public static function cluster() - { - } + public static function cluster() {} /** * Creates a new ssl builder for constructing a SSLOptions object. @@ -460,20 +456,16 @@ public static function cluster() * @return \Cassandra\SSLOptions\Builder A SSL options builder with default settings * @link https://docs.datastax.com/en/developer/php-driver/latest/api/class.Cassandra/#method-ssl */ - public static function ssl() - { - } - + public static function ssl() {} } - } - /** * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/ */ namespace Cassandra { + use JetBrains\PhpStorm\Deprecated; /** * A PHP representation of a column @@ -481,7 +473,6 @@ public static function ssl() */ interface Column { - /** * Returns the name of the column. * @@ -537,7 +528,6 @@ public function indexName(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Column/#method-indexOptions */ public function indexOptions(); - } /** @@ -549,7 +539,6 @@ public function indexOptions(); */ interface Session { - /** * Execute a query. * @@ -620,7 +609,7 @@ public function prepareAsync($cql, $options); /** * Close the session and all its connections. * - * @param double $timeout The amount of time in seconds to wait for the session to close. + * @param float $timeout The amount of time in seconds to wait for the session to close. * * @return null Nothing. * @throws \Cassandra\Exception @@ -652,7 +641,6 @@ public function metrics(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Session/#method-schema */ public function schema(); - } /** @@ -661,7 +649,6 @@ public function schema(); */ interface Table { - /** * Returns the name of this table * @@ -845,7 +832,7 @@ public function columns(); /** * Returns the partition key columns of the table * - * @return array A list of of Column instances + * @return array A list of Column instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-partitionKey */ public function partitionKey(); @@ -853,7 +840,7 @@ public function partitionKey(); /** * Returns both the partition and clustering key columns of the table * - * @return array A list of of Column instances + * @return array A list of Column instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-primaryKey */ public function primaryKey(); @@ -861,7 +848,7 @@ public function primaryKey(); /** * Returns the clustering key columns of the table * - * @return array A list of of Column instances + * @return array A list of Column instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-clusteringKey */ public function clusteringKey(); @@ -871,26 +858,19 @@ public function clusteringKey(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Table/#method-clusteringOrder */ public function clusteringOrder(); - } /** * Interface for retry policies. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.RetryPolicy/ */ - interface RetryPolicy - { - - } + interface RetryPolicy {} /** * Interface for timestamp generators. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.TimestampGenerator/ */ - interface TimestampGenerator - { - - } + interface TimestampGenerator {} /** * An interface implemented by all exceptions thrown by the PHP Driver. @@ -898,10 +878,7 @@ interface TimestampGenerator * `catch (Exception $e)`. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Exception/ */ - interface Exception - { - - } + interface Exception {} /** * A PHP representation of a function @@ -909,7 +886,6 @@ interface Exception */ interface Function_ { - /** * Returns the full name of the function * @@ -973,7 +949,6 @@ public function body(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Function/#method-isCalledOnNullInput */ public function isCalledOnNullInput(); - } /** @@ -982,7 +957,6 @@ public function isCalledOnNullInput(); */ interface UuidInterface { - /** * Returns this uuid as string. * @@ -998,7 +972,6 @@ public function uuid(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.UuidInterface/#method-version */ public function version(); - } /** @@ -1007,7 +980,6 @@ public function version(); */ interface Index { - /** * Returns the name of the index * @@ -1065,7 +1037,6 @@ public function className(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Index/#method-isCustom */ public function isCustom(); - } /** @@ -1074,7 +1045,6 @@ public function isCustom(); */ interface Cluster { - /** * Creates a new Session instance. * @@ -1094,7 +1064,6 @@ public function connect($keyspace); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Cluster/#method-connectAsync */ public function connectAsync($keyspace); - } /** @@ -1109,7 +1078,6 @@ public function connectAsync($keyspace); */ interface Numeric { - /** * @param \Cassandra\Numeric $num a number to add to this one * @@ -1179,7 +1147,6 @@ public function toInt(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Numeric/#method-toDouble */ public function toDouble(); - } /** @@ -1193,11 +1160,10 @@ public function toDouble(); */ interface Future { - /** * Waits for a given future resource to resolve and throws errors if any. * - * @param int|double|null $timeout A timeout in seconds + * @param int|float|null $timeout A timeout in seconds * * @return mixed a value that the future has been resolved with * @throws \Cassandra\Exception\TimeoutException @@ -1206,7 +1172,6 @@ interface Future * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Future/#method-get */ public function get($timeout); - } /** @@ -1215,7 +1180,6 @@ public function get($timeout); */ interface Keyspace { - /** * Returns keyspace name * @@ -1289,7 +1253,7 @@ public function userTypes(); * * @param string $name Materialized view name * - * @return \Cassandra\MaterizedView|null A materialized view or null + * @return \Cassandra\MaterializedView|null A materialized view or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-materializedView */ public function materializedView($name); @@ -1339,7 +1303,6 @@ public function aggregate($name, ...$params); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Keyspace/#method-aggregates */ public function aggregates(); - } /** @@ -1367,7 +1330,6 @@ public function aggregates(); */ interface Value { - /** * The type of represented by the value. * @@ -1375,7 +1337,6 @@ interface Value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Value/#method-type */ public function type(); - } /** @@ -1384,7 +1345,6 @@ public function type(); */ interface Aggregate { - /** * Returns the full name of the aggregate * @@ -1456,7 +1416,6 @@ public function stateType(); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Aggregate/#method-signature */ public function signature(); - } /** @@ -1467,10 +1426,7 @@ public function signature(); * @see \Cassandra\BatchStatement * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Statement/ */ - interface Statement - { - - } + interface Statement {} /** * A PHP representation of a schema @@ -1478,7 +1434,6 @@ interface Statement */ interface Schema { - /** * Returns a Keyspace instance by name. * @@ -1496,7 +1451,6 @@ public function keyspace($name); * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/interface.Schema/#method-keyspaces */ public function keyspaces(); - } /** @@ -1505,13 +1459,10 @@ public function keyspaces(); */ final class Rows implements \Iterator, \ArrayAccess { - /** * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-__construct */ - public function __construct() - { - } + public function __construct() {} /** * Returns the number of rows. @@ -1521,9 +1472,7 @@ public function __construct() * @see \Countable::count() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-count */ - public function count() - { - } + public function count() {} /** * Resets the rows iterator. @@ -1533,9 +1482,7 @@ public function count() * @see \Iterator::rewind() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-rewind */ - public function rewind() - { - } + public function rewind() {} /** * Returns current row. @@ -1545,9 +1492,7 @@ public function rewind() * @see \Iterator::current() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-current */ - public function current() - { - } + public function current() {} /** * Returns current index. @@ -1557,9 +1502,7 @@ public function current() * @see \Iterator::key() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-key */ - public function key() - { - } + public function key() {} /** * Advances the rows iterator by one. @@ -1569,9 +1512,7 @@ public function key() * @see \Iterator::next() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-next */ - public function next() - { - } + public function next() {} /** * Returns existence of more rows being available. @@ -1581,9 +1522,7 @@ public function next() * @see \Iterator::valid() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-valid */ - public function valid() - { - } + public function valid() {} /** * Returns existence of a given row. @@ -1595,9 +1534,7 @@ public function valid() * @see \ArrayAccess::offsetExists() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetExists */ - public function offsetExists($offset) - { - } + public function offsetExists($offset) {} /** * Returns a row at given index. @@ -1609,9 +1546,7 @@ public function offsetExists($offset) * @see \ArrayAccess::offsetGet() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetGet */ - public function offsetGet($offset) - { - } + public function offsetGet($offset) {} /** * Sets a row at given index. @@ -1626,9 +1561,7 @@ public function offsetGet($offset) * @see \ArrayAccess::offsetSet() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetSet */ - public function offsetSet($offset, $value) - { - } + public function offsetSet($offset, $value) {} /** * Removes a row at given index. @@ -1642,9 +1575,7 @@ public function offsetSet($offset, $value) * @see \ArrayAccess::offsetUnset() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-offsetUnset */ - public function offsetUnset($offset) - { - } + public function offsetUnset($offset) {} /** * Check for the last page when paging. @@ -1652,9 +1583,7 @@ public function offsetUnset($offset) * @return bool whether this is the last page or not * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-isLastPage */ - public function isLastPage() - { - } + public function isLastPage() {} /** * Get the next page of results. @@ -1664,9 +1593,7 @@ public function isLastPage() * @return \Cassandra\Rows|null loads and returns next result page * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-nextPage */ - public function nextPage($timeout) - { - } + public function nextPage($timeout) {} /** * Get the next page of results asynchronously. @@ -1674,9 +1601,7 @@ public function nextPage($timeout) * @return \Cassandra\Future returns future of the next result page * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-nextPageAsync */ - public function nextPageAsync() - { - } + public function nextPageAsync() {} /** * Returns the raw paging state token. @@ -1684,9 +1609,7 @@ public function nextPageAsync() * @return string * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-pagingStateToken */ - public function pagingStateToken() - { - } + public function pagingStateToken() {} /** * Get the first row. @@ -1694,10 +1617,7 @@ public function pagingStateToken() * @return array|null returns first row if any * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Rows/#method-first */ - public function first() - { - } - + public function first() {} } /** @@ -1708,7 +1628,6 @@ public function first() */ final class DefaultCluster implements Cluster { - /** * Creates a new Session instance. * @@ -1718,9 +1637,7 @@ final class DefaultCluster implements Cluster * @return \Cassandra\Session Session instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultCluster/#method-connect */ - public function connect($keyspace, $timeout) - { - } + public function connect($keyspace, $timeout) {} /** * Creates a new Session instance. @@ -1730,10 +1647,7 @@ public function connect($keyspace, $timeout) * @return \Cassandra\Future A Future Session instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultCluster/#method-connectAsync */ - public function connectAsync($keyspace) - { - } - + public function connectAsync($keyspace) {} } /** @@ -1742,16 +1656,13 @@ public function connectAsync($keyspace) */ final class DefaultFunction implements Function_ { - /** * Returns the full name of the function * * @return string Full name of the function including name and types * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-name */ - public function name() - { - } + public function name() {} /** * Returns the simple name of the function @@ -1759,9 +1670,7 @@ public function name() * @return string Simple name of the function * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-simpleName */ - public function simpleName() - { - } + public function simpleName() {} /** * Returns the arguments of the function @@ -1769,9 +1678,7 @@ public function simpleName() * @return array Arguments of the function * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-arguments */ - public function arguments() - { - } + public function arguments() {} /** * Returns the return type of the function @@ -1779,9 +1686,7 @@ public function arguments() * @return \Cassandra\Type Return type of the function * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-returnType */ - public function returnType() - { - } + public function returnType() {} /** * Returns the signature of the function @@ -1789,9 +1694,7 @@ public function returnType() * @return string Signature of the function (same as name()) * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-signature */ - public function signature() - { - } + public function signature() {} /** * Returns the lanuage of the function @@ -1799,9 +1702,7 @@ public function signature() * @return string Language used by the function * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-language */ - public function language() - { - } + public function language() {} /** * Returns the body of the function @@ -1809,9 +1710,7 @@ public function language() * @return string Body of the function * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-body */ - public function body() - { - } + public function body() {} /** * Determines if a function is called when the value is null. @@ -1819,10 +1718,7 @@ public function body() * @return bool Returns whether the function is called when the input columns are null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultFunction/#method-isCalledOnNullInput */ - public function isCalledOnNullInput() - { - } - + public function isCalledOnNullInput() {} } /** @@ -1837,7 +1733,6 @@ public function isCalledOnNullInput() */ final class SimpleStatement implements Statement { - /** * Creates a new simple statement with the provided CQL. * @@ -1845,10 +1740,7 @@ final class SimpleStatement implements Statement * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.SimpleStatement/#method-__construct */ - public function __construct($cql) - { - } - + public function __construct($cql) {} } /** @@ -1857,7 +1749,6 @@ public function __construct($cql) */ final class Tuple implements Value, \Countable, \Iterator { - /** * Creates a new tuple with the given types. * @@ -1865,9 +1756,7 @@ final class Tuple implements Value, \Countable, \Iterator * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-__construct */ - public function __construct($types) - { - } + public function __construct($types) {} /** * The type of this tuple. @@ -1875,9 +1764,7 @@ public function __construct($types) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-type */ - public function type() - { - } + public function type() {} /** * Array of values in this tuple. @@ -1885,9 +1772,7 @@ public function type() * @return array values * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-values */ - public function values() - { - } + public function values() {} /** * Sets the value at index in this tuple . @@ -1897,9 +1782,7 @@ public function values() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-set */ - public function set($value) - { - } + public function set($value) {} /** * Retrieves the value at a given index. @@ -1909,9 +1792,7 @@ public function set($value) * @return mixed A value or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-get */ - public function get($index) - { - } + public function get($index) {} /** * Total number of elements in this tuple @@ -1919,9 +1800,7 @@ public function get($index) * @return int count * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-count */ - public function count() - { - } + public function count() {} /** * Current element for iteration @@ -1929,9 +1808,7 @@ public function count() * @return mixed current element * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-current */ - public function current() - { - } + public function current() {} /** * Current key for iteration @@ -1939,9 +1816,7 @@ public function current() * @return int current key * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-key */ - public function key() - { - } + public function key() {} /** * Move internal iterator forward @@ -1949,9 +1824,7 @@ public function key() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-next */ - public function next() - { - } + public function next() {} /** * Check whether a current value exists @@ -1959,9 +1832,7 @@ public function next() * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-valid */ - public function valid() - { - } + public function valid() {} /** * Rewind internal iterator @@ -1969,10 +1840,7 @@ public function valid() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tuple/#method-rewind */ - public function rewind() - { - } - + public function rewind() {} } /** @@ -1981,17 +1849,14 @@ public function rewind() */ final class Smallint implements Value, Numeric { - /** * Creates a new 16-bit signed integer. * - * @param int|double|string $value The value as an integer, double or string + * @param int|float|string $value The value as an integer, double or string * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-__construct */ - public function __construct($value) - { - } + public function __construct($value) {} /** * Minimum possible Smallint value @@ -1999,9 +1864,7 @@ public function __construct($value) * @return \Cassandra\Smallint minimum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-min */ - public static function min() - { - } + public static function min() {} /** * Maximum possible Smallint value @@ -2009,17 +1872,13 @@ public static function min() * @return \Cassandra\Smallint maximum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-max */ - public static function max() - { - } + public static function max() {} /** * @return string * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this value (smallint). @@ -2027,9 +1886,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-type */ - public function type() - { - } + public function type() {} /** * Returns the integer value. @@ -2037,9 +1894,7 @@ public function type() * @return int integer value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-value */ - public function value() - { - } + public function value() {} /** * @param \Cassandra\Numeric $num a number to add to this one @@ -2047,9 +1902,7 @@ public function value() * @return \Cassandra\Numeric sum * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-add */ - public function add($num) - { - } + public function add($num) {} /** * @param \Cassandra\Numeric $num a number to subtract from this one @@ -2057,9 +1910,7 @@ public function add($num) * @return \Cassandra\Numeric difference * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-sub */ - public function sub($num) - { - } + public function sub($num) {} /** * @param \Cassandra\Numeric $num a number to multiply this one by @@ -2067,9 +1918,7 @@ public function sub($num) * @return \Cassandra\Numeric product * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-mul */ - public function mul($num) - { - } + public function mul($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -2077,9 +1926,7 @@ public function mul($num) * @return \Cassandra\Numeric quotient * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-div */ - public function div($num) - { - } + public function div($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -2087,50 +1934,37 @@ public function div($num) * @return \Cassandra\Numeric remainder * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-mod */ - public function mod($num) - { - } + public function mod($num) {} /** * @return \Cassandra\Numeric absolute value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-abs */ - public function abs() - { - } + public function abs() {} /** * @return \Cassandra\Numeric negative value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-neg */ - public function neg() - { - } + public function neg() {} /** * @return \Cassandra\Numeric square root * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-sqrt */ - public function sqrt() - { - } + public function sqrt() {} /** * @return int this number as int * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-toInt */ - public function toInt() - { - } + public function toInt() {} /** * @return float this number as float * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Smallint/#method-toDouble */ - public function toDouble() - { - } - + public function toDouble() {} } /** @@ -2142,11 +1976,10 @@ public function toDouble() */ final class FuturePreparedStatement implements Future { - /** * Waits for a given future resource to resolve and throws errors if any. * - * @param int|double|null $timeout A timeout in seconds + * @param int|float|null $timeout A timeout in seconds * * @return \Cassandra\PreparedStatement A prepared statement * @throws \Cassandra\Exception\TimeoutException @@ -2154,10 +1987,7 @@ final class FuturePreparedStatement implements Future * @throws \Cassandra\Exception\InvalidArgumentException * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FuturePreparedStatement/#method-get */ - public function get($timeout) - { - } - + public function get($timeout) {} } /** @@ -2166,7 +1996,6 @@ public function get($timeout) */ final class DefaultSchema implements Schema { - /** * Returns a Keyspace instance by name. * @@ -2175,9 +2004,7 @@ final class DefaultSchema implements Schema * @return \Cassandra\Keyspace Keyspace instance or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSchema/#method-keyspace */ - public function keyspace($name) - { - } + public function keyspace($name) {} /** * Returns all keyspaces defined in the schema. @@ -2185,9 +2012,7 @@ public function keyspace($name) * @return array An array of `Keyspace` instances. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSchema/#method-keyspaces */ - public function keyspaces() - { - } + public function keyspaces() {} /** * Get the version of the schema snapshot @@ -2195,10 +2020,7 @@ public function keyspaces() * @return int Version of the schema. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSchema/#method-version */ - public function version() - { - } - + public function version() {} } /** @@ -2223,7 +2045,6 @@ public function version() */ final class BatchStatement implements Statement { - /** * Creates a new batch statement. * @@ -2231,9 +2052,7 @@ final class BatchStatement implements Statement * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.BatchStatement/#method-__construct */ - public function __construct($type) - { - } + public function __construct($type) {} /** * Adds a statement to this batch. @@ -2246,10 +2065,7 @@ public function __construct($type) * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.BatchStatement/#method-add */ - public function add($statement, $arguments) - { - } - + public function add($statement, $arguments) {} } /** @@ -2258,7 +2074,6 @@ public function add($statement, $arguments) */ final class Collection implements Value, \Countable, \Iterator { - /** * Creates a new collection of a given type. * @@ -2266,9 +2081,7 @@ final class Collection implements Value, \Countable, \Iterator * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-__construct */ - public function __construct($type) - { - } + public function __construct($type) {} /** * The type of this collection. @@ -2276,9 +2089,7 @@ public function __construct($type) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-type */ - public function type() - { - } + public function type() {} /** * Array of values in this collection. @@ -2286,21 +2097,17 @@ public function type() * @return array values * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-values */ - public function values() - { - } + public function values() {} /** * Adds one or more values to this collection. * - * @param mixed $value ,... one or more values to add + * @param mixed ...$value one or more values to add * * @return int total number of values in this collection * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-add */ - public function add($value) - { - } + public function add(...$value) {} /** * Retrieves the value at a given index. @@ -2310,9 +2117,7 @@ public function add($value) * @return mixed Value or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-get */ - public function get($index) - { - } + public function get($index) {} /** * Finds index of a value in this collection. @@ -2322,9 +2127,7 @@ public function get($index) * @return int Index or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-find */ - public function find($value) - { - } + public function find($value) {} /** * Total number of elements in this collection @@ -2332,9 +2135,7 @@ public function find($value) * @return int count * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-count */ - public function count() - { - } + public function count() {} /** * Current element for iteration @@ -2342,9 +2143,7 @@ public function count() * @return mixed current element * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-current */ - public function current() - { - } + public function current() {} /** * Current key for iteration @@ -2352,9 +2151,7 @@ public function current() * @return int current key * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-key */ - public function key() - { - } + public function key() {} /** * Move internal iterator forward @@ -2362,9 +2159,7 @@ public function key() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-next */ - public function next() - { - } + public function next() {} /** * Check whether a current value exists @@ -2372,9 +2167,7 @@ public function next() * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-valid */ - public function valid() - { - } + public function valid() {} /** * Rewind internal iterator @@ -2382,9 +2175,7 @@ public function valid() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-rewind */ - public function rewind() - { - } + public function rewind() {} /** * Deletes the value at a given index @@ -2394,10 +2185,7 @@ public function rewind() * @return bool Whether the value at a given index is correctly removed * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Collection/#method-remove */ - public function remove($index) - { - } - + public function remove($index) {} } /** @@ -2408,11 +2196,10 @@ public function remove($index) */ final class FutureRows implements Future { - /** * Waits for a given future resource to resolve and throws errors if any. * - * @param int|double|null $timeout A timeout in seconds + * @param int|float|null $timeout A timeout in seconds * * @return \Cassandra\Rows|null The result set * @throws \Cassandra\Exception\TimeoutException @@ -2420,10 +2207,7 @@ final class FutureRows implements Future * @throws \Cassandra\Exception\InvalidArgumentException * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureRows/#method-get */ - public function get($timeout) - { - } - + public function get($timeout) {} } /** @@ -2432,16 +2216,13 @@ public function get($timeout) */ final class DefaultMaterializedView extends MaterializedView { - /** * Returns the name of this view * * @return string Name of the view * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-name */ - public function name() - { - } + public function name() {} /** * Return a view's option by name @@ -2451,9 +2232,7 @@ public function name() * @return \Cassandra\Value Value of an option by name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-option */ - public function option($name) - { - } + public function option($name) {} /** * Returns all the view's options @@ -2461,9 +2240,7 @@ public function option($name) * @return array A dictionary of string and Value pairs of the * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-options */ - public function options() - { - } + public function options() {} /** * Description of the view, if any @@ -2471,9 +2248,7 @@ public function options() * @return string Table description or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-comment */ - public function comment() - { - } + public function comment() {} /** * Returns read repair chance @@ -2481,9 +2256,7 @@ public function comment() * @return float Read repair chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-readRepairChance */ - public function readRepairChance() - { - } + public function readRepairChance() {} /** * Returns local read repair chance @@ -2491,9 +2264,7 @@ public function readRepairChance() * @return float Local read repair chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-localReadRepairChance */ - public function localReadRepairChance() - { - } + public function localReadRepairChance() {} /** * Returns GC grace seconds @@ -2501,9 +2272,7 @@ public function localReadRepairChance() * @return int GC grace seconds * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-gcGraceSeconds */ - public function gcGraceSeconds() - { - } + public function gcGraceSeconds() {} /** * Returns caching options @@ -2511,9 +2280,7 @@ public function gcGraceSeconds() * @return string Caching options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-caching */ - public function caching() - { - } + public function caching() {} /** * Returns bloom filter FP chance @@ -2521,9 +2288,7 @@ public function caching() * @return float Bloom filter FP chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-bloomFilterFPChance */ - public function bloomFilterFPChance() - { - } + public function bloomFilterFPChance() {} /** * Returns memtable flush period in milliseconds @@ -2531,9 +2296,7 @@ public function bloomFilterFPChance() * @return int Memtable flush period in milliseconds * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-memtableFlushPeriodMs */ - public function memtableFlushPeriodMs() - { - } + public function memtableFlushPeriodMs() {} /** * Returns default TTL. @@ -2541,9 +2304,7 @@ public function memtableFlushPeriodMs() * @return int Default TTL. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-defaultTTL */ - public function defaultTTL() - { - } + public function defaultTTL() {} /** * Returns speculative retry. @@ -2551,9 +2312,7 @@ public function defaultTTL() * @return string Speculative retry. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-speculativeRetry */ - public function speculativeRetry() - { - } + public function speculativeRetry() {} /** * Returns index interval @@ -2561,9 +2320,7 @@ public function speculativeRetry() * @return int Index interval * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-indexInterval */ - public function indexInterval() - { - } + public function indexInterval() {} /** * Returns compaction strategy class name @@ -2571,9 +2328,7 @@ public function indexInterval() * @return string Compaction strategy class name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-compactionStrategyClassName */ - public function compactionStrategyClassName() - { - } + public function compactionStrategyClassName() {} /** * Returns compaction strategy options @@ -2581,9 +2336,7 @@ public function compactionStrategyClassName() * @return \Cassandra\Map Compaction strategy options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-compactionStrategyOptions */ - public function compactionStrategyOptions() - { - } + public function compactionStrategyOptions() {} /** * Returns compression parameters @@ -2591,9 +2344,7 @@ public function compactionStrategyOptions() * @return \Cassandra\Map Compression parameters * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-compressionParameters */ - public function compressionParameters() - { - } + public function compressionParameters() {} /** * Returns whether or not the `populate_io_cache_on_flush` is true @@ -2601,9 +2352,7 @@ public function compressionParameters() * @return bool Value of `populate_io_cache_on_flush` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-populateIOCacheOnFlush */ - public function populateIOCacheOnFlush() - { - } + public function populateIOCacheOnFlush() {} /** * Returns whether or not the `replicate_on_write` is true @@ -2611,9 +2360,7 @@ public function populateIOCacheOnFlush() * @return bool Value of `replicate_on_write` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-replicateOnWrite */ - public function replicateOnWrite() - { - } + public function replicateOnWrite() {} /** * Returns the value of `max_index_interval` @@ -2621,9 +2368,7 @@ public function replicateOnWrite() * @return int Value of `max_index_interval` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-maxIndexInterval */ - public function maxIndexInterval() - { - } + public function maxIndexInterval() {} /** * Returns the value of `min_index_interval` @@ -2631,9 +2376,7 @@ public function maxIndexInterval() * @return int Value of `min_index_interval` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-minIndexInterval */ - public function minIndexInterval() - { - } + public function minIndexInterval() {} /** * Returns column by name @@ -2643,9 +2386,7 @@ public function minIndexInterval() * @return \Cassandra\Column Column instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-column */ - public function column($name) - { - } + public function column($name) {} /** * Returns all columns in this view @@ -2653,47 +2394,37 @@ public function column($name) * @return array A list of Column instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-columns */ - public function columns() - { - } + public function columns() {} /** * Returns the partition key columns of the view * - * @return array A list of of Column instances + * @return array A list of Column instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-partitionKey */ - public function partitionKey() - { - } + public function partitionKey() {} /** * Returns both the partition and clustering key columns of the view * - * @return array A list of of Column instances + * @return array A list of Column instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-primaryKey */ - public function primaryKey() - { - } + public function primaryKey() {} /** * Returns the clustering key columns of the view * - * @return array A list of of Column instances + * @return array A list of Column instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-clusteringKey */ - public function clusteringKey() - { - } + public function clusteringKey() {} /** * @return array A list of cluster column orders ('asc' and 'desc') * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-clusteringOrder */ - public function clusteringOrder() - { - } + public function clusteringOrder() {} /** * Returns the base table of the view @@ -2701,10 +2432,7 @@ public function clusteringOrder() * @return \Cassandra\Table Base table of the view * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultMaterializedView/#method-baseTable */ - public function baseTable() - { - } - + public function baseTable() {} } /** @@ -2713,10 +2441,7 @@ public function baseTable() * @see \Cassandra\SSLOptions\Builder * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.SSLOptions/ */ - final class SSLOptions - { - - } + final class SSLOptions {} /** * A PHP representation of the CQL `bigint` datatype @@ -2724,7 +2449,6 @@ final class SSLOptions */ final class Bigint implements Value, Numeric { - /** * Creates a new 64bit integer. * @@ -2732,9 +2456,7 @@ final class Bigint implements Value, Numeric * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-__construct */ - public function __construct($value) - { - } + public function __construct($value) {} /** * Minimum possible Bigint value @@ -2742,9 +2464,7 @@ public function __construct($value) * @return \Cassandra\Bigint minimum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-min */ - public static function min() - { - } + public static function min() {} /** * Maximum possible Bigint value @@ -2752,9 +2472,7 @@ public static function min() * @return \Cassandra\Bigint maximum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-max */ - public static function max() - { - } + public static function max() {} /** * Returns string representation of the integer value. @@ -2762,9 +2480,7 @@ public static function max() * @return string integer value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this bigint. @@ -2772,9 +2488,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-type */ - public function type() - { - } + public function type() {} /** * Returns the integer value. @@ -2782,9 +2496,7 @@ public function type() * @return string integer value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-value */ - public function value() - { - } + public function value() {} /** * @param \Cassandra\Numeric $num a number to add to this one @@ -2792,9 +2504,7 @@ public function value() * @return \Cassandra\Numeric sum * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-add */ - public function add($num) - { - } + public function add($num) {} /** * @param \Cassandra\Numeric $num a number to subtract from this one @@ -2802,9 +2512,7 @@ public function add($num) * @return \Cassandra\Numeric difference * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-sub */ - public function sub($num) - { - } + public function sub($num) {} /** * @param \Cassandra\Numeric $num a number to multiply this one by @@ -2812,9 +2520,7 @@ public function sub($num) * @return \Cassandra\Numeric product * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-mul */ - public function mul($num) - { - } + public function mul($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -2822,9 +2528,7 @@ public function mul($num) * @return \Cassandra\Numeric quotient * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-div */ - public function div($num) - { - } + public function div($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -2832,50 +2536,37 @@ public function div($num) * @return \Cassandra\Numeric remainder * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-mod */ - public function mod($num) - { - } + public function mod($num) {} /** * @return \Cassandra\Numeric absolute value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-abs */ - public function abs() - { - } + public function abs() {} /** * @return \Cassandra\Numeric negative value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-neg */ - public function neg() - { - } + public function neg() {} /** * @return \Cassandra\Numeric square root * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-sqrt */ - public function sqrt() - { - } + public function sqrt() {} /** * @return int this number as int * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-toInt */ - public function toInt() - { - } + public function toInt() {} /** * @return float this number as float * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Bigint/#method-toDouble */ - public function toDouble() - { - } - + public function toDouble() {} } /** @@ -2886,11 +2577,10 @@ public function toDouble() */ final class FutureSession implements Future { - /** * Waits for a given future resource to resolve and throws errors if any. * - * @param int|double|null $timeout A timeout in seconds + * @param int|float|null $timeout A timeout in seconds * * @return \Cassandra\Session A connected session * @throws \Cassandra\Exception\TimeoutException @@ -2898,10 +2588,7 @@ final class FutureSession implements Future * @throws \Cassandra\Exception\InvalidArgumentException * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureSession/#method-get */ - public function get($timeout) - { - } - + public function get($timeout) {} } /** @@ -2910,7 +2597,6 @@ public function get($timeout) */ final class Set implements Value, \Countable, \Iterator { - /** * Creates a new collection of a given type. * @@ -2918,9 +2604,7 @@ final class Set implements Value, \Countable, \Iterator * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-__construct */ - public function __construct($type) - { - } + public function __construct($type) {} /** * The type of this set. @@ -2928,9 +2612,7 @@ public function __construct($type) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-type */ - public function type() - { - } + public function type() {} /** * Array of values in this set. @@ -2938,9 +2620,7 @@ public function type() * @return array values * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-values */ - public function values() - { - } + public function values() {} /** * Adds a value to this set. @@ -2950,9 +2630,7 @@ public function values() * @return bool whether the value has been added * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-add */ - public function add($value) - { - } + public function add($value) {} /** * Returns whether a value is in this set. @@ -2962,9 +2640,7 @@ public function add($value) * @return bool whether the value is in the set * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-has */ - public function has($value) - { - } + public function has($value) {} /** * Removes a value to this set. @@ -2974,9 +2650,7 @@ public function has($value) * @return bool whether the value has been removed * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-remove */ - public function remove($value) - { - } + public function remove($value) {} /** * Total number of elements in this set @@ -2984,9 +2658,7 @@ public function remove($value) * @return int count * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-count */ - public function count() - { - } + public function count() {} /** * Current element for iteration @@ -2994,9 +2666,7 @@ public function count() * @return mixed current element * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-current */ - public function current() - { - } + public function current() {} /** * Current key for iteration @@ -3004,9 +2674,7 @@ public function current() * @return int current key * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-key */ - public function key() - { - } + public function key() {} /** * Move internal iterator forward @@ -3014,9 +2682,7 @@ public function key() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-next */ - public function next() - { - } + public function next() {} /** * Check whether a current value exists @@ -3024,9 +2690,7 @@ public function next() * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-valid */ - public function valid() - { - } + public function valid() {} /** * Rewind internal iterator @@ -3034,10 +2698,7 @@ public function valid() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Set/#method-rewind */ - public function rewind() - { - } - + public function rewind() {} } /** @@ -3046,16 +2707,13 @@ public function rewind() */ final class DefaultIndex implements Index { - /** * Returns the name of the index * * @return string Name of the index * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-name */ - public function name() - { - } + public function name() {} /** * Returns the kind of index @@ -3063,9 +2721,7 @@ public function name() * @return string Kind of the index * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-kind */ - public function kind() - { - } + public function kind() {} /** * Returns the target column of the index @@ -3073,9 +2729,7 @@ public function kind() * @return string Target column name of the index * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-target */ - public function target() - { - } + public function target() {} /** * Return a column's option by name @@ -3085,9 +2739,7 @@ public function target() * @return \Cassandra\Value Value of an option by name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-option */ - public function option($name) - { - } + public function option($name) {} /** * Returns all the index's options @@ -3095,9 +2747,7 @@ public function option($name) * @return array A dictionary of `string` and `Value` pairs of the index's options. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-options */ - public function options() - { - } + public function options() {} /** * Returns the class name of the index @@ -3105,9 +2755,7 @@ public function options() * @return string Class name of a custom index * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-className */ - public function className() - { - } + public function className() {} /** * Determines if the index is a custom index. @@ -3115,10 +2763,7 @@ public function className() * @return bool true if a custom index * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultIndex/#method-isCustom */ - public function isCustom() - { - } - + public function isCustom() {} } /** @@ -3127,16 +2772,13 @@ public function isCustom() */ final class DefaultAggregate implements Aggregate { - /** * Returns the full name of the aggregate * * @return string Full name of the aggregate including name and types * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-name */ - public function name() - { - } + public function name() {} /** * Returns the simple name of the aggregate @@ -3144,9 +2786,7 @@ public function name() * @return string Simple name of the aggregate * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-simpleName */ - public function simpleName() - { - } + public function simpleName() {} /** * Returns the argument types of the aggregate @@ -3154,9 +2794,7 @@ public function simpleName() * @return array Argument types of the aggregate * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-argumentTypes */ - public function argumentTypes() - { - } + public function argumentTypes() {} /** * Returns the state function of the aggregate @@ -3164,9 +2802,7 @@ public function argumentTypes() * @return \Cassandra\Function_ State public function of the aggregate * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-stateFunction */ - public function stateFunction() - { - } + public function stateFunction() {} /** * Returns the final function of the aggregate @@ -3174,9 +2810,7 @@ public function stateFunction() * @return \Cassandra\Function_ Final public function of the aggregate * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-finalFunction */ - public function finalFunction() - { - } + public function finalFunction() {} /** * Returns the initial condition of the aggregate @@ -3184,9 +2818,7 @@ public function finalFunction() * @return \Cassandra\Value Initial condition of the aggregate * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-initialCondition */ - public function initialCondition() - { - } + public function initialCondition() {} /** * Returns the state type of the aggregate @@ -3194,9 +2826,7 @@ public function initialCondition() * @return \Cassandra\Type State type of the aggregate * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-stateType */ - public function stateType() - { - } + public function stateType() {} /** * Returns the return type of the aggregate @@ -3204,9 +2834,7 @@ public function stateType() * @return \Cassandra\Type Return type of the aggregate * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-returnType */ - public function returnType() - { - } + public function returnType() {} /** * Returns the signature of the aggregate @@ -3214,10 +2842,7 @@ public function returnType() * @return string Signature of the aggregate (same as name()) * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultAggregate/#method-signature */ - public function signature() - { - } - + public function signature() {} } /** @@ -3226,7 +2851,6 @@ public function signature() */ final class Timestamp implements Value { - /** * Creates a new timestamp from either unix timestamp and microseconds or * from the current time by default. @@ -3236,9 +2860,7 @@ final class Timestamp implements Value * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-__construct */ - public function __construct($seconds, $microseconds) - { - } + public function __construct($seconds, $microseconds) {} /** * The type of this timestamp. @@ -3246,9 +2868,7 @@ public function __construct($seconds, $microseconds) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-type */ - public function type() - { - } + public function type() {} /** * Unix timestamp. @@ -3258,9 +2878,7 @@ public function type() * @see time * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-time */ - public function time() - { - } + public function time() {} /** * Microtime from this timestamp @@ -3272,9 +2890,7 @@ public function time() * @see microtime * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-microtime */ - public function microtime($get_as_float) - { - } + public function microtime($get_as_float) {} /** * Converts current timestamp to PHP DateTime. @@ -3282,9 +2898,7 @@ public function microtime($get_as_float) * @return \DateTime PHP representation * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-toDateTime */ - public function toDateTime() - { - } + public function toDateTime() {} /** * Returns a string representation of this timestamp. @@ -3292,10 +2906,7 @@ public function toDateTime() * @return string timestamp * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timestamp/#method-__toString */ - public function __toString() - { - } - + public function __toString() {} } /** @@ -3304,17 +2915,14 @@ public function __toString() */ final class Tinyint implements Value, Numeric { - /** * Creates a new 8-bit signed integer. * - * @param int|double|string $value The value as an integer, double or string + * @param int|float|string $value The value as an integer, float or string * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-__construct */ - public function __construct($value) - { - } + public function __construct($value) {} /** * Minimum possible Tinyint value @@ -3322,9 +2930,7 @@ public function __construct($value) * @return \Cassandra\Tinyint minimum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-min */ - public static function min() - { - } + public static function min() {} /** * Maximum possible Tinyint value @@ -3332,17 +2938,13 @@ public static function min() * @return \Cassandra\Tinyint maximum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-max */ - public static function max() - { - } + public static function max() {} /** * @return string * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this value (tinyint). @@ -3350,9 +2952,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-type */ - public function type() - { - } + public function type() {} /** * Returns the integer value. @@ -3360,9 +2960,7 @@ public function type() * @return int integer value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-value */ - public function value() - { - } + public function value() {} /** * @param \Cassandra\Numeric $num a number to add to this one @@ -3370,9 +2968,7 @@ public function value() * @return \Cassandra\Numeric sum * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-add */ - public function add($num) - { - } + public function add($num) {} /** * @param \Cassandra\Numeric $num a number to subtract from this one @@ -3380,9 +2976,7 @@ public function add($num) * @return \Cassandra\Numeric difference * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-sub */ - public function sub($num) - { - } + public function sub($num) {} /** * @param \Cassandra\Numeric $num a number to multiply this one by @@ -3390,9 +2984,7 @@ public function sub($num) * @return \Cassandra\Numeric product * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-mul */ - public function mul($num) - { - } + public function mul($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -3400,9 +2992,7 @@ public function mul($num) * @return \Cassandra\Numeric quotient * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-div */ - public function div($num) - { - } + public function div($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -3410,50 +3000,37 @@ public function div($num) * @return \Cassandra\Numeric remainder * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-mod */ - public function mod($num) - { - } + public function mod($num) {} /** * @return \Cassandra\Numeric absolute value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-abs */ - public function abs() - { - } + public function abs() {} /** * @return \Cassandra\Numeric negative value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-neg */ - public function neg() - { - } + public function neg() {} /** * @return \Cassandra\Numeric square root * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-sqrt */ - public function sqrt() - { - } + public function sqrt() {} /** * @return int this number as int * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-toInt */ - public function toInt() - { - } + public function toInt() {} /** * @return float this number as float * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Tinyint/#method-toDouble */ - public function toDouble() - { - } - + public function toDouble() {} } /** @@ -3462,7 +3039,6 @@ public function toDouble() */ final class Timeuuid implements Value, UuidInterface { - /** * Creates a timeuuid from a given timestamp or current time. * @@ -3470,9 +3046,7 @@ final class Timeuuid implements Value, UuidInterface * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-__construct */ - public function __construct($timestamp) - { - } + public function __construct($timestamp) {} /** * Returns this timeuuid as string. @@ -3480,9 +3054,7 @@ public function __construct($timestamp) * @return string timeuuid * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this timeuuid. @@ -3490,9 +3062,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-type */ - public function type() - { - } + public function type() {} /** * Returns this timeuuid as string. @@ -3500,9 +3070,7 @@ public function type() * @return string timeuuid * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-uuid */ - public function uuid() - { - } + public function uuid() {} /** * Returns the version of this timeuuid. @@ -3510,9 +3078,7 @@ public function uuid() * @return int version of this timeuuid * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-version */ - public function version() - { - } + public function version() {} /** * Unix timestamp. @@ -3522,9 +3088,7 @@ public function version() * @see time * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-time */ - public function time() - { - } + public function time() {} /** * Converts current timeuuid to PHP DateTime. @@ -3532,10 +3096,7 @@ public function time() * @return \DateTime PHP representation * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Timeuuid/#method-toDateTime */ - public function toDateTime() - { - } - + public function toDateTime() {} } /** @@ -3547,7 +3108,6 @@ public function toDateTime() */ final class DefaultSession implements Session { - /** * Execute a query. * @@ -3571,9 +3131,7 @@ final class DefaultSession implements Session * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-execute */ - public function execute($statement, $options) - { - } + public function execute($statement, $options) {} /** * Execute a query asynchronously. This method returns immediately, but @@ -3587,9 +3145,7 @@ public function execute($statement, $options) * @see \Cassandra\Session::execute() for valid execution options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-executeAsync */ - public function executeAsync($statement, $options) - { - } + public function executeAsync($statement, $options) {} /** * Prepare a query for execution. @@ -3604,9 +3160,7 @@ public function executeAsync($statement, $options) * @see \Cassandra\Session::execute() for valid execution options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-prepare */ - public function prepare($cql, $options) - { - } + public function prepare($cql, $options) {} /** * Asynchronously prepare a query for execution. @@ -3619,23 +3173,19 @@ public function prepare($cql, $options) * @see \Cassandra\Session::execute() for valid execution options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-prepareAsync */ - public function prepareAsync($cql, $options) - { - } + public function prepareAsync($cql, $options) {} /** * Close the session and all its connections. * - * @param double $timeout The amount of time in seconds to wait for the session to close. + * @param float $timeout The amount of time in seconds to wait for the session to close. * * @return null Nothing. * @throws \Cassandra\Exception * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-close */ - public function close($timeout) - { - } + public function close($timeout) {} /** * Asynchronously close the session and all its connections. @@ -3643,9 +3193,7 @@ public function close($timeout) * @return \Cassandra\FutureClose A future that can be waited on. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-closeAsync */ - public function closeAsync() - { - } + public function closeAsync() {} /** * Get performance and diagnostic metrics. @@ -3653,9 +3201,7 @@ public function closeAsync() * @return array Performance/Diagnostic metrics. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-metrics */ - public function metrics() - { - } + public function metrics() {} /** * Get a snapshot of the cluster's current schema. @@ -3663,10 +3209,7 @@ public function metrics() * @return \Cassandra\Schema A snapshot of the cluster's schema. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultSession/#method-schema */ - public function schema() - { - } - + public function schema() {} } /** @@ -3675,15 +3218,13 @@ public function schema() */ abstract class Custom implements Value { - /** * The type of this value. * * @return \Cassandra\Type\Custom * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Custom/#method-type */ - public abstract function type(); - + abstract public function type(); } /** @@ -3692,14 +3233,13 @@ public abstract function type(); */ abstract class MaterializedView implements Table { - /** * Returns the base table of the view * * @return \Cassandra\Table Base table of the view * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-baseTable */ - public abstract function baseTable(); + abstract public function baseTable(); /** * Returns the name of this view @@ -3707,7 +3247,7 @@ public abstract function baseTable(); * @return string Name of the view * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-name */ - public abstract function name(); + abstract public function name(); /** * Return a view's option by name @@ -3717,7 +3257,7 @@ public abstract function name(); * @return \Cassandra\Value Value of an option by name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-option */ - public abstract function option($name); + abstract public function option($name); /** * Returns all the view's options @@ -3726,7 +3266,7 @@ public abstract function option($name); * view's options. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-options */ - public abstract function options(); + abstract public function options(); /** * Description of the view, if any @@ -3734,7 +3274,7 @@ public abstract function options(); * @return string View description or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-comment */ - public abstract function comment(); + abstract public function comment(); /** * Returns read repair chance @@ -3742,7 +3282,7 @@ public abstract function comment(); * @return float Read repair chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-readRepairChance */ - public abstract function readRepairChance(); + abstract public function readRepairChance(); /** * Returns local read repair chance @@ -3750,7 +3290,7 @@ public abstract function readRepairChance(); * @return float Local read repair chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-localReadRepairChance */ - public abstract function localReadRepairChance(); + abstract public function localReadRepairChance(); /** * Returns GC grace seconds @@ -3758,7 +3298,7 @@ public abstract function localReadRepairChance(); * @return int GC grace seconds * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-gcGraceSeconds */ - public abstract function gcGraceSeconds(); + abstract public function gcGraceSeconds(); /** * Returns caching options @@ -3766,7 +3306,7 @@ public abstract function gcGraceSeconds(); * @return string Caching options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-caching */ - public abstract function caching(); + abstract public function caching(); /** * Returns bloom filter FP chance @@ -3774,7 +3314,7 @@ public abstract function caching(); * @return float Bloom filter FP chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-bloomFilterFPChance */ - public abstract function bloomFilterFPChance(); + abstract public function bloomFilterFPChance(); /** * Returns memtable flush period in milliseconds @@ -3782,7 +3322,7 @@ public abstract function bloomFilterFPChance(); * @return int Memtable flush period in milliseconds * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-memtableFlushPeriodMs */ - public abstract function memtableFlushPeriodMs(); + abstract public function memtableFlushPeriodMs(); /** * Returns default TTL. @@ -3790,7 +3330,7 @@ public abstract function memtableFlushPeriodMs(); * @return int Default TTL. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-defaultTTL */ - public abstract function defaultTTL(); + abstract public function defaultTTL(); /** * Returns speculative retry. @@ -3798,7 +3338,7 @@ public abstract function defaultTTL(); * @return string Speculative retry. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-speculativeRetry */ - public abstract function speculativeRetry(); + abstract public function speculativeRetry(); /** * Returns index interval @@ -3806,7 +3346,7 @@ public abstract function speculativeRetry(); * @return int Index interval * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-indexInterval */ - public abstract function indexInterval(); + abstract public function indexInterval(); /** * Returns compaction strategy class name @@ -3814,7 +3354,7 @@ public abstract function indexInterval(); * @return string Compaction strategy class name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-compactionStrategyClassName */ - public abstract function compactionStrategyClassName(); + abstract public function compactionStrategyClassName(); /** * Returns compaction strategy options @@ -3822,7 +3362,7 @@ public abstract function compactionStrategyClassName(); * @return \Cassandra\Map Compaction strategy options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-compactionStrategyOptions */ - public abstract function compactionStrategyOptions(); + abstract public function compactionStrategyOptions(); /** * Returns compression parameters @@ -3830,7 +3370,7 @@ public abstract function compactionStrategyOptions(); * @return \Cassandra\Map Compression parameters * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-compressionParameters */ - public abstract function compressionParameters(); + abstract public function compressionParameters(); /** * Returns whether or not the `populate_io_cache_on_flush` is true @@ -3838,7 +3378,7 @@ public abstract function compressionParameters(); * @return bool Value of `populate_io_cache_on_flush` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-populateIOCacheOnFlush */ - public abstract function populateIOCacheOnFlush(); + abstract public function populateIOCacheOnFlush(); /** * Returns whether or not the `replicate_on_write` is true @@ -3846,7 +3386,7 @@ public abstract function populateIOCacheOnFlush(); * @return bool Value of `replicate_on_write` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-replicateOnWrite */ - public abstract function replicateOnWrite(); + abstract public function replicateOnWrite(); /** * Returns the value of `max_index_interval` @@ -3854,7 +3394,7 @@ public abstract function replicateOnWrite(); * @return int Value of `max_index_interval` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-maxIndexInterval */ - public abstract function maxIndexInterval(); + abstract public function maxIndexInterval(); /** * Returns the value of `min_index_interval` @@ -3862,7 +3402,7 @@ public abstract function maxIndexInterval(); * @return int Value of `min_index_interval` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-minIndexInterval */ - public abstract function minIndexInterval(); + abstract public function minIndexInterval(); /** * Returns column by name @@ -3872,7 +3412,7 @@ public abstract function minIndexInterval(); * @return \Cassandra\Column Column instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-column */ - public abstract function column($name); + abstract public function column($name); /** * Returns all columns in this view @@ -3880,38 +3420,37 @@ public abstract function column($name); * @return array A list of `Column` instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-columns */ - public abstract function columns(); + abstract public function columns(); /** * Returns the partition key columns of the view * - * @return array A list of of `Column` instances + * @return array A list of `Column` instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-partitionKey */ - public abstract function partitionKey(); + abstract public function partitionKey(); /** * Returns both the partition and clustering key columns of the view * - * @return array A list of of `Column` instances + * @return array A list of `Column` instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-primaryKey */ - public abstract function primaryKey(); + abstract public function primaryKey(); /** * Returns the clustering key columns of the view * - * @return array A list of of `Column` instances + * @return array A list of `Column` instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-clusteringKey */ - public abstract function clusteringKey(); + abstract public function clusteringKey(); /** * @return array A list of cluster column orders ('asc' and 'desc') * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.MaterializedView/#method-clusteringOrder */ - public abstract function clusteringOrder(); - + abstract public function clusteringOrder(); } /** @@ -3920,7 +3459,6 @@ public abstract function clusteringOrder(); */ final class Time implements Value { - /** * Creates a new Time object * @@ -3928,9 +3466,7 @@ final class Time implements Value * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-__construct */ - public function __construct($nanoseconds) - { - } + public function __construct($nanoseconds) {} /** * @param \DateTime $datetime @@ -3938,9 +3474,7 @@ public function __construct($nanoseconds) * @return \Cassandra\Time * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-fromDateTime */ - public static function fromDateTime($datetime) - { - } + public static function fromDateTime($datetime) {} /** * The type of this date. @@ -3948,26 +3482,19 @@ public static function fromDateTime($datetime) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-type */ - public function type() - { - } + public function type() {} /** * @return int * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-seconds */ - public function seconds() - { - } + public function seconds() {} /** * @return string this date in string format: Time(nanoseconds=$nanoseconds) * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Time/#method-__toString */ - public function __toString() - { - } - + public function __toString() {} } /** @@ -3976,16 +3503,13 @@ public function __toString() */ abstract class Type { - /** * Get representation of ascii type * * @return \Cassandra\Type ascii type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-ascii */ - public static final function ascii() - { - } + final public static function ascii() {} /** * Get representation of bigint type @@ -3993,9 +3517,7 @@ public static final function ascii() * @return \Cassandra\Type bigint type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-bigint */ - public static final function bigint() - { - } + final public static function bigint() {} /** * Get representation of smallint type @@ -4003,9 +3525,7 @@ public static final function bigint() * @return \Cassandra\Type smallint type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-smallint */ - public static final function smallint() - { - } + final public static function smallint() {} /** * Get representation of tinyint type @@ -4013,9 +3533,7 @@ public static final function smallint() * @return \Cassandra\Type tinyint type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-tinyint */ - public static final function tinyint() - { - } + final public static function tinyint() {} /** * Get representation of blob type @@ -4023,9 +3541,7 @@ public static final function tinyint() * @return \Cassandra\Type blob type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-blob */ - public static final function blob() - { - } + final public static function blob() {} /** * Get representation of boolean type @@ -4033,9 +3549,7 @@ public static final function blob() * @return \Cassandra\Type boolean type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-boolean */ - public static final function boolean() - { - } + final public static function boolean() {} /** * Get representation of counter type @@ -4043,9 +3557,7 @@ public static final function boolean() * @return \Cassandra\Type counter type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-counter */ - public static final function counter() - { - } + final public static function counter() {} /** * Get representation of decimal type @@ -4053,9 +3565,7 @@ public static final function counter() * @return \Cassandra\Type decimal type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-decimal */ - public static final function decimal() - { - } + final public static function decimal() {} /** * Get representation of double type @@ -4063,9 +3573,7 @@ public static final function decimal() * @return \Cassandra\Type double type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-double */ - public static final function double() - { - } + final public static function double() {} /** * Get representation of duration type @@ -4073,9 +3581,7 @@ public static final function double() * @return \Cassandra\Type duration type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-duration */ - public static final function duration() - { - } + final public static function duration() {} /** * Get representation of float type @@ -4083,9 +3589,7 @@ public static final function duration() * @return \Cassandra\Type float type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-float */ - public static final function float() - { - } + final public static function float() {} /** * Get representation of int type @@ -4093,9 +3597,7 @@ public static final function float() * @return \Cassandra\Type int type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-int */ - public static final function int() - { - } + final public static function int() {} /** * Get representation of text type @@ -4103,9 +3605,7 @@ public static final function int() * @return \Cassandra\Type text type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-text */ - public static final function text() - { - } + final public static function text() {} /** * Get representation of timestamp type @@ -4113,9 +3613,7 @@ public static final function text() * @return \Cassandra\Type timestamp type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-timestamp */ - public static final function timestamp() - { - } + final public static function timestamp() {} /** * Get representation of date type @@ -4123,9 +3621,7 @@ public static final function timestamp() * @return \Cassandra\Type date type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-date */ - public static final function date() - { - } + final public static function date() {} /** * Get representation of time type @@ -4133,9 +3629,7 @@ public static final function date() * @return \Cassandra\Type time type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-time */ - public static final function time() - { - } + final public static function time() {} /** * Get representation of uuid type @@ -4143,9 +3637,7 @@ public static final function time() * @return \Cassandra\Type uuid type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-uuid */ - public static final function uuid() - { - } + final public static function uuid() {} /** * Get representation of varchar type @@ -4153,9 +3645,7 @@ public static final function uuid() * @return \Cassandra\Type varchar type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-varchar */ - public static final function varchar() - { - } + final public static function varchar() {} /** * Get representation of varint type @@ -4163,9 +3653,7 @@ public static final function varchar() * @return \Cassandra\Type varint type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-varint */ - public static final function varint() - { - } + final public static function varint() {} /** * Get representation of timeuuid type @@ -4173,9 +3661,7 @@ public static final function varint() * @return \Cassandra\Type timeuuid type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-timeuuid */ - public static final function timeuuid() - { - } + final public static function timeuuid() {} /** * Get representation of inet type @@ -4183,13 +3669,11 @@ public static final function timeuuid() * @return \Cassandra\Type inet type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-inet */ - public static final function inet() - { - } + final public static function inet() {} /** * Initialize a Collection type - * @code{.php} + * ```php * create(1, 2, 3, 4, 5, 6, 7, 8, 9); * * var_dump($collection); - * @endcode + * ``` * * @param \Cassandra\Type $type The type of values * * @return \Cassandra\Type The collection type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-collection */ - public static final function collection($type) - { - } + final public static function collection($type) {} /** * Initialize a set type - * @code{.php} + * ``` * create("a", "b", "c", "d", "e", "f", "g", "h", "i", "j"); * * var_dump($set); - * @endcode + * ``` * * @param \Cassandra\Type $type The types of values * * @return \Cassandra\Type The set type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-set */ - public static final function set($type) - { - } + final public static function set($type) {} /** * Initialize a map type - * @code{.php} - * create(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f") * - * var_dump($map); - * @endcode + * var_dump($map);``` * * @param \Cassandra\Type $keyType The type of keys * @param \Cassandra\Type $valueType The type of values @@ -4247,51 +3725,41 @@ public static final function set($type) * @return \Cassandra\Type The map type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-map */ - public static final function map($keyType, $valueType) - { - } + final public static function map($keyType, $valueType) {} /** * Initialize a tuple type - * @code{.php} - * create("a", 123); * - * var_dump($tuple); - * @endcode + * var_dump($tuple);``` * * @param \Cassandra\Type $types A variadic list of types * * @return \Cassandra\Type The tuple type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-tuple */ - public static final function tuple($types) - { - } + final public static function tuple($types) {} /** * Initialize a user type - * @code{.php} - * create("a", "abc", "b", 123); * - * var_dump($userType); - * @endcode + * var_dump($userType);``` * * @param \Cassandra\Type $types A variadic list of name/type pairs * * @return \Cassandra\Type The user type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-userType */ - public static final function userType($types) - { - } + final public static function userType($types) {} /** * Returns the name of this type as string. @@ -4299,7 +3767,7 @@ public static final function userType($types) * @return string Name of this type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-name */ - public abstract function name(); + abstract public function name(); /** * Returns string representation of this type. @@ -4307,8 +3775,7 @@ public abstract function name(); * @return string String representation of this type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Type/#method-__toString */ - public abstract function __toString(); - + abstract public function __toString(); } /** @@ -4317,7 +3784,6 @@ public abstract function __toString(); */ final class Varint implements Value, Numeric { - /** * Creates a new variable length integer. * @@ -4325,9 +3791,7 @@ final class Varint implements Value, Numeric * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-__construct */ - public function __construct($value) - { - } + public function __construct($value) {} /** * Returns the integer value. @@ -4335,9 +3799,7 @@ public function __construct($value) * @return string integer value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this varint. @@ -4345,9 +3807,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-type */ - public function type() - { - } + public function type() {} /** * Returns the integer value. @@ -4355,9 +3815,7 @@ public function type() * @return string integer value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-value */ - public function value() - { - } + public function value() {} /** * @param \Cassandra\Numeric $num a number to add to this one @@ -4365,9 +3823,7 @@ public function value() * @return \Cassandra\Numeric sum * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-add */ - public function add($num) - { - } + public function add($num) {} /** * @param \Cassandra\Numeric $num a number to subtract from this one @@ -4375,9 +3831,7 @@ public function add($num) * @return \Cassandra\Numeric difference * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-sub */ - public function sub($num) - { - } + public function sub($num) {} /** * @param \Cassandra\Numeric $num a number to multiply this one by @@ -4385,9 +3839,7 @@ public function sub($num) * @return \Cassandra\Numeric product * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-mul */ - public function mul($num) - { - } + public function mul($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -4395,9 +3847,7 @@ public function mul($num) * @return \Cassandra\Numeric quotient * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-div */ - public function div($num) - { - } + public function div($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -4405,50 +3855,37 @@ public function div($num) * @return \Cassandra\Numeric remainder * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-mod */ - public function mod($num) - { - } + public function mod($num) {} /** * @return \Cassandra\Numeric absolute value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-abs */ - public function abs() - { - } + public function abs() {} /** * @return \Cassandra\Numeric negative value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-neg */ - public function neg() - { - } + public function neg() {} /** * @return \Cassandra\Numeric square root * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-sqrt */ - public function sqrt() - { - } + public function sqrt() {} /** * @return int this number as int * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-toInt */ - public function toInt() - { - } + public function toInt() {} /** * @return float this number as float * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Varint/#method-toDouble */ - public function toDouble() - { - } - + public function toDouble() {} } /** @@ -4457,7 +3894,6 @@ public function toDouble() */ final class Map implements Value, \Countable, \Iterator, \ArrayAccess { - /** * Creates a new map of a given key and value type. * @@ -4466,9 +3902,7 @@ final class Map implements Value, \Countable, \Iterator, \ArrayAccess * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-__construct */ - public function __construct($keyType, $valueType) - { - } + public function __construct($keyType, $valueType) {} /** * The type of this map. @@ -4476,9 +3910,7 @@ public function __construct($keyType, $valueType) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-type */ - public function type() - { - } + public function type() {} /** * Returns all keys in the map as an array. @@ -4486,9 +3918,7 @@ public function type() * @return array keys * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-keys */ - public function keys() - { - } + public function keys() {} /** * Returns all values in the map as an array. @@ -4496,9 +3926,7 @@ public function keys() * @return array values * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-values */ - public function values() - { - } + public function values() {} /** * Sets key/value in the map. @@ -4509,9 +3937,7 @@ public function values() * @return mixed * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-set */ - public function set($key, $value) - { - } + public function set($key, $value) {} /** * Gets the value of the key in the map. @@ -4521,9 +3947,7 @@ public function set($key, $value) * @return mixed Value or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-get */ - public function get($key) - { - } + public function get($key) {} /** * Removes the key from the map. @@ -4533,9 +3957,7 @@ public function get($key) * @return bool Whether the key was removed or not, e.g. didn't exist * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-remove */ - public function remove($key) - { - } + public function remove($key) {} /** * Returns whether the key is in the map. @@ -4545,9 +3967,7 @@ public function remove($key) * @return bool Whether the key is in the map or not * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-has */ - public function has($key) - { - } + public function has($key) {} /** * Total number of elements in this map @@ -4555,9 +3975,7 @@ public function has($key) * @return int count * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-count */ - public function count() - { - } + public function count() {} /** * Current value for iteration @@ -4565,9 +3983,7 @@ public function count() * @return mixed current value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-current */ - public function current() - { - } + public function current() {} /** * Current key for iteration @@ -4575,9 +3991,7 @@ public function current() * @return int current key * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-key */ - public function key() - { - } + public function key() {} /** * Move internal iterator forward @@ -4585,9 +3999,7 @@ public function key() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-next */ - public function next() - { - } + public function next() {} /** * Check whether a current value exists @@ -4595,9 +4007,7 @@ public function next() * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-valid */ - public function valid() - { - } + public function valid() {} /** * Rewind internal iterator @@ -4605,9 +4015,7 @@ public function valid() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-rewind */ - public function rewind() - { - } + public function rewind() {} /** * Sets the value at a given key @@ -4620,9 +4028,7 @@ public function rewind() * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetSet */ - public function offsetSet($key, $value) - { - } + public function offsetSet($key, $value) {} /** * Retrieves the value at a given key @@ -4634,9 +4040,7 @@ public function offsetSet($key, $value) * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetGet */ - public function offsetGet($key) - { - } + public function offsetGet($key) {} /** * Deletes the value at a given key @@ -4648,9 +4052,7 @@ public function offsetGet($key) * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetUnset */ - public function offsetUnset($key) - { - } + public function offsetUnset($key) {} /** * Returns whether the value a given key is present @@ -4662,10 +4064,7 @@ public function offsetUnset($key) * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Map/#method-offsetExists */ - public function offsetExists($key) - { - } - + public function offsetExists($key) {} } /** @@ -4674,7 +4073,6 @@ public function offsetExists($key) */ final class Uuid implements Value, UuidInterface { - /** * Creates a uuid from a given uuid string or a random one. * @@ -4682,9 +4080,7 @@ final class Uuid implements Value, UuidInterface * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-__construct */ - public function __construct($uuid) - { - } + public function __construct($uuid) {} /** * Returns this uuid as string. @@ -4692,9 +4088,7 @@ public function __construct($uuid) * @return string uuid * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this uuid. @@ -4702,9 +4096,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-type */ - public function type() - { - } + public function type() {} /** * Returns this uuid as string. @@ -4712,9 +4104,7 @@ public function type() * @return string uuid * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-uuid */ - public function uuid() - { - } + public function uuid() {} /** * Returns the version of this uuid. @@ -4722,10 +4112,7 @@ public function uuid() * @return int version of this uuid * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Uuid/#method-version */ - public function version() - { - } - + public function version() {} } /** @@ -4734,17 +4121,14 @@ public function version() */ final class Float_ implements Value, Numeric { - /** * Creates a new float. * - * @param double|int|string|\Cassandra\Float_ $value A float value as a string, number or Float + * @param float|int|string|\Cassandra\Float_ $value A float value as a string, number or Float * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-__construct */ - public function __construct($value) - { - } + public function __construct($value) {} /** * Minimum possible Float value @@ -4752,9 +4136,7 @@ public function __construct($value) * @return \Cassandra\Float_ minimum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-min */ - public static function min() - { - } + public static function min() {} /** * Maximum possible Float value @@ -4762,9 +4144,7 @@ public static function min() * @return \Cassandra\Float_ maximum value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-max */ - public static function max() - { - } + public static function max() {} /** * Returns string representation of the float value. @@ -4772,9 +4152,7 @@ public static function max() * @return string float value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this float. @@ -4782,9 +4160,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-type */ - public function type() - { - } + public function type() {} /** * Returns the float value. @@ -4792,33 +4168,25 @@ public function type() * @return float float value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-value */ - public function value() - { - } + public function value() {} /** * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-isInfinite */ - public function isInfinite() - { - } + public function isInfinite() {} /** * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-isFinite */ - public function isFinite() - { - } + public function isFinite() {} /** * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-isNaN */ - public function isNaN() - { - } + public function isNaN() {} /** * @param \Cassandra\Numeric $num a number to add to this one @@ -4826,9 +4194,7 @@ public function isNaN() * @return \Cassandra\Numeric sum * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-add */ - public function add($num) - { - } + public function add($num) {} /** * @param \Cassandra\Numeric $num a number to subtract from this one @@ -4836,9 +4202,7 @@ public function add($num) * @return \Cassandra\Numeric difference * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-sub */ - public function sub($num) - { - } + public function sub($num) {} /** * @param \Cassandra\Numeric $num a number to multiply this one by @@ -4846,9 +4210,7 @@ public function sub($num) * @return \Cassandra\Numeric product * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-mul */ - public function mul($num) - { - } + public function mul($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -4856,9 +4218,7 @@ public function mul($num) * @return \Cassandra\Numeric quotient * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-div */ - public function div($num) - { - } + public function div($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -4866,50 +4226,37 @@ public function div($num) * @return \Cassandra\Numeric remainder * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-mod */ - public function mod($num) - { - } + public function mod($num) {} /** * @return \Cassandra\Numeric absolute value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-abs */ - public function abs() - { - } + public function abs() {} /** * @return \Cassandra\Numeric negative value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-neg */ - public function neg() - { - } + public function neg() {} /** * @return \Cassandra\Numeric square root * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-sqrt */ - public function sqrt() - { - } + public function sqrt() {} /** * @return int this number as int * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-toInt */ - public function toInt() - { - } + public function toInt() {} /** * @return float this number as float * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Float/#method-toDouble */ - public function toDouble() - { - } - + public function toDouble() {} } /** @@ -4918,17 +4265,14 @@ public function toDouble() */ final class Duration implements Value { - /** - * @param long|double|string|\Cassandra\Bigint $months Months attribute of the duration. - * @param long|double|string|\Cassandra\Bigint $days Days attribute of the duration. - * @param long|double|string|\Cassandra\Bigint $nanos Nanos attribute of the duration. + * @param int|float|string|\Cassandra\Bigint $months Months attribute of the duration. + * @param int|float|string|\Cassandra\Bigint $days Days attribute of the duration. + * @param int|float|string|\Cassandra\Bigint $nanos Nanos attribute of the duration. * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-__construct */ - public function __construct($months, $days, $nanos) - { - } + public function __construct($months, $days, $nanos) {} /** * The type of represented by the value. @@ -4936,42 +4280,31 @@ public function __construct($months, $days, $nanos) * @return \Cassandra\Type the Cassandra type for Duration * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-type */ - public function type() - { - } + public function type() {} /** * @return string the months attribute of this Duration * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-months */ - public function months() - { - } + public function months() {} /** * @return string the days attribute of this Duration * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-days */ - public function days() - { - } + public function days() {} /** * @return string the nanoseconds attribute of this Duration * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-nanos */ - public function nanos() - { - } + public function nanos() {} /** * @return string string representation of this Duration; may be used as a literal parameter in CQL queries. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-__toString */ - public function __toString() - { - } - + public function __toString() {} } /** @@ -4980,16 +4313,13 @@ public function __toString() */ final class DefaultKeyspace implements Keyspace { - /** * Returns keyspace name * * @return string Name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-name */ - public function name() - { - } + public function name() {} /** * Returns replication class name @@ -4997,9 +4327,7 @@ public function name() * @return string Replication class * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-replicationClassName */ - public function replicationClassName() - { - } + public function replicationClassName() {} /** * Returns replication options @@ -5007,9 +4335,7 @@ public function replicationClassName() * @return \Cassandra\Map Replication options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-replicationOptions */ - public function replicationOptions() - { - } + public function replicationOptions() {} /** * Returns whether the keyspace has durable writes enabled @@ -5017,9 +4343,7 @@ public function replicationOptions() * @return string Whether durable writes are enabled * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-hasDurableWrites */ - public function hasDurableWrites() - { - } + public function hasDurableWrites() {} /** * Returns a table by name @@ -5029,9 +4353,7 @@ public function hasDurableWrites() * @return \Cassandra\Table * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-table */ - public function table($name) - { - } + public function table($name) {} /** * Returns all tables defined in this keyspace @@ -5039,9 +4361,7 @@ public function table($name) * @return array An array of `Table` instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-tables */ - public function tables() - { - } + public function tables() {} /** * Get user type by name @@ -5051,9 +4371,7 @@ public function tables() * @return \Cassandra\Type\UserType|null A user type or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-userType */ - public function userType($name) - { - } + public function userType($name) {} /** * Get all user types @@ -5061,21 +4379,17 @@ public function userType($name) * @return array An array of user types * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-userTypes */ - public function userTypes() - { - } + public function userTypes() {} /** * Get materialized view by name * * @param string $name Materialized view name * - * @return \Cassandra\MaterizedView|null A materialized view or null + * @return \Cassandra\MaterializedView|null A materialized view or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-materializedView */ - public function materializedView($name) - { - } + public function materializedView($name) {} /** * Gets all materialized views @@ -5083,9 +4397,7 @@ public function materializedView($name) * @return array An array of materialized views * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-materializedViews */ - public function materializedViews() - { - } + public function materializedViews() {} /** * Get a function by name and signature @@ -5096,9 +4408,7 @@ public function materializedViews() * @return \Cassandra\Function_|null A function or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-function */ - public function function_($name, ...$params) - { - } + public function function_($name, ...$params) {} /** * Get all functions @@ -5106,9 +4416,7 @@ public function function_($name, ...$params) * @return array An array of functions * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-functions */ - public function functions() - { - } + public function functions() {} /** * Get an aggregate by name and signature @@ -5119,9 +4427,7 @@ public function functions() * @return \Cassandra\Aggregate|null An aggregate or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-aggregate */ - public function aggregate($name, ...$params) - { - } + public function aggregate($name, ...$params) {} /** * Get all aggregates @@ -5129,10 +4435,7 @@ public function aggregate($name, ...$params) * @return array An array of aggregates * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultKeyspace/#method-aggregates */ - public function aggregates() - { - } - + public function aggregates() {} } /** @@ -5141,7 +4444,6 @@ public function aggregates() */ final class Inet implements Value { - /** * Creates a new IPv4 or IPv6 inet address. * @@ -5149,9 +4451,7 @@ final class Inet implements Value * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-__construct */ - public function __construct($address) - { - } + public function __construct($address) {} /** * Returns the normalized string representation of the address. @@ -5159,9 +4459,7 @@ public function __construct($address) * @return string address * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this inet. @@ -5169,9 +4467,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-type */ - public function type() - { - } + public function type() {} /** * Returns the normalized string representation of the address. @@ -5179,10 +4475,7 @@ public function type() * @return string address * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Inet/#method-address */ - public function address() - { - } - + public function address() {} } /** @@ -5191,7 +4484,6 @@ public function address() */ final class Date implements Value { - /** * Creates a new Date object * @@ -5199,9 +4491,7 @@ final class Date implements Value * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-__construct */ - public function __construct($seconds) - { - } + public function __construct($seconds) {} /** * Creates a new Date object from a \DateTime object. @@ -5211,9 +4501,7 @@ public function __construct($seconds) * @return \DateTime PHP representation * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-fromDateTime */ - public static function fromDateTime($datetime) - { - } + public static function fromDateTime($datetime) {} /** * The type of this date. @@ -5221,17 +4509,13 @@ public static function fromDateTime($datetime) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-type */ - public function type() - { - } + public function type() {} /** * @return int Absolute seconds from epoch (1970, 1, 1), can be negative * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-seconds */ - public function seconds() - { - } + public function seconds() {} /** * Converts current date to PHP DateTime. @@ -5241,18 +4525,13 @@ public function seconds() * @return \DateTime PHP representation * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-toDateTime */ - public function toDateTime($time) - { - } + public function toDateTime($time) {} /** * @return string this date in string format: Date(seconds=$seconds) * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Date/#method-__toString */ - public function __toString() - { - } - + public function __toString() {} } /** @@ -5261,16 +4540,13 @@ public function __toString() */ final class DefaultColumn implements Column { - /** * Returns the name of the column. * * @return string Name of the column or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-name */ - public function name() - { - } + public function name() {} /** * Returns the type of the column. @@ -5278,9 +4554,7 @@ public function name() * @return \Cassandra\Type Type of the column * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-type */ - public function type() - { - } + public function type() {} /** * Returns whether the column is in descending or ascending order. @@ -5288,9 +4562,7 @@ public function type() * @return bool Whether the column is stored in descending order. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-isReversed */ - public function isReversed() - { - } + public function isReversed() {} /** * Returns true for static columns. @@ -5298,9 +4570,7 @@ public function isReversed() * @return bool Whether the column is static * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-isStatic */ - public function isStatic() - { - } + public function isStatic() {} /** * Returns true for frozen columns. @@ -5308,9 +4578,7 @@ public function isStatic() * @return bool Whether the column is frozen * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-isFrozen */ - public function isFrozen() - { - } + public function isFrozen() {} /** * Returns name of the index if defined. @@ -5318,9 +4586,7 @@ public function isFrozen() * @return string Name of the index if defined or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-indexName */ - public function indexName() - { - } + public function indexName() {} /** * Returns index options if present. @@ -5328,10 +4594,7 @@ public function indexName() * @return string Index options if present or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultColumn/#method-indexOptions */ - public function indexOptions() - { - } - + public function indexOptions() {} } /** @@ -5340,7 +4603,6 @@ public function indexOptions() */ final class Blob implements Value { - /** * Creates a new bytes array. * @@ -5348,9 +4610,7 @@ final class Blob implements Value * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-__construct */ - public function __construct($bytes) - { - } + public function __construct($bytes) {} /** * Returns bytes as a hex string. @@ -5358,9 +4618,7 @@ public function __construct($bytes) * @return string bytes as hexadecimal string * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this blob. @@ -5368,9 +4626,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-type */ - public function type() - { - } + public function type() {} /** * Returns bytes as a hex string. @@ -5378,9 +4634,7 @@ public function type() * @return string bytes as hexadecimal string * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-bytes */ - public function bytes() - { - } + public function bytes() {} /** * Returns bytes as a binary string. @@ -5388,10 +4642,7 @@ public function bytes() * @return string bytes as binary string * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Blob/#method-toBinaryString */ - public function toBinaryString() - { - } - + public function toBinaryString() {} } /** @@ -5400,16 +4651,13 @@ public function toBinaryString() */ final class DefaultTable implements Table { - /** * Returns the name of this table * * @return string Name of the table * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-name */ - public function name() - { - } + public function name() {} /** * Return a table's option by name @@ -5419,9 +4667,7 @@ public function name() * @return \Cassandra\Value Value of an option by name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-option */ - public function option($name) - { - } + public function option($name) {} /** * Returns all the table's options @@ -5429,9 +4675,7 @@ public function option($name) * @return array A dictionary of `string` and `Value` pairs of the table's options. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-options */ - public function options() - { - } + public function options() {} /** * Description of the table, if any @@ -5439,9 +4683,7 @@ public function options() * @return string Table description or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-comment */ - public function comment() - { - } + public function comment() {} /** * Returns read repair chance @@ -5449,9 +4691,7 @@ public function comment() * @return float Read repair chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-readRepairChance */ - public function readRepairChance() - { - } + public function readRepairChance() {} /** * Returns local read repair chance @@ -5459,9 +4699,7 @@ public function readRepairChance() * @return float Local read repair chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-localReadRepairChance */ - public function localReadRepairChance() - { - } + public function localReadRepairChance() {} /** * Returns GC grace seconds @@ -5469,9 +4707,7 @@ public function localReadRepairChance() * @return int GC grace seconds * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-gcGraceSeconds */ - public function gcGraceSeconds() - { - } + public function gcGraceSeconds() {} /** * Returns caching options @@ -5479,9 +4715,7 @@ public function gcGraceSeconds() * @return string Caching options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-caching */ - public function caching() - { - } + public function caching() {} /** * Returns bloom filter FP chance @@ -5489,9 +4723,7 @@ public function caching() * @return float Bloom filter FP chance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-bloomFilterFPChance */ - public function bloomFilterFPChance() - { - } + public function bloomFilterFPChance() {} /** * Returns memtable flush period in milliseconds @@ -5499,9 +4731,7 @@ public function bloomFilterFPChance() * @return int Memtable flush period in milliseconds * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-memtableFlushPeriodMs */ - public function memtableFlushPeriodMs() - { - } + public function memtableFlushPeriodMs() {} /** * Returns default TTL. @@ -5509,9 +4739,7 @@ public function memtableFlushPeriodMs() * @return int Default TTL. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-defaultTTL */ - public function defaultTTL() - { - } + public function defaultTTL() {} /** * Returns speculative retry. @@ -5519,9 +4747,7 @@ public function defaultTTL() * @return string Speculative retry. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-speculativeRetry */ - public function speculativeRetry() - { - } + public function speculativeRetry() {} /** * Returns index interval @@ -5529,9 +4755,7 @@ public function speculativeRetry() * @return int Index interval * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-indexInterval */ - public function indexInterval() - { - } + public function indexInterval() {} /** * Returns compaction strategy class name @@ -5539,9 +4763,7 @@ public function indexInterval() * @return string Compaction strategy class name * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-compactionStrategyClassName */ - public function compactionStrategyClassName() - { - } + public function compactionStrategyClassName() {} /** * Returns compaction strategy options @@ -5549,9 +4771,7 @@ public function compactionStrategyClassName() * @return \Cassandra\Map Compaction strategy options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-compactionStrategyOptions */ - public function compactionStrategyOptions() - { - } + public function compactionStrategyOptions() {} /** * Returns compression parameters @@ -5559,9 +4779,7 @@ public function compactionStrategyOptions() * @return \Cassandra\Map Compression parameters * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-compressionParameters */ - public function compressionParameters() - { - } + public function compressionParameters() {} /** * Returns whether or not the `populate_io_cache_on_flush` is true @@ -5569,9 +4787,7 @@ public function compressionParameters() * @return bool Value of `populate_io_cache_on_flush` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-populateIOCacheOnFlush */ - public function populateIOCacheOnFlush() - { - } + public function populateIOCacheOnFlush() {} /** * Returns whether or not the `replicate_on_write` is true @@ -5579,9 +4795,7 @@ public function populateIOCacheOnFlush() * @return bool Value of `replicate_on_write` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-replicateOnWrite */ - public function replicateOnWrite() - { - } + public function replicateOnWrite() {} /** * Returns the value of `max_index_interval` @@ -5589,9 +4803,7 @@ public function replicateOnWrite() * @return int Value of `max_index_interval` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-maxIndexInterval */ - public function maxIndexInterval() - { - } + public function maxIndexInterval() {} /** * Returns the value of `min_index_interval` @@ -5599,9 +4811,7 @@ public function maxIndexInterval() * @return int Value of `min_index_interval` or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-minIndexInterval */ - public function minIndexInterval() - { - } + public function minIndexInterval() {} /** * Returns column by name @@ -5611,9 +4821,7 @@ public function minIndexInterval() * @return \Cassandra\Column Column instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-column */ - public function column($name) - { - } + public function column($name) {} /** * Returns all columns in this table @@ -5621,47 +4829,37 @@ public function column($name) * @return array A list of `Column` instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-columns */ - public function columns() - { - } + public function columns() {} /** * Returns the partition key columns of the table * - * @return array A list of of `Column` instance + * @return array A list of `Column` instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-partitionKey */ - public function partitionKey() - { - } + public function partitionKey() {} /** * Returns both the partition and clustering key columns of the table * - * @return array A list of of `Column` instance + * @return array A list of `Column` instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-primaryKey */ - public function primaryKey() - { - } + public function primaryKey() {} /** * Returns the clustering key columns of the table * - * @return array A list of of `Column` instances + * @return array A list of `Column` instances * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-clusteringKey */ - public function clusteringKey() - { - } + public function clusteringKey() {} /** * @return array A list of cluster column orders ('asc' and 'desc') * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-clusteringOrder */ - public function clusteringOrder() - { - } + public function clusteringOrder() {} /** * Get an index by name @@ -5671,9 +4869,7 @@ public function clusteringOrder() * @return \Cassandra\Index|null An index or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-index */ - public function index($name) - { - } + public function index($name) {} /** * Gets all indexes @@ -5681,21 +4877,17 @@ public function index($name) * @return array An array of indexes * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-indexes */ - public function indexes() - { - } + public function indexes() {} /** * Get materialized view by name * * @param string $name Materialized view name * - * @return \Cassandra\MaterizedView|null A materialized view or null + * @return \Cassandra\MaterializedView|null A materialized view or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-materializedView */ - public function materializedView($name) - { - } + public function materializedView($name) {} /** * Gets all materialized views @@ -5703,10 +4895,7 @@ public function materializedView($name) * @return array An array of materialized views * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.DefaultTable/#method-materializedViews */ - public function materializedViews() - { - } - + public function materializedViews() {} } /** @@ -5715,11 +4904,10 @@ public function materializedViews() */ final class FutureValue implements Future { - /** * Waits for a given future resource to resolve and throws errors if any. * - * @param int|double|null $timeout A timeout in seconds + * @param int|float|null $timeout A timeout in seconds * * @return mixed A value * @throws \Cassandra\Exception\TimeoutException @@ -5727,10 +4915,7 @@ final class FutureValue implements Future * @throws \Cassandra\Exception\InvalidArgumentException * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureValue/#method-get */ - public function get($timeout) - { - } - + public function get($timeout) {} } /** @@ -5741,7 +4926,6 @@ public function get($timeout) */ final class Decimal implements Value, Numeric { - /** * Creates a decimal from a given decimal string: * @@ -5754,9 +4938,7 @@ final class Decimal implements Value, Numeric * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-__construct */ - public function __construct($value) - { - } + public function __construct($value) {} /** * String representation of this decimal. @@ -5764,9 +4946,7 @@ public function __construct($value) * @return string Decimal value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-__toString */ - public function __toString() - { - } + public function __toString() {} /** * The type of this decimal. @@ -5774,9 +4954,7 @@ public function __toString() * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-type */ - public function type() - { - } + public function type() {} /** * Numeric value of this decimal as string. @@ -5784,9 +4962,7 @@ public function type() * @return string Numeric value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-value */ - public function value() - { - } + public function value() {} /** * Scale of this decimal as int. @@ -5794,9 +4970,7 @@ public function value() * @return int Scale * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-scale */ - public function scale() - { - } + public function scale() {} /** * @param \Cassandra\Numeric $num a number to add to this one @@ -5804,9 +4978,7 @@ public function scale() * @return \Cassandra\Numeric sum * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-add */ - public function add($num) - { - } + public function add($num) {} /** * @param \Cassandra\Numeric $num a number to subtract from this one @@ -5814,9 +4986,7 @@ public function add($num) * @return \Cassandra\Numeric difference * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-sub */ - public function sub($num) - { - } + public function sub($num) {} /** * @param \Cassandra\Numeric $num a number to multiply this one by @@ -5824,9 +4994,7 @@ public function sub($num) * @return \Cassandra\Numeric product * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-mul */ - public function mul($num) - { - } + public function mul($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -5834,9 +5002,7 @@ public function mul($num) * @return \Cassandra\Numeric quotient * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-div */ - public function div($num) - { - } + public function div($num) {} /** * @param \Cassandra\Numeric $num a number to divide this one by @@ -5844,50 +5010,37 @@ public function div($num) * @return \Cassandra\Numeric remainder * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-mod */ - public function mod($num) - { - } + public function mod($num) {} /** * @return \Cassandra\Numeric absolute value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-abs */ - public function abs() - { - } + public function abs() {} /** * @return \Cassandra\Numeric negative value * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-neg */ - public function neg() - { - } + public function neg() {} /** * @return \Cassandra\Numeric square root * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-sqrt */ - public function sqrt() - { - } + public function sqrt() {} /** * @return int this number as int * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-toInt */ - public function toInt() - { - } + public function toInt() {} /** * @return float this number as float * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Decimal/#method-toDouble */ - public function toDouble() - { - } - + public function toDouble() {} } /** @@ -5898,11 +5051,10 @@ public function toDouble() */ final class FutureClose implements Future { - /** * Waits for a given future resource to resolve and throws errors if any. * - * @param int|double|null $timeout A timeout in seconds + * @param int|float|null $timeout A timeout in seconds * * @return null Nothing * @throws \Cassandra\Exception\TimeoutException @@ -5910,10 +5062,7 @@ final class FutureClose implements Future * @throws \Cassandra\Exception\InvalidArgumentException * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.FutureClose/#method-get */ - public function get($timeout) - { - } - + public function get($timeout) {} } /** @@ -5929,27 +5078,21 @@ public function get($timeout) */ final class PreparedStatement implements Statement { - - private function __construct() - { - } - + private function __construct() {} } /** * Request execution options. * - * @deprecated Use an array of options instead of creating an instance of this class. - * * @see \Cassandra\Session::execute() * @see \Cassandra\Session::executeAsync() * @see \Cassandra\Session::prepare() * @see \Cassandra\Session::prepareAsync() * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.ExecutionOptions/ */ + #[Deprecated('Use an array of options instead of creating an instance of this class.')] final class ExecutionOptions { - /** * Creates a new options object for execution. * @@ -5960,9 +5103,7 @@ final class ExecutionOptions * @see \Cassandra\Session::execute() for valid execution options * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.ExecutionOptions/#method-__construct */ - public function __construct($options) - { - } + public function __construct($options) {} /** * @param mixed $name @@ -5970,10 +5111,7 @@ public function __construct($options) * @return mixed * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.ExecutionOptions/#method-__get */ - public function __get($name) - { - } - + public function __get($name) {} } /** @@ -5982,7 +5120,6 @@ public function __get($name) */ final class UserTypeValue implements Value, \Countable, \Iterator { - /** * Creates a new user type value with the given name/type pairs. * @@ -5990,9 +5127,7 @@ final class UserTypeValue implements Value, \Countable, \Iterator * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-__construct */ - public function __construct($types) - { - } + public function __construct($types) {} /** * The type of this user type value. @@ -6000,9 +5135,7 @@ public function __construct($types) * @return \Cassandra\Type * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-type */ - public function type() - { - } + public function type() {} /** * Array of values in this user type value. @@ -6010,9 +5143,7 @@ public function type() * @return array values * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-values */ - public function values() - { - } + public function values() {} /** * Sets the value at name in this user type value. @@ -6022,9 +5153,7 @@ public function values() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-set */ - public function set($value) - { - } + public function set($value) {} /** * Retrieves the value at a given name. @@ -6034,9 +5163,7 @@ public function set($value) * @return mixed A value or null * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-get */ - public function get($name) - { - } + public function get($name) {} /** * Total number of elements in this user type value. @@ -6044,9 +5171,7 @@ public function get($name) * @return int count * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-count */ - public function count() - { - } + public function count() {} /** * Current element for iteration @@ -6054,9 +5179,7 @@ public function count() * @return mixed The current element * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-current */ - public function current() - { - } + public function current() {} /** * Current key for iteration @@ -6064,9 +5187,7 @@ public function current() * @return int current key * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-key */ - public function key() - { - } + public function key() {} /** * Move internal iterator forward @@ -6074,9 +5195,7 @@ public function key() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-next */ - public function next() - { - } + public function next() {} /** * Check whether a current value exists @@ -6084,9 +5203,7 @@ public function next() * @return bool * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-valid */ - public function valid() - { - } + public function valid() {} /** * Rewind internal iterator @@ -6094,12 +5211,8 @@ public function valid() * @return void * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.UserTypeValue/#method-rewind */ - public function rewind() - { - } - + public function rewind() {} } - } /** @@ -6107,7 +5220,6 @@ public function rewind() */ namespace Cassandra\Cluster { - /** * Cluster builder allows fluent configuration of the cluster instance. * @@ -6116,16 +5228,13 @@ public function rewind() */ final class Builder { - /** * Returns a Cluster Instance. * * @return \Cassandra\Cluster Cluster instance * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-build */ - public function build() - { - } + public function build() {} /** * Configures default consistency for all requests. @@ -6135,9 +5244,7 @@ public function build() * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDefaultConsistency */ - public function withDefaultConsistency($consistency) - { - } + public function withDefaultConsistency($consistency) {} /** * Configures default page size for all results. @@ -6148,9 +5255,7 @@ public function withDefaultConsistency($consistency) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDefaultPageSize */ - public function withDefaultPageSize($pageSize) - { - } + public function withDefaultPageSize($pageSize) {} /** * Configures default timeout for future resolution in blocking operations @@ -6161,22 +5266,18 @@ public function withDefaultPageSize($pageSize) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDefaultTimeout */ - public function withDefaultTimeout($timeout) - { - } + public function withDefaultTimeout($timeout) {} /** * Configures the initial endpoints. Note that the driver will * automatically discover and connect to the rest of the cluster. * - * @param string $host ,... one or more ip addresses or hostnames + * @param string ...$host one or more ip addresses or hostnames * * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withContactPoints */ - public function withContactPoints($host) - { - } + public function withContactPoints(...$host) {} /** * Specify a different port to be used when connecting to the cluster. @@ -6188,9 +5289,7 @@ public function withContactPoints($host) * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withPort */ - public function withPort($port) - { - } + public function withPort($port) {} /** * Configures this cluster to use a round robin load balancing policy. @@ -6198,9 +5297,7 @@ public function withPort($port) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRoundRobinLoadBalancingPolicy */ - public function withRoundRobinLoadBalancingPolicy() - { - } + public function withRoundRobinLoadBalancingPolicy() {} /** * Configures this cluster to use a datacenter aware round robin load balancing policy. @@ -6212,13 +5309,11 @@ public function withRoundRobinLoadBalancingPolicy() * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withDatacenterAwareRoundRobinLoadBalancingPolicy */ - public function withDatacenterAwareRoundRobinLoadBalancingPolicy($localDatacenter, $hostPerRemoteDatacenter, $useRemoteDatacenterForLocalConsistencies) - { - } + public function withDatacenterAwareRoundRobinLoadBalancingPolicy($localDatacenter, $hostPerRemoteDatacenter, $useRemoteDatacenterForLocalConsistencies) {} /** * Sets the blacklist hosts. Any host in the blacklist will be ignored and - * a conneciton will not be established. This is useful for ensuring that + * a connection will not be established. This is useful for ensuring that * the driver will not connection to a predefied set of hosts. * * @param string $hosts A comma delimited list of addresses. @@ -6226,9 +5321,7 @@ public function withDatacenterAwareRoundRobinLoadBalancingPolicy($localDatacente * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withBlackListHosts */ - public function withBlackListHosts($hosts) - { - } + public function withBlackListHosts($hosts) {} /** * Sets the whitelist hosts. Any host not in the whitelist will be ignored @@ -6240,9 +5333,7 @@ public function withBlackListHosts($hosts) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withWhiteListHosts */ - public function withWhiteListHosts($hosts) - { - } + public function withWhiteListHosts($hosts) {} /** * Sets the blacklist datacenters. Any datacenter in the blacklist will be @@ -6255,9 +5346,7 @@ public function withWhiteListHosts($hosts) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withBlackListDCs */ - public function withBlackListDCs($dcs) - { - } + public function withBlackListDCs($dcs) {} /** * Sets the whitelist datacenters. Any host not in a whitelisted datacenter @@ -6269,9 +5358,7 @@ public function withBlackListDCs($dcs) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withWhiteListDCs */ - public function withWhiteListDCs($dcs) - { - } + public function withWhiteListDCs($dcs) {} /** * Enable token aware routing. @@ -6281,9 +5368,7 @@ public function withWhiteListDCs($dcs) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTokenAwareRouting */ - public function withTokenAwareRouting($enabled) - { - } + public function withTokenAwareRouting($enabled) {} /** * Configures plain-text authentication. @@ -6294,9 +5379,7 @@ public function withTokenAwareRouting($enabled) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withCredentials */ - public function withCredentials($username, $password) - { - } + public function withCredentials($username, $password) {} /** * Timeout used for establishing TCP connections. @@ -6306,9 +5389,7 @@ public function withCredentials($username, $password) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withConnectTimeout */ - public function withConnectTimeout($timeout) - { - } + public function withConnectTimeout($timeout) {} /** * Timeout used for waiting for a response from a node. @@ -6318,9 +5399,7 @@ public function withConnectTimeout($timeout) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRequestTimeout */ - public function withRequestTimeout($timeout) - { - } + public function withRequestTimeout($timeout) {} /** * Set up ssl context. @@ -6330,9 +5409,7 @@ public function withRequestTimeout($timeout) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withSSL */ - public function withSSL($options) - { - } + public function withSSL($options) {} /** * Enable persistent sessions and clusters. @@ -6342,9 +5419,7 @@ public function withSSL($options) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withPersistentSessions */ - public function withPersistentSessions($enabled) - { - } + public function withPersistentSessions($enabled) {} /** * Force the driver to use a specific binary protocol version. @@ -6361,9 +5436,7 @@ public function withPersistentSessions($enabled) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withProtocolVersion */ - public function withProtocolVersion($version) - { - } + public function withProtocolVersion($version) {} /** * Total number of IO threads to use for handling the requests. @@ -6376,9 +5449,7 @@ public function withProtocolVersion($version) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withIOThreads */ - public function withIOThreads($count) - { - } + public function withIOThreads($count) {} /** * Set the size of connection pools used by the driver. Pools are fixed @@ -6394,9 +5465,7 @@ public function withIOThreads($count) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withConnectionsPerHost */ - public function withConnectionsPerHost($core, $max) - { - } + public function withConnectionsPerHost($core, $max) {} /** * Specify interval in seconds that the driver should wait before attempting @@ -6407,9 +5476,7 @@ public function withConnectionsPerHost($core, $max) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withReconnectInterval */ - public function withReconnectInterval($interval) - { - } + public function withReconnectInterval($interval) {} /** * Enables/disables latency-aware routing. @@ -6419,9 +5486,7 @@ public function withReconnectInterval($interval) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withLatencyAwareRouting */ - public function withLatencyAwareRouting($enabled) - { - } + public function withLatencyAwareRouting($enabled) {} /** * Disables nagle algorithm for lower latency. @@ -6431,9 +5496,7 @@ public function withLatencyAwareRouting($enabled) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTCPNodelay */ - public function withTCPNodelay($enabled) - { - } + public function withTCPNodelay($enabled) {} /** * Enables/disables TCP keepalive. @@ -6446,21 +5509,17 @@ public function withTCPNodelay($enabled) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTCPKeepalive */ - public function withTCPKeepalive($delay) - { - } + public function withTCPKeepalive($delay) {} /** * Configures the retry policy. * - * @param \Cassandra\Cluster\RetryPolicy $policy the retry policy to use. + * @param \Cassandra\RetryPolicy $policy the retry policy to use. * * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRetryPolicy */ - public function withRetryPolicy($policy) - { - } + public function withRetryPolicy($policy) {} /** * Sets the timestamp generator. @@ -6471,9 +5530,7 @@ public function withRetryPolicy($policy) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withTimestampGenerator */ - public function withTimestampGenerator($generator) - { - } + public function withTimestampGenerator($generator) {} /** * Enables/disables Schema Metadata. @@ -6488,9 +5545,7 @@ public function withTimestampGenerator($generator) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withSchemaMetadata */ - public function withSchemaMetadata($enabled) - { - } + public function withSchemaMetadata($enabled) {} /** * Enables/disables Hostname Resolution. @@ -6508,9 +5563,7 @@ public function withSchemaMetadata($enabled) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withHostnameResolution */ - public function withHostnameResolution($enabled) - { - } + public function withHostnameResolution($enabled) {} /** * Enables/disables Randomized Contact Points. @@ -6526,9 +5579,7 @@ public function withHostnameResolution($enabled) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withRandomizedContactPoints */ - public function withRandomizedContactPoints($enabled) - { - } + public function withRandomizedContactPoints($enabled) {} /** * Specify interval in seconds that the driver should wait before attempting @@ -6541,12 +5592,8 @@ public function withRandomizedContactPoints($enabled) * @return \Cassandra\Cluster\Builder self * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/class.Builder/#method-withConnectionHeartbeatInterval */ - public function withConnectionHeartbeatInterval($interval) - { - } - + public function withConnectionHeartbeatInterval($interval) {} } - } /** @@ -6554,15 +5601,11 @@ public function withConnectionHeartbeatInterval($interval) */ namespace Cassandra\TimestampGenerator { - /** * A timestamp generator that allows the server-side to assign timestamps. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/TimestampGenerator/class.ServerSide/ */ - final class ServerSide implements \Cassandra\TimestampGenerator - { - - } + final class ServerSide implements \Cassandra\TimestampGenerator {} /** * A timestamp generator that generates monotonically increasing timestamps @@ -6574,11 +5617,7 @@ final class ServerSide implements \Cassandra\TimestampGenerator * the next clock tick. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/TimestampGenerator/class.Monotonic/ */ - final class Monotonic implements \Cassandra\TimestampGenerator - { - - } - + final class Monotonic implements \Cassandra\TimestampGenerator {} } /** @@ -6586,7 +5625,6 @@ final class Monotonic implements \Cassandra\TimestampGenerator */ namespace Cassandra\RetryPolicy { - /** * The default retry policy. This policy retries a query, using the * request's original consistency level, in the following cases: @@ -6598,10 +5636,7 @@ final class Monotonic implements \Cassandra\TimestampGenerator * In all other cases the error will be returned. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.DefaultPolicy/ */ - final class DefaultPolicy implements \Cassandra\RetryPolicy - { - - } + final class DefaultPolicy implements \Cassandra\RetryPolicy {} /** * A retry policy that will downgrade the consistency of a request in @@ -6625,19 +5660,13 @@ final class DefaultPolicy implements \Cassandra\RetryPolicy * consistency level. Using this policy can break consistency guarantees. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.DowngradingConsistency/ */ - final class DowngradingConsistency implements \Cassandra\RetryPolicy - { - - } + final class DowngradingConsistency implements \Cassandra\RetryPolicy {} /** * A retry policy that never retries and allows all errors to fallthrough. * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.Fallthrough/ */ - final class Fallthrough implements \Cassandra\RetryPolicy - { - - } + final class Fallthrough implements \Cassandra\RetryPolicy {} /** * A retry policy that logs the decisions of its child policy. @@ -6645,7 +5674,6 @@ final class Fallthrough implements \Cassandra\RetryPolicy */ final class Logging implements \Cassandra\RetryPolicy { - /** * Creates a new Logging retry policy. * @@ -6653,12 +5681,8 @@ final class Logging implements \Cassandra\RetryPolicy * * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/class.Logging/#method-__construct */ - public function __construct($childPolicy) - { - } - + public function __construct($childPolicy) {} } - } /** @@ -6666,7 +5690,6 @@ public function __construct($childPolicy) */ namespace Cassandra\Type { - /** * A class that represents the tuple type. The tuple type is able to represent * a composite type of one or more types accessed by index. @@ -6674,10 +5697,7 @@ public function __construct($childPolicy) */ final class Tuple extends \Cassandra\Type { - - private function __construct() - { - } + private function __construct() {} /** * Returns "tuple" @@ -6685,9 +5705,7 @@ private function __construct() * @return string "tuple" * @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/class.Tuple/#method-name */ - public function name() - { - } + public function name() {} /** * Returns type representation in CQL, e.g. `tuple* The tested string. @@ -106,7 +100,8 @@ function ctype_print ($text) {} * @return bool TRUE if every character in text * is printable, but neither letter, digit or blank, FALSE otherwise. */ -function ctype_punct ($text) {} +#[Pure] +function ctype_punct(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {} /** * Check for whitespace character(s) @@ -118,10 +113,9 @@ function ctype_punct ($text) {} * creates some sort of white space, FALSE otherwise. Besides the * blank character this also includes tab, vertical tab, line feed, * carriage return and form feed characters. - * @since 4.0.4 - * @since 5.0 */ -function ctype_space ($text) {} +#[Pure] +function ctype_space(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {} /** * Check for uppercase character(s) @@ -131,10 +125,9 @@ function ctype_space ($text) {} *
* @return bool TRUE if every character in text is * an uppercase letter in the current locale. - * @since 4.0.4 - * @since 5.0 */ -function ctype_upper ($text) {} +#[Pure] +function ctype_upper(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {} /** * Check for character(s) representing a hexadecimal digit @@ -145,7 +138,6 @@ function ctype_upper ($text) {} * @return bool TRUE if every character in text is * a hexadecimal 'digit', that is a decimal digit or a character from * [A-Fa-f] , FALSE otherwise. - * @since 4.0.4 - * @since 5.0 */ -function ctype_xdigit ($text) {} +#[Pure] +function ctype_xdigit(#[LanguageLevelTypeAware(['8.1' => 'string'], default: 'mixed')] mixed $text): bool {} diff --git a/cubrid/cubrid.php b/cubrid/cubrid.php index 563278327..b70d7c98b 100644 --- a/cubrid/cubrid.php +++ b/cubrid/cubrid.php @@ -28,16 +28,16 @@ * with the same arguments, no new link will be established, * but instead, the connection identifier of the already * opened connection will be - * returned. The new_link parameter modifies this + * returned. The new_link parameter modifies this * behavior and makes cubrid_connect() always open * a new connection, even if cubrid_connect() was called * before with the same parameters. * - * @return resource+ * @return resource|false
* a CUBRID connection identifier on success or false on failure. *
*/ -function cubrid_connect ($host, $port, $dbname, $userid = 'PUBLIC', $passwd = '', $new_link = FALSE) {} +function cubrid_connect($host, $port, $dbname, $userid = 'PUBLIC', $passwd = '', $new_link = false) {} /** * (PHP 5, CUBRID >= 8.3.1)+ * @return resource|false
* a CUBRID connection identifier on success or false on failure. *
*/ -function cubrid_connect_with_url ($conn_url, $userid = 'PUBLIC', $passwd = '', $new_link = FALSE) {} +function cubrid_connect_with_url($conn_url, $userid = 'PUBLIC', $passwd = '', $new_link = false) {} /** * (PHP 5, CUBRID >= 8.3.1)+ * @return resource|false
* Connection identifier, when process is successful. * FALSE, when process is unsuccessful. *
*/ -function cubrid_pconnect ($host, $port, $dbname, $userid = 'PUBLIC', $passwd = '') {} +function cubrid_pconnect($host, $port, $dbname, $userid = 'PUBLIC', $passwd = '') {} /** * (PHP 5, CUBRID >= 8.3.1)+ * @return resource|false
* Connection identifier, when process is successful. * FALSE, when process is unsuccessful. *
*/ -function cubrid_pconnect_with_url ($conn_url, $userid = 'PUBLIC', $passwd = '') {} +function cubrid_pconnect_with_url($conn_url, $userid = 'PUBLIC', $passwd = '') {} /** * (PHP 5, CUBRID >= 8.3.0)+ * @return resource|bool
* Request identifier, when process is successful, * or FALSE, when process is unsuccessful. *
*/ -function cubrid_execute ($conn_identifier, $sql, $option = null) {} +function cubrid_execute($conn_identifier, $sql, $option = null) {} /** * (PHP 5, CUBRID >= 8.3.0)* cubrid_prepare() identifier. *
- * @param resource $option [optional]+ * @param int $option [optional]
* Query execution option CUBRID_INCLUDE_OID, CUBRID_ASYNC, * CUBRID_EXEC_QUERY_ALL. *
@@ -230,7 +230,7 @@ function cubrid_execute ($conn_identifier, $sql, $option = null) {} * process is unsuccessful. * */ -function cubrid_execute ($request_identifier, $option = null) {} +function cubrid_execute($request_identifier, $option = null) {} /** * (PHP 5, CUBRID >= 8.3.0)+ * @return resource|bool
* For SELECT, SHOW, DESCRIBE or EXPLAIN statements, * cubrid_unbuffered_query() returns a resource on success, or false on * error. @@ -352,7 +352,7 @@ function cubrid_col_size ($conn_identifier, $oid, $attr_name) {} * or false on error. *
*/ -function cubrid_unbuffered_query ($query, $conn_identifier = null) {} +function cubrid_unbuffered_query($query, $conn_identifier = null) {} /** * (PHP 5, CUBRID >= 8.3.0)* The connection identifier previously obtained by a call @@ -452,24 +452,24 @@ function cubrid_affected_rows ($conn_identifier = null) {} * not generate new rows. FALSE on failure. *
*/ -function cubrid_insert_id ($conn_identifier = null) {} +function cubrid_insert_id($conn_identifier = null) {} /** * (PHP 5, CUBRID >= 8.3.0)- * The row number from the result that's being retrieved. Row numbers + * The row number from the result that's being retrieved. Row numbers * start at 0. *
* @param mixed $field [optional]* The name or offset of the field being retrieved. *
*- * It can be the field's offset, the field's name, or the field's table + * It can be the field's offset, the field's name, or the field's table * dot field name (tablename.fieldname). If the column name has been - * aliased ('select foo as bar from...'), use the alias instead of the + * aliased ('select foo as bar from...'), use the alias instead of the * column name. If undefined, the first field is retrieved. *
* @return string@@ -477,11 +477,11 @@ function cubrid_insert_id ($conn_identifier = null) {} * FALSE on failure. *
*/ -function cubrid_result ($result, $row, $field = 0) {} +function cubrid_result($result, $row, $field = 0) {} /** * (PHP 5, CUBRID >= 8.3.0)* result comes from a call to cubrid_execute(), @@ -494,11 +494,11 @@ function cubrid_result ($result, $row, $field = 0) {} * FALSE when process is unsuccessful. *
*/ -function cubrid_num_rows ($result) {} +function cubrid_num_rows($result) {} /** * (PHP 5, CUBRID >= 8.3.0)* Result. @@ -508,11 +508,11 @@ function cubrid_num_rows ($result) {} * FALSE, if SQL statement is not SELECT. *
*/ -function cubrid_num_cols ($result) {} +function cubrid_num_cols($result) {} /** * (PHP 5, CUBRID >= 8.3.0)* result comes from a call to cubrid_execute(), @@ -524,7 +524,7 @@ function cubrid_num_cols ($result) {} * FALSE when process is unsuccessful. *
*/ -function cubrid_num_fields ($result) {} +function cubrid_num_fields($result) {} /** * (PHP 5, CUBRID >= 8.3.0)* The type of array that is to be fetched. It's a constant and can * take the following values: CUBRID_ASSOC, CUBRID_NUM, and CUBRID_BOTH. @@ -614,7 +614,7 @@ function cubrid_fetch_row ($result, $type = null) {} *
* result comes from a call to cubrid_execute() *
- * @param resource $type [optional]+ * @param int $type [optional]
* Type can only be CUBRID_LOB, this parameter will be used * only when you need to operate the lob object. *
@@ -633,11 +633,11 @@ function cubrid_fetch_array ($result, $type = CUBRID_BOTH) {} * NULL, when process is unsuccessful. * */ -function cubrid_fetch_assoc ($result, $type = null) {} +function cubrid_fetch_assoc($result, $type = null) {} /** * (PHP 5, CUBRID >= 8.3.0)* result comes from a call to cubrid_execute() @@ -661,7 +661,7 @@ function cubrid_fetch_assoc ($result, $type = null) {} * are no more rows, or NULL, when process is unsuccessful. *
*/ -function cubrid_fetch_object ($result, $class_name = null, $params = null, $type = null) {} +function cubrid_fetch_object($result, $class_name = null, $params = null, $type = null) {} /** * (PHP 5, CUBRID >= 8.3.0)- * The numerical field offset. If the field offset is not specified, the - * next field that was not yet retrieved by this function is retrieved. + * The numerical field offset. If the field offset is not specified, the + * next field that was not yet retrieved by this function is retrieved. * The field_offset starts at 0. *
* @return object@@ -726,7 +726,7 @@ function cubrid_fetch_lengths ($result) {} *
* result comes from a call to cubrid_execute() @@ -772,7 +772,7 @@ function cubrid_column_types ($req_identifier) {} * Returns true on success or false on failure. *
*/ -function cubrid_field_seek ($result, $field_offset) {} +function cubrid_field_seek($result, $field_offset) {} /** * (PHP 5, CUBRID >= 8.3.0)* result comes from a call to cubrid_execute() @@ -844,7 +844,7 @@ function cubrid_field_table ($result, $field_offset) {} * Maximum length, when process is successful. FALSE on failure. *
*/ -function cubrid_field_len ($result, $field_offset) {} +function cubrid_field_len($result, $field_offset) {} /** * (PHP 5, CUBRID >= 8.3.0)* The string that is to be escaped. @@ -909,11 +909,11 @@ function cubrid_field_flags ($result, $field_offset) {} * FALSE on failure. *
*/ -function cubrid_real_escape_string ($unescaped_string, $conn_identifier = null) {} +function cubrid_real_escape_string($unescaped_string, $conn_identifier = null) {} /** * (PHP 5, CUBRID >= 8.3.0)* The CUBRID connection. If the connection identifier is not @@ -924,7 +924,7 @@ function cubrid_real_escape_string ($unescaped_string, $conn_identifier = null) * FALSE on failure. *
*/ -function cubrid_client_encoding ($conn_identifier = null) {} +function cubrid_client_encoding($conn_identifier = null) {} /** * (PHP 5, CUBRID >= 8.3.1)* Connection identifier. @@ -1023,7 +1023,7 @@ function cubrid_get_charset ($conn_identifier) {} * process is unsuccessful. *
*/ -function cubrid_set_autocommit ($conn_identifier, $mode) {} +function cubrid_set_autocommit($conn_identifier, $mode) {} /** * (PHP 5, CUBRID >= 8.3.1)* Request identifier. @@ -1108,7 +1108,7 @@ function cubrid_get_query_timeout ($req_identifier) {} * process is unsuccessful. *
*/ -function cubrid_set_query_timeout ($req_identifier, $timeout) {} +function cubrid_set_query_timeout($req_identifier, $timeout) {} /** * (PHP 5, CUBRID >= 8.3.0)+ * @return resource|false
* Lob identifier when it is successful. FALSE on failure. *
*/ -function cubrid_lob2_new ($conn_identifier = NULL, $type = "BLOB") {} +function cubrid_lob2_new($conn_identifier = null, $type = "BLOB") {} /** * (PHP 5, CUBRID >= 8.4.1)* OID return option CUBRID_INCLUDE_OID. *
- * @return resource+ * @return resource|false
* Request identifier, if process is successful; * FALSE, if process is unsuccessful. *
*/ -function cubrid_prepare ($conn_identifier, $prepare_stmt, $option = 0) {} +function cubrid_prepare($conn_identifier, $prepare_stmt, $option = 0) {} /** * (PHP 5, CUBRID >= 8.3.0)Path to the file which will be uploaded.
- * @param string $mimetype [optional]Mimetype of the file.
- * @param string $postname [optional]Name of the file.
+ * @param string $mime_type [optional]Mimetype of the file.
+ * @param string $posted_filename [optional]Name of the file.
* @since 5.5 */ - function __construct($filename, $mimetype, $postname) { - } + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $mime_type = '', + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $posted_filename = '' + ) {} /** * Get file name @@ -22,8 +37,9 @@ function __construct($filename, $mimetype, $postname) { * @return string Returns file name. * @since 5.5 */ - public function getFilename() { - } + #[Pure] + #[TentativeType] + public function getFilename(): string {} /** * Get MIME type @@ -31,8 +47,9 @@ public function getFilename() { * @return string Returns MIME type. * @since 5.5 */ - public function getMimeType() { - } + #[Pure] + #[TentativeType] + public function getMimeType(): string {} /** * Get file name for POST @@ -40,64 +57,64 @@ public function getMimeType() { * @return string Returns file name for POST. * @since 5.5 */ - public function getPostFilename() { - } + #[Pure] + #[TentativeType] + public function getPostFilename(): string {} /** * Set MIME type * @link https://secure.php.net/manual/en/curlfile.setmimetype.php - * @param string $mime + * @param string $mime_type * @since 5.5 */ - public function setMimeType($mime) { - } + #[TentativeType] + public function setMimeType(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mime_type): void {} /** * Set file name for POST * https://secure.php.net/manual/en/curlfile.setpostfilename.php - * @param string $postname + * @param string $posted_filename * @since 5.5 */ - public function setPostFilename($postname) { - } + #[TentativeType] + public function setPostFilename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $posted_filename): void {} /** * @link https://secure.php.net/manual/en/curlfile.wakeup.php * Unserialization handler * @since 5.5 */ - public function __wakeup() { - } + public function __wakeup() {} } + /** * Initialize a cURL session * @link https://php.net/manual/en/function.curl-init.php - * @param string $url [optional]+ * @param string|null $url [optional]
* If provided, the CURLOPT_URL option will be set - * to its value. You can manually set this using the + * to its value. You can manually set this using the * curl_setopt function. *
- * @return resource|false a cURL handle on success, false on errors. - * @since 4.0.2 - * @since 5.0 + * @return resource|false|CurlHandle a cURL handle on success, false on errors. */ -function curl_init ($url = null) {} +#[LanguageLevelTypeAware(['8.0' => 'CurlHandle|false'], default: 'resource|false')] +function curl_init(?string $url) {} /** * Copy a cURL handle along with all of its preferences * @link https://php.net/manual/en/function.curl-copy-handle.php - * @param resource $ch - * @return resource a new cURL handle. - * @since 5.0 + * @param CurlHandle|resource $handle + * @return CurlHandle|resource|false a new cURL handle. */ -function curl_copy_handle ($ch) {} +#[Pure] +#[LanguageLevelTypeAware(['8.0' => 'CurlHandle|false'], default: 'resource|false')] +function curl_copy_handle(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle) {} /** * Gets cURL version information * @link https://php.net/manual/en/function.curl-version.php - * @param int $age [optional]- *
- * @return array an associative array with the following elements: + * @param int $age [optional] Removed since version PHP 8.0. + * @return array|false an associative array with the following elements: ** The CURLOPT_XXX option to set. *
@@ -155,7 +172,7 @@ function curl_version ($age = null) {} * ** value should be a bool for the - * following values of the option parameter: + * following values of the option parameter:
*Set value to | *Notes | * - * * * * @@ -601,7 +617,6 @@ function curl_version ($age = null) {} *Set value to | *Notes | * - * * * * @@ -1055,7 +1070,6 @@ function curl_version ($age = null) {} *Set value to |
* Notes | * - * * * * @@ -1478,7 +1492,6 @@ function curl_version ($age = null) {} *Set value to |
* Notes | * - * * * * @@ -1889,12 +1902,11 @@ function curl_version ($age = null) {} ** | * - * * * *
---|
+ * value should be an array for the following values of the option parameter:
*Set value to |
* Notes | * - * * * * @@ -1961,7 +1972,6 @@ function curl_version ($age = null) {} *Option | *Set value to |
*
- *
*
*
*
@@ -2006,7 +2016,6 @@ function curl_version ($age = null) {}
* Option | *Set value to |
*
- *
*
*
*
@@ -2092,7 +2101,6 @@ function curl_version ($age = null) {}
* Option | *Set value to |
*
- *
*
*
*
@@ -2103,20 +2111,17 @@ function curl_version ($age = null) {}
* handle to use the data from the shared handle.
*
*
- *
*
*
*
---|
* An array specifying which options to set and their values.
* The keys should be valid curl_setopt constants or
@@ -2127,34 +2132,35 @@ function curl_setopt ($ch, $option, $value) {}
* future options in the options array.
* @since 5.1.3
*/
-function curl_setopt_array ($ch, array $options) {}
+function curl_setopt_array(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: 'resource')] $handle, array $options): bool {}
/**
* (PHP 5 >=5.5.0)
* Close a cURL share handle
* @link https://secure.php.net/manual/en/function.curl-share-close.php
- * @param resource $sh
+ * @param CurlShareHandle|resource $share_handle
* A cURL share handle returned by {@link https://secure.php.net/manual/en/function.curl-share-init.php curl_share_init()} *
* @return void * @since 5.5 */ -function curl_share_close ($sh) {} +function curl_share_close(#[LanguageLevelTypeAware(['8.0' => 'CurlShareHandle'], default: 'resource')] $share_handle): void {} /** * (PHP 5 >=5.5.0)+ * @param CurlShareHandle|resource $share_handle
* A cURL share handle returned by {@link https://secure.php.net/manual/en/function.curl-share-init.php curl_share_init()}. *
* @param int $optionOption | *Description | * - * * * * @@ -2185,14 +2190,13 @@ function curl_share_init () {} * * *
---|
Value | *Description | ** Shares SSL session IDs, reducing the time spent on the SSL * handshake when reconnecting to the same server. Note that SSL - * session IDs are reused withing the same handle by default. + * session IDs are reused within the same handle by default. * | * * @@ -2229,188 +2233,413 @@ function curl_share_init () {} * Returns TRUE on success or FALSE on failure. * @since 5.5 */ -function curl_share_setopt ($sh, $option, $value ) {} +function curl_share_setopt(#[LanguageLevelTypeAware(['8.0' => 'CurlShareHandle'], default: 'resource')] $share_handle, int $option, mixed $value): bool {} /** * (PHP 5 >=5.5.0)Option | *Set value to |
*
- *
*
*
*
@@ -2453,110 +2681,156 @@ function curl_multi_select ($mh, $timeout = 1.0) {}
* @return bool Returns TRUE on success or FALSE on failure.
* @since 5.5
*/
-function curl_multi_setopt ($mh, $option, $value) {}
+function curl_multi_setopt(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle, int $option, mixed $value): bool {}
/**
* (PHP 5 >=5.5.0)
---|
format character | - *Description | - *Example returned values | + *
format character | + *Description | + *Example returned values | *
---|---|---|
Day | *--- | *--- | *0 through 365 | * *
Week | *--- | *--- | *Example: 42 (the 42nd week in the year) | * *
Month | *--- | *--- | *28 through 31 | * *
Year | *--- | *--- | *Examples: 99 or 03 | * *
Time | *--- | *--- | *Example: 654321 | * *
Timezone | *--- | *--- | *-43200 through 50400 | * *
Full Date/Time | *--- | *--- | *
* As idate always returns an integer and * as they can't start with a "0", idate may return * fewer digits than you would expect. See the example below. - * @since 5.0 + *
*/ -function idate ($format, $timestamp = null) {} +#[Pure(true)] +function idate(string $format, ?int $timestamp): int|false {} /** * Format a GMT/UTC date/time @@ -394,52 +400,51 @@ function idate ($format, $timestamp = null) {} * The format of the outputted date string. See the formatting * options for the date function. * - * @param int $timestamp [optional] - * @return string|false a formatted date string. If a non-numeric value is used for - * timestamp, false is returned and an + * @param int|null $timestamp [optional] + * @return string|false a formatted date string. If a non-numeric value is used for + * timestamp, false is returned and an * E_WARNING level error is emitted. - * @since 4.0 - * @since 5.0 */ -function gmdate ($format, $timestamp = null) {} +#[Pure(true)] +#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")] +function gmdate(string $format, ?int $timestamp) {} /** * Get Unix timestamp for a date * @link https://php.net/manual/en/function.mktime.php - * @param int $hour [optional]+ * @param int $hour
* The number of the hour. *
- * @param int $minute [optional]+ * @param int|null $minute
* The number of the minute. *
- * @param int $second [optional]+ * @param int|null $second
* The number of seconds past the minute. *
- * @param int $month [optional]+ * @param int|null $month
* The number of the month. *
- * @param int $day [optional]+ * @param int|null $day
* The number of the day. *
- * @param int $year [optional]+ * @param int|null $year [optional]
* The number of the year, may be a two or four digit value, * with values between 0-69 mapping to 2000-2069 and 70-100 to * 1970-2000. On systems where time_t is a 32bit signed integer, as - * most common today, the valid range for year + * most common today, the valid range for year * is somewhere between 1901 and 2038. However, before PHP 5.1.0 this * range was limited from 1970 to 2038 on some systems (e.g. Windows). *
* @param int $is_dst [optional]- * Deprecated since 5.3.0 - use Use the new timezone handling functions instead.
- * This parameter can be set to 1 if the time is during daylight savings time (DST), - * 0 if it is not, or -1 (the default) if it is unknown whether the time is within + * This parameter can be set to 1 if the time is during daylight savings time (DST), + * 0 if it is not, or -1 (the default) if it is unknown whether the time is within * daylight savings time or not. If it's unknown, PHP tries to figure it out itself. * This can cause unexpected (but not incorrect) results. - * Some times are invalid if DST is enabled on the system PHP is running on or - * is_dst is set to 1. If DST is enabled in e.g. 2:00, all times - * between 2:00 and 3:00 are invalid and mktime returns an undefined - * (usually negative) value. - * Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST + * Some times are invalid if DST is enabled on the system PHP is running on or + * is_dst is set to 1. If DST is enabled in e.g. 2:00, all times + * between 2:00 and 3:00 are invalid and mktime returns an undefined + * (usually negative) value. + * Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST * is enabled is evaluated as 23:30 of the previous day. *
*@@ -453,41 +458,58 @@ function gmdate ($format, $timestamp = null) {} * given. * If the arguments are invalid, the function returns false (before PHP 5.1 * it returned -1). - * @since 4.0 - * @since 5.0 */ -function mktime ($hour = null, $minute = null, $second = null, $month = null, $day = null, $year = null, $is_dst = -1) {} +#[Pure(true)] +function mktime( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $hour = null, + #[PhpStormStubsElementAvailable(from: '8.0')] int $hour, + ?int $minute = null, + ?int $second = null, + ?int $month = null, + ?int $day = null, + ?int $year = null, + #[Deprecated('Use the new timezone handling functions instead', since: '5.3')] + #[PhpStormStubsElementAvailable(from: '5.5', to: '5.6')] $is_dst = -1 +): int|false {} /** * Get Unix timestamp for a GMT date * @link https://php.net/manual/en/function.gmmktime.php - * @param int $hour [optional]
+ * @param int $hour
* The hour *
- * @param int $minute [optional]+ * @param int $minute
* The minute *
- * @param int $second [optional]+ * @param int $second
* The second *
- * @param int $month [optional]+ * @param int $month
* The month *
- * @param int $day [optional]+ * @param int $day
* The day *
- * @param int $year [optional]+ * @param int $year
* The year *
- * @param int $is_dst [optional]+ * @param int $is_dst
* Parameters always represent a GMT date so is_dst * doesn't influence the result. *
- * @return int a integer Unix timestamp. - * @since 4.0 - * @since 5.0 + * @return int|false a integer Unix timestamp. */ -function gmmktime ($hour = null, $minute = null, $second = null, $month = null, $day = null, $year = null, $is_dst = null) {} +#[Pure(true)] +function gmmktime( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $hour = null, + #[PhpStormStubsElementAvailable(from: '8.0')] int $hour, + ?int $minute = null, + ?int $second = null, + ?int $month = null, + ?int $day = null, + ?int $year = null, + #[PhpStormStubsElementAvailable(from: '5.5', to: '5.6')] $is_dst = null +): int|false {} /** * Validate a Gregorian date @@ -496,30 +518,28 @@ function gmmktime ($hour = null, $minute = null, $second = null, $month = null, * The month is between 1 and 12 inclusive. * * @param int $day- * The day is within the allowed number of days for the given - * month. Leap years + * The day is within the allowed number of days for the given + * month. Leap years * are taken into consideration. *
* @param int $year* The year is between 1 and 32767 inclusive. *
* @return bool true if the date given is valid; otherwise returns false. - * @since 4.0 - * @since 5.0 */ -function checkdate ($month, $day, $year) {} +#[Pure(true)] +function checkdate(int $month, int $day, int $year): bool {} /** * Format a local time/date according to locale settings * The following characters are recognized in the * format parameter string *format | - *Description | - *Example returned values | - *+ * |
---|---|---|---|
format | + *Description | + *Example returned values | + ** Day | *
%l (lower-case 'L') | - *Hour in 12-hour format, with a space preceeding single digits | + *Hour in 12-hour format, with a space preceding single digits | *1 through 12 | *
--- | *
* Maximum length of this parameter is 1023 characters. *
* Contrary to ISO-9899:1999, Sun Solaris starts with Sunday as 1. * As a result, %u may not function as described in this manual. * @link https://php.net/manual/en/function.strftime.php - * @param string $format- * @param int $timestamp [optional] defaults to the value of time() + * @param string $format + * @param int|null $timestamp [optional] defaults to the value of time() * Unix timestamp that defaults to the current local time if a timestamp is not given.. - * @return string a string formatted according format + * @return string|false a string formatted according format * using the given timestamp or the current * local time if no timestamp is given. Month and weekday names and * other language-dependent strings respect the current locale set * with setlocale. - * @since 4.0 - * @since 5.0 + * @deprecated 8.1 */ -function strftime ($format, $timestamp = null) {} +#[Deprecated(since: '8.1')] +function strftime(string $format, ?int $timestamp): string|false {} /** * Format a GMT/UTC time/date according to locale settings @@ -777,52 +796,59 @@ function strftime ($format, $timestamp = null) {} * @param string $format
* See description in strftime. *
- * @param int $timestamp [optional] - * @return string a string formatted according to the given format string + * @param int|null $timestamp [optional] + * @return string|false a string formatted according to the given format string * using the given timestamp or the current * local time if no timestamp is given. Month and weekday names and * other language dependent strings respect the current locale set * with setlocale. - * @since 4.0 - * @since 5.0 + * @deprecated 8.1 */ -function gmstrftime ($format, $timestamp = null) {} +#[Deprecated(since: '8.1')] +function gmstrftime(string $format, ?int $timestamp): string|false {} /** * Return current Unix timestamp * @link https://php.net/manual/en/function.time.php * @return intReturns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
- * @since 4.0 - * @since 5.0 */ -function time () {} +function time(): int {} /** * Get the local time * @link https://php.net/manual/en/function.localtime.php - * @param int $timestamp [optional] - * @param bool $is_associative [optional]- * If set to false or not supplied then the array is returned as a regular, + * @param int|null $timestamp [optional] + * @param bool $associative [optional]
+ * If set to false or not supplied then the array is returned as a regular, * numerically indexed array. If the argument is set to true then * localtime returns an associative array containing * all the different elements of the structure returned by the C * function call to localtime. The names of the different keys of * the associative array are as follows: *
- ** "tm_sec" - seconds - * @return array - * @since 4.0 - * @since 5.0 + * @return array */ -function localtime ($timestamp = null, $is_associative = null) {} +#[Pure(true)] +#[ArrayShape([ + 'tm_sec' => 'int', + 'tm_min' => 'int', + 'tm_hour' => 'int', + 'tm_mday' => 'int', + 'tm_mon' => 'int', + 'tm_year' => 'int', + 'tm_wday' => 'int', + 'tm_yday' => 'int', + 'tm_isdst' => 'int', +])] +function localtime(?int $timestamp, bool $associative = false): array {} /** * Get date/time information * @link https://php.net/manual/en/function.getdate.php - * @param int $timestamp [optional] + * @param int|null $timestamp [optional] * @return array an associative array of information related to - * the timestamp. Elements from the returned + * the timestamp. Elements from the returned * associative array are as follows: *
*@@ -895,112 +921,171 @@ function localtime ($timestamp = null, $is_associative = null) {} * * *
+ * @param string $datetime [optional]
* String in a format accepted by strtotime. *
- * @param DateTimeZone $timezone [optional]+ * @param DateTimeZone|null $timezone [optional]
* Time zone of the time. *
* @return DateTime|false DateTime object on success or false on failure. - * @since 5.2 */ -function date_create ($time = null, DateTimeZone $timezone = null ) {} +#[Pure(true)] +function date_create(string $datetime = 'now', ?DateTimeZone $timezone): DateTime|false {} /** * (PHP 5.5)+ * @param string $datetime [optional]
* String in a format accepted by strtotime. *
- * @param DateTimeZone $timezone [optional]+ * @param DateTimeZone|null $timezone [optional]
* Time zone of the time. *
* @return DateTimeImmutable|false DateTime object on success or false on failure. */ -function date_create_immutable ($time = null, DateTimeZone $timezone = null ) {} +#[Pure(true)] +function date_create_immutable(string $datetime = 'now', ?DateTimeZone $timezone): DateTimeImmutable|false {} /** * Returns new DateTimeImmutable object formatted according to the specified format * @link https://php.net/manual/en/function.date-create-immutable-from-format.php * @param string $format - * @param string $time - * @param DateTimeZone $timezone [optional] - * @return DateTimeImmutable + * @param string $datetime + * @param DateTimeZone|null $timezone [optional] + * @return DateTimeImmutable|false */ -function date_create_immutable_from_format ($format, $time, DateTimeZone $timezone = null) {} +#[Pure(true)] +function date_create_immutable_from_format(string $format, string $datetime, ?DateTimeZone $timezone): DateTimeImmutable|false {} /** * Alias: * {@see DateTime::createFromFormat} * @link https://php.net/manual/en/function.date-create-from-format.php * @param string $format Format accepted by date(). - *If format does not contain the character ! then portions of the generated time which are not specified in format will be set to the current system time. - *
If format contains the character !, then portions of the generated time not provided in format, as well as values to the left-hand side of the !, will be set to corresponding values from the Unix epoch. - *
The Unix epoch is 1970-01-01 00:00:00 UTC. - * @param string $time String representing the time. - * @param DateTimeZone $timezone [optional] A DateTimeZone object representing the desired time zone. + *
If format does not contain the character ! then portions of the generated time which are not specified in format will be set to the current system time.
+ *If format contains the character !, then portions of the generated time not provided in format, as well as values to the left-hand side of the !, will be set to corresponding values from the Unix epoch.
+ *The Unix epoch is 1970-01-01 00:00:00 UTC.
+ * @param string $datetime String representing the time. + * @param DateTimeZone|null $timezone [optional] A DateTimeZone object representing the desired time zone. * @return DateTime|falseReturns a new * {@see DateTime} instance or FALSE on failure.
- * @since 5.3 */ -function date_create_from_format ($format, $time, $timezone = null) {} +#[Pure(true)] +function date_create_from_format(string $format, string $datetime, ?DateTimeZone $timezone): DateTime|false {} /** * Returns associative array with detailed info about given date * @link https://php.net/manual/en/function.date-parse.php - * @param string $date+ * @param string $datetime
* Date in format accepted by strtotime. *
* @return array|false array with information about the parsed date * on success or false on failure. - * @since 5.2 */ -function date_parse ($date) {} +#[Pure(true)] +#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] +#[ArrayShape([ + "year" => "int", + "month" => "int", + "day" => "int", + "hour" => "int", + "minute" => "int", + "second" => "int", + "fraction" => "double", + "is_localtime" => "bool", + "zone_type" => "int", + "zone" => "int", + "is_dst" => "bool", + "tz_abbr" => "string", + "tz_id" => "string", + "relative" => "array", + "warning_count" => "int", + "warnings" => "array", + "error_count" => "int", + "errors" => "array" +])] +function date_parse(string $datetime): false|array {} /** - * Get info about given date + * Get info about given date formatted according to the specified format * @link https://php.net/manual/en/function.date-parse-from-format.php * @param string $format* Format accepted by date with some extras. *
- * @param string $date+ * @param string $datetime
* String representing the date. *
* @return array associative array with detailed info about given date. - * @since 5.3 */ -function date_parse_from_format ($format, $date) {} +#[Pure(true)] +#[ArrayShape([ + 'year' => 'int', + 'month' => 'int', + 'day' => 'int', + 'hour' => 'int', + 'minute' => 'int', + 'second' => 'int', + 'fraction' => 'double', + 'is_localtime' => 'bool', + 'zone_type' => 'int', + 'zone' => 'int', + 'is_dst' => 'bool', + 'tz_abbr' => 'string', + 'tz_id' => 'string', + 'relative' => 'array', + 'warning_count' => 'int', + 'warnings' => 'array', + 'error_count' => 'int', + 'errors' => 'array' +])] +function date_parse_from_format(string $format, string $datetime): array {} /** + * Returns the warnings and errors * Alias: * {@see DateTime::getLastErrors} * @link https://php.net/manual/en/function.date-get-last-errors.php - * @return arrayReturns array containing info about warnings and errors.
- * @since 5.3 + * @return array|falseReturns array containing info about warnings and errors.
*/ -function date_get_last_errors () {} +#[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])] +#[Pure(true)] +function date_get_last_errors(): array|false {} /** * Alias: * {@see DateTime::format} * @link https://php.net/manual/en/function.date-format.php - * @param $object - * @param $format + * @param DateTimeInterface $object + * @param string $format * @return string|false formatted date string on success or FALSE on failure. - * @since 5.2 */ -function date_format ($object, $format) {} +#[Pure(true)] +#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")] +function date_format(DateTimeInterface $object, string $format) {} /** * Alter the timestamp of a DateTime object by incrementing or decrementing @@ -1009,27 +1094,28 @@ function date_format ($object, $format) {} * {@see DateTime::modify} * @link https://php.net/manual/en/function.date-modify.php * @param DateTime $object A DateTime object returned by date_create(). The function modifies this object. - * @param string $modify A date/time string. Valid formats are explained in {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}. + * @param string $modifier A date/time string. Valid formats are explained in {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}. * @return DateTime|false Returns the DateTime object for method chaining or FALSE on failure. - * @since 5.2 */ -function date_modify ($object, $modify) {} +function date_modify(DateTime $object, string $modifier): DateTime|false {} /** - * &Alias;Procedural style only: A + * @param DateTime $object
Procedural style only: A * {@see DateTime} object returned by * {@see date_create()}. The function modifies this object.
- * @param $intervalA + * @param DateInterval $interval
A * {@see DateInterval} object
* @return DateTime|falseReturns the * {@see DateTime} object for method chaining or FALSE on failure.
- * @since 5.3 */ -function date_add ($object, $interval) {} +#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")] +function date_add(DateTime $object, DateInterval $interval) {} /** + * Subtracts an amount of days, months, years, hours, minutes and seconds from a datetime object * Alias: * {@see DateTime::sub} * @link https://php.net/manual/en/function.date-sub.php @@ -1040,15 +1126,15 @@ function date_add ($object, $interval) {} * {@see DateInterval} object * @return DateTime|falseReturns the * {@see DateTime} object for method chaining or FALSE on failure.
- * @since 5.3 */ -function date_sub ($object, $interval) {} +#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")] +function date_sub(DateTime $object, DateInterval $interval) {} /** * Alias: * {@see DateTime::getTimezone} * @link https://php.net/manual/en/function.date-timezone-get.php - * @param $objectProcedural style only: A + * @param DateTimeInterface $object
Procedural style only: A * {@see DateTime} object * returned by * {@see date_create()}
@@ -1058,79 +1144,90 @@ function date_sub ($object, $interval) {} * {@see DateTimeZone} object on success * or FALSE on failure. * - * @since 5.2 */ -function date_timezone_get ($object) {} +#[Pure(true)] +function date_timezone_get(DateTimeInterface $object): DateTimeZone|false {} /** + * Sets the time zone for the datetime object * Alias: * {@see DateTime::setTimezone} * @link https://php.net/manual/en/function.date-timezone-set.php - * @param DateTime $objectA + * @param DateTime|DateTimeInterface $object
A * {@see DateTime} object returned by * {@see date_create()}. The function modifies this object.
* @param DateTimeZone $timezoneA * {@see DateTimeZone} object representing the desired time zone.
* @return DateTime|falseReturns the * {@see DateTime} object for method chaining or FALSE on failure.
- * @since 5.2 */ -function date_timezone_set ($object, $timezone) {} +#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")] +function date_timezone_set(#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTimeInterface")] $object, DateTimeZone $timezone) {} /** * Alias: * {@see DateTime::getOffset} * @link https://php.net/manual/en/function.date-offset-get.php - * @param $objectProcedural style only: A {@see DateTime} object + * @param DateTimeInterface $object
Procedural style only: A {@see DateTime} object * returned by {@see date_create()}
* @return int|falseReturns the timezone offset in seconds from UTC on success or FALSE on failure.
- * @since 5.2 */ -function date_offset_get ($object) {} +#[Pure(true)] +#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")] +function date_offset_get(DateTimeInterface $object) {} /** + * Returns the difference between two datetime objects * Alias: * {@see DateTime::diff} * @link https://php.net/manual/en/function.date-diff.php - * @param DateTime $object - * @param DateTime $object2 The date to compare to + * @param DateTimeInterface $baseObject + * @param DateTimeInterface $targetObject The date to compare to * @param bool $absolute [optional] Whether to return absolute difference. * @return DateInterval|false The DateInterval object representing the difference between the two dates or FALSE on failure. - * @since 5.3 */ -function date_diff ($object, $object2, $absolute = false) {} +#[Pure(true)] +#[LanguageLevelTypeAware(["8.0" => "DateInterval"], default: "DateInterval|false")] +function date_diff(DateTimeInterface $baseObject, DateTimeInterface $targetObject, bool $absolute = false) {} /** - * &Alias;Returns the + * @param DateTime $object + * @param int $hour + * @param int $minute + * @param int $second [optional] + * @param int $microsecond [optional] + * @return DateTime
Returns the * {@see DateTime} object for method chaining or FALSE on failure.
- * @since 5.2 */ -function date_time_set ($object, $hour, $minute, $second = 0, $microseconds = 0) {} +function date_time_set( + DateTime $object, + int $hour, + int $minute, + int $second = 0, + #[PhpStormStubsElementAvailable(from: '7.1')] int $microsecond = 0 +): DateTime {} /** - * &Alias;Procedural style only: A {@see DateTime} object + * @param DateTime $object
Procedural style only: A {@see DateTime} object * returned by {@see date_create()}. * The function modifies this object.
- * @param $yearYear of the date.
- * @param $monthMonth of the date.
- * @param $dayDay of the date.
+ * @param int $yearYear of the date.
+ * @param int $monthMonth of the date.
+ * @param int $dayDay of the date.
* @return DateTime|false ** Returns the * {@see DateTime} object for method chaining or FALSE on failure. *
- * @since 5.2 */ -function date_date_set ($object, $year, $month, $day) {} +#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")] +function date_date_set(DateTime $object, int $year, int $month, int $day): DateTime|false {} /** * Alias: @@ -1139,36 +1236,39 @@ function date_date_set ($object, $year, $month, $day) {} * @param DateTime $object * @param int $yearYear of the date
* @param int $weekWeek of the date.
- * @param $day [optional]Offset from the first day of the week.
+ * @param int $dayOfWeek [optional]Offset from the first day of the week.
* @return DateTime|false
* Returns the {@see DateTime} object for method chaining or FALSE
on failure.
*
Procedural style only: A * {@see DateTime} object returned by * {@see date_create()}. The function modifies this object.
- * @param int $unixtimestampUnix timestamp representing the date.
+ * @param int $timestampUnix timestamp representing the date.
* @return DateTime|false * {@see DateTime} object for call chaining or FALSE on failure - * @since 5.3 */ -function date_timestamp_set ($object, $unixtimestamp) {} +#[LanguageLevelTypeAware(["8.0" => "DateTime"], default: "DateTime|false")] +function date_timestamp_set(DateTime $object, int $timestamp): DateTime|false {} /** + * Gets the unix timestamp * Alias: * {@see DateTime::getTimestamp} * @link https://php.net/manual/en/function.date-timestamp-get.php * @param DateTimeInterface $object * @return intReturns the Unix timestamp representing the date.
- * @since 5.3 */ -function date_timestamp_get ($object) {} +#[Pure(true)] +function date_timestamp_get(DateTimeInterface $object): int {} /** * Returns new DateTimeZone object @@ -1178,19 +1278,20 @@ function date_timestamp_get ($object) {} * (e.g. CET). * * @return DateTimeZone|false DateTimeZone object on success or false on failure. - * @since 5.1 */ -function timezone_open ($timezone) {} +#[Pure(true)] +function timezone_open(string $timezone): DateTimeZone|false {} /** - * Alias: {@see DateTimeZone::getName} + * Alias: + * {@see DateTimeZone::getName} * @link https://php.net/manual/en/function.timezone-name-get.php - * @param $objectThe + * @param DateTimeZone $object
The * {@see DateTimeZone} for which to get a name.
* @return string One of the timezone names in the list of timezones. - * @since 5.1 */ -function timezone_name_get ($object) {} +#[Pure] +function timezone_name_get(DateTimeZone $object): string {} /** * Returns the timezone name from abbreviation @@ -1198,13 +1299,13 @@ function timezone_name_get ($object) {} * @param string $abbr* Time zone abbreviation. *
- * @param int $gmtOffset [optional]+ * @param int $utcOffset [optional]
* Offset from GMT in seconds. Defaults to -1 which means that first found * time zone corresponding to abbr is returned. * Otherwise exact offset is searched and only if not found then the first * time zone with any offset is returned. *
- * @param int $isdst [optional]+ * @param int $isDST [optional]
* Daylight saving time indicator. If abbr doesn't * exist then the time zone is searched solely by * offset and isdst. @@ -1212,103 +1313,117 @@ function timezone_name_get ($object) {} * @return string|false time zone name on success or false on failure. * @since 5.1.3 */ -function timezone_name_from_abbr ($abbr, $gmtOffset = null, $isdst = null) {} +#[Pure(true)] +function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = -1): string|false {} /** * Alias: * {@link DateTimeZone::getOffset} * @link https://php.net/manual/en/function.timezone-offset-get.php - * @param $object
Procedural style only: A + * @param DateTimeZone $object
Procedural style only: A * {@see DateTimeZone} object * returned by * {@see timezone_open()}
- * @param $datetimeDateTime that contains the date/time to compute the offset from.
+ * @param DateTimeInterface $datetimeDateTime that contains the date/time to compute the offset from.
* @return int|falseReturns time zone offset in seconds on success or FALSE on failure.
- * @since 5.1 */ -function timezone_offset_get ($object, $datetime) {} +#[Pure(true)] +#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")] +function timezone_offset_get(DateTimeZone $object, DateTimeInterface $datetime) {} /** + * Returns all transitions for the timezone * Alias: * {@see DateTimeZone::getTransitions} * @link https://php.net/manual/en/function.timezone-transitions-get.php * @param DateTimeZone $objectProcedural style only: A * {@see DateTimeZone} object returned by * {@see timezone_open()}
- * @param int $timestamp_begin [optional]Begin timestamp
- * @param int $timestamp_end [optional]End timestamp
+ * @param int $timestampBegin [optional]Begin timestamp
+ * @param int $timestampEnd [optional]End timestamp
* @return array|falseReturns numerically indexed array containing associative array with all transitions on success or FALSE on failure.
- * @since 5.2 */ -function timezone_transitions_get ($object, $timestamp_begin, $timestamp_end) {} +#[Pure(true)] +function timezone_transitions_get(DateTimeZone $object, int $timestampBegin, int $timestampEnd): array|false {} /** - * &Alias; {@see DateTimeZone::getLocation} + * Alias: + * {@see DateTimeZone::getLocation} * @link https://php.net/manual/en/function.timezone-location-get.php - * @param $objectProcedural style only: A {@see DateTimeZone} object returned by {@see timezone_open()} - * @return array
Array containing location information about timezone.
- * @since 5.3 + * @param DateTimeZone $objectProcedural style only: A {@see DateTimeZone} object returned by {@see timezone_open()}
+ * @return array|falseArray containing location information about timezone.
*/ -function timezone_location_get ($object) {} +#[Pure(true)] +#[ArrayShape([ + 'country_code' => 'string', + 'latitude' => 'double', + 'longitude' => 'double', + 'comments' => 'string', +])] +function timezone_location_get(DateTimeZone $object): array|false {} /** + * Returns a numerically indexed array containing all defined timezone identifiers * Alias: * {@see DateTimeZone::listIdentifiers()} * @link https://php.net/manual/en/function.timezone-identifiers-list.php - * @param int $what [optional] One of DateTimeZone class constants. - * @param string $country [optional] A two-letter ISO 3166-1 compatible country code. + * @param int $timezoneGroup [optional] One of DateTimeZone class constants. + * @param string|null $countryCode [optional] A two-letter ISO 3166-1 compatible country code. + * Note: This option is only used when $timezoneGroup is set to DateTimeZone::PER_COUNTRY. * @return array|false Returns array on success or FALSE on failure. - * Note: This option is only used when what is set to DateTimeZone::PER_COUNTRY. - * @since 5.1 */ -function timezone_identifiers_list ($what = DateTimeZone::ALL, $country = null) {} +#[Pure(true)] +#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] +function timezone_identifiers_list(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode) {} /** * Returns associative array containing dst, offset and the timezone name * Alias: * {@see DateTimeZone::listAbbreviations} * @link https://php.net/manual/en/function.timezone-abbreviations-list.php - * @return array|false Array on success or FALSE on failure. - * @since 5.2 + * @return arrayA date with relative parts. Specifically, the relative formats supported by the parser used for + * @param string $datetime
A date with relative parts. Specifically, the relative formats supported by the parser used for * {@see strtotime()} and * {@see DateTime} will be used to construct the * {@see DateInterval}.
- * @return DateInterval + * @return DateInterval|false *Returns a new DateInterval instance.
- * @since 5.3 */ -function date_interval_create_from_date_string ($time) {} +#[Pure(true)] +function date_interval_create_from_date_string(string $datetime): DateInterval|false {} /** - * &Alias;+ * @param string $timezoneId
* The timezone identifier, like UTC or * Europe/Lisbon. The list of valid identifiers is * available in the . @@ -1316,17 +1431,16 @@ function date_interval_format ($object, $format) {} * @return bool This function returns false if the * timezone_identifier isn't valid, or true * otherwise. - * @since 5.1 */ -function date_default_timezone_set ($timezone_identifier) {} +function date_default_timezone_set(string $timezoneId): bool {} /** * Gets the default timezone used by all date/time functions in a script * @link https://php.net/manual/en/function.date-default-timezone-get.php * @return string a string. - * @since 5.1 */ -function date_default_timezone_get () {} +#[Pure] +function date_default_timezone_get(): string {} /** * Returns time of sunrise for a given day and location @@ -1335,7 +1449,7 @@ function date_default_timezone_get () {} * The timestamp of the day from which the sunrise * time is taken. *
- * @param int $format [optional]+ * @param int $returnFormat [optional]
*
+ * @param float|null $latitude [optional]
* Defaults to North, pass in a negative value for South. * See also: date.default_latitude *
- * @param float $longitude [optional]+ * @param float|null $longitude [optional]
* Defaults to East, pass in a negative value for West. * See also: date.default_longitude *
- * @param float $zenith [optional]+ * @param float|null $zenith [optional]
* Default: date.sunrise_zenith *
- * @param float $gmt_offset [optional] - * @return mixed the sunrise time in a specified format on + * @param float|null $utcOffset [optional] + * @return string|int|float|false the sunrise time in a specified format on * success or false on failure. - * @since 5.0 + * @deprecated in 8.1. Use {@link date_sun_info} instead */ -function date_sunrise ($timestamp, $format = null, $latitude = null, $longitude = null, $zenith = null, $gmt_offset = null) {} +#[Pure(true)] +#[Deprecated(reason: 'in 8.1. Use date_sun_info instead', since: '8.1')] +function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude, ?float $longitude, ?float $zenith, ?float $utcOffset): string|int|float|false {} /** * Returns time of sunset for a given day and location @@ -1385,7 +1501,7 @@ function date_sunrise ($timestamp, $format = null, $latitude = null, $longitude * The timestamp of the day from which the sunset * time is taken. * - * @param int $format [optional]+ * @param int $returnFormat [optional]
*
+ * @param float|null $latitude [optional]
* Defaults to North, pass in a negative value for South. * See also: date.default_latitude *
- * @param float $longitude [optional]+ * @param float|null $longitude [optional]
* Defaults to East, pass in a negative value for West. * See also: date.default_longitude *
- * @param float $zenith [optional]+ * @param float|null $zenith [optional]
* Default: date.sunset_zenith *
- * @param float $gmt_offset [optional] - * @return mixed the sunset time in a specified format on + * @param float|null $utcOffset [optional] + * @return string|int|float|false the sunset time in a specified format on * success or false on failure. - * @since 5.0 + * @deprecated in 8.1. Use {@link date_sun_info} instead */ -function date_sunset ($timestamp, $format = null, $latitude = null, $longitude = null, $zenith = null, $gmt_offset = null) {} +#[Pure(true)] +#[Deprecated(reason: 'in 8.1. Use date_sun_info instead', since: '8.1')] +function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude, ?float $longitude, ?float $zenith, ?float $utcOffset): string|int|float|false {} /** * Returns an array with information about sunset/sunrise and twilight begin/end * @link https://php.net/manual/en/function.date-sun-info.php - * @param int $time+ * @param int $timestamp
* Timestamp. *
* @param float $latitude@@ -1440,9 +1558,47 @@ function date_sunset ($timestamp, $format = null, $latitude = null, $longitude = * @param float $longitude
* Longitude in degrees. *
- * @return array|false array on success or false on failure. + * @return array{ + * sunrise: int|bool, + * sunset: int|bool, + * transit: int|bool, + * civil_twilight_begin: int|bool, + * civil_twilight_end: int|bool, + * nautical_twilight_begin: int|bool, + * nautical_twilight_end: int|bool, + * astronomical_twilight_begin: int|bool, + * astronomical_twilight_end: int|bool, + * }|false Returns array on success orfalse
on failure. The structure of the array is detailed in the following list:
+ * sunrise | The timestamp of the sunrise (zenith angle = 90°35'). |
sunset | The timestamp of the sunset (zenith angle = 90°35'). |
transit | The timestamp when the sun is at its zenith, i.e. has reached its topmost point. |
civil_twilight_begin | The start of the civil dawn (zenith angle = 96°). It ends at sunrise . |
civil_twilight_end | The end of the civil dusk (zenith angle = 96°). It starts at sunset . |
nautical_twilight_begin | The start of the nautical dawn (zenith angle = 102°). It ends at civil_twilight_begin . |
nautical_twilight_end | The end of the nautical dusk (zenith angle = 102°). It starts at civil_twilight_end . |
astronomical_twilight_begin | The start of the astronomical dawn (zenith angle = 108°). It ends at nautical_twilight_begin . |
astronomical_twilight_end | The end of the astronomical dusk (zenith angle = 108°). It starts at nautical_twilight_end . |
false
if the
+ * sun is below the respective zenith for the whole day, or true
if the sun is
+ * above the respective zenith for the whole day.
* @since 5.1.2
*/
-function date_sun_info ($time, $latitude, $longitude) {}
+#[Pure(true)]
+#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
+#[ArrayShape([
+ "sunrise" => "int",
+ "sunset" => "int",
+ "transit" => "int",
+ "civil_twilight_begin" => "int",
+ "civil_twilight_end" => "int",
+ "nautical_twilight_begin" => "int",
+ "nautical_twilight_end" => "int",
+ "astronomical_twilight_begin" => "int",
+ "astronomical_twilight_end" => "int"
+])]
+function date_sun_info(int $timestamp, float $latitude, float $longitude): array|false {}
// End of date v.5.3.2-0.dotdeb.1
diff --git a/date/date_c.php b/date/date_c.php
index 765a9ec00..d6db7e837 100644
--- a/date/date_c.php
+++ b/date/date_c.php
@@ -1,33 +1,106 @@
* Returns the difference between two DateTime objects
* @link https://secure.php.net/manual/en/datetime.diff.php
- * @param DateTimeInterface $datetime2 The date to compare to.
+ * @param DateTimeInterface $targetObjectThe date to compare to.
* @param bool $absoluteShould the interval be forced to be positive?
* @return DateInterval * The https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the - * difference between the two dates or FALSE on failure. - * + * difference between the two dates. */ - public function diff($datetime2, $absolute = false); + #[TentativeType] + public function diff( + DateTimeInterface $targetObject, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false + ): DateInterval; /** * (PHP 5 >=5.5.0)A date/time string. Valid formats are explained in {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}.
- *- * Enter NULL here to obtain the current time when using - * the $timezone parameter. - *
- * @param DateTimeZone $timezone [optional]- * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the - * timezone of $time. - *
- *- * If $timezone is omitted, - * the current timezone will be used. + *
Enter NULL here to obtain the current time when using the $timezone parameter.
+ * @param null|DateTimeZone $timezone [optional]+ * A {@link https://secure.php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the timezone of $datetime. *
- *+ *Note: - *
- * The $timezone parameter - * and the current timezone are ignored when the - *$time parameter either - * is a UNIX timestamp (e.g. @946684800) - * or specifies a timezone - * (e.g. 2010-01-28T15:00:00+02:00). - *
If $timezone is omitted, the current timezone will be used.
+ ** @throws Exception Emits Exception in case of an error. */ - public function __construct($time = "now", $timezone = NULL) { } + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime = "now", + #[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null + ) {} /** * (PHP 5 >=5.5.0)Note:
+ * The $timezone parameter and the current timezone are ignored when the $datetime parameter either + * is a UNIX timestamp (e.g. @946684800) or specifies a timezone (e.g. 2010-01-28T15:00:00+02:00). + *
A date/time string. Valid formats are explained in + * @param string $modifier
A date/time string. Valid formats are explained in * {@link https://secure.php.net/manual/en/datetime.formats.php Date and Time Formats}.
- * @return static + * @return static|false Returns the newly created object or false on failure. * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure. */ - - public function modify($modify) { } + #[Pure] + #[TentativeType] + public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTimeImmutable|false {} /** * (PHP 5 >=5.5.0)Day of the date.
* @return static|false * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure. - * */ - public function setDate($year, $month, $day) { } + #[TentativeType] + public function setDate( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day + ): DateTimeImmutable {} /** * (PHP 5 >=5.5.0)Year of the date.
- * @param int $weekWeek of the date.
- * @param int $day [optional]Offset from the first day of the week.
+ * @param int $weekWeek of the date.
+ * @param int $dayOfWeek [optional]Offset from the first day of the week.
* @return static|false * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure. */ - public function setISODate($year, $week, $day = 1) { } + #[TentativeType] + public function setISODate( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1 + ): DateTimeImmutable {} /** * (PHP 5 >=5.5.0)Hour of the time.
* @param int $minuteMinute of the time.
* @param int $second [optional]Second of the time.
- * @param int $microseconds [optional]Microseconds of the time.
+ * @param int $microsecond [optional]Microseconds of the time. Added since 7.1
* @return static|false - * @since 7.1 $microseconds parameter added. * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure. */ - public function setTime($hour, $minute, $second = 0, $microseconds = 0) { } + #[TentativeType] + public function setTime( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0, + #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0 + ): DateTimeImmutable {} /** * (PHP 5 >=5.5.0)Unix timestamp representing the date.
- * @return static|false + * @param int $timestampUnix timestamp representing the date.
+ * @return static * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure. */ - public function setTimestamp($unixtimestamp) { } + #[TentativeType] + public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTimeImmutable {} /** * (PHP 5 >=5.5.0)* A {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object *
- * @return static|false + * @return static * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure. */ - public function sub(DateInterval $interval) { } + #[TentativeType] + public function sub(DateInterval $interval): DateTimeImmutable {} /** * (PHP 5 >=5.5.0)The date to compare to.
+ * @param DateTimeInterface $targetObjectThe date to compare to.
* @param bool $absolute [optional]Should the interval be forced to be positive?
- * @return DateInterval + * @return DateInterval|false * The {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the * difference between the two dates or FALSE on failure. */ - public function diff($datetime2, $absolute = false) { } + #[TentativeType] + public function diff( + #[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false + ): DateInterval {} /** * (PHP 5 >=5.5.0)A date/time string. Valid formats are explained in {@link https://php.net/manual/en/datetime.formats.php Date and Time Formats}.
** Enter now here to obtain the current time when using * the $timezone parameter. *
- * @param DateTimeZone $timezone [optional]+ * @param null|DateTimeZone $timezone [optional]
* A {@link https://php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the - * timezone of $time. + * timezone of $datetime. *
** If $timezone is omitted, @@ -332,21 +526,24 @@ class DateTime implements DateTimeInterface { *
* The $timezone parameter * and the current timezone are ignored when the - *$time parameter either + * $time parameter either * is a UNIX timestamp (e.g. @946684800) * or specifies a timezone * (e.g. 2010-01-28T15:00:00+02:00). *
* @throws Exception Emits Exception in case of an error. */ - public function __construct ($time='now', DateTimeZone $timezone=null) {} + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime = 'now', + #[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null + ) {} /** * @return void * @link https://php.net/manual/en/datetime.wakeup.php */ - public function __wakeup () {} - + #[TentativeType] + public function __wakeup(): void {} /** * Returns date formatted according to given format. @@ -354,16 +551,18 @@ public function __wakeup () {} * @return string * @link https://php.net/manual/en/datetime.format.php */ - public function format ($format) {} + #[TentativeType] + public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format): string {} /** * Alter the timestamp of a DateTime object by incrementing or decrementing * in a format accepted by strtotime(). - * @param string $modify A date/time string. Valid formats are explained in Date and Time Formats. - * @return static Returns the DateTime object for method chaining or FALSE on failure. + * @param string $modifier A date/time string. Valid formats are explained in Date and Time Formats. + * @return static|false Returns the DateTime object for method chaining or FALSE on failure. * @link https://php.net/manual/en/datetime.modify.php */ - public function modify ($modify) {} + #[TentativeType] + public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTime|false {} /** * Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object @@ -371,14 +570,17 @@ public function modify ($modify) {} * @return static * @link https://php.net/manual/en/datetime.add.php */ - public function add (DateInterval $interval) {} - + #[TentativeType] + public function add(DateInterval $interval): DateTime {} /** - * @since 7.3 + * @param DateTimeImmutable $object * @return DateTime + * @since 7.3 */ - public static function createFromImmutable(DateTimeImmutable $datetTimeImmutable) {} + #[TentativeType] + #[LanguageLevelTypeAware(['8.2' => 'static'], default: 'DateTime')] + public static function createFromImmutable(DateTimeImmutable $object) {} /** * Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object @@ -386,14 +588,16 @@ public static function createFromImmutable(DateTimeImmutable $datetTimeImmutable * @return static * @link https://php.net/manual/en/datetime.sub.php */ - public function sub (DateInterval $interval) {} + #[TentativeType] + public function sub(DateInterval $interval): DateTime {} /** * Get the TimeZone associated with the DateTime - * @return DateTimeZone + * @return DateTimeZone|false * @link https://php.net/manual/en/datetime.gettimezone.php */ - public function getTimezone () {} + #[TentativeType] + public function getTimezone(): DateTimeZone|false {} /** * Set the TimeZone associated with the DateTime @@ -401,26 +605,33 @@ public function getTimezone () {} * @return static * @link https://php.net/manual/en/datetime.settimezone.php */ - public function setTimezone ($timezone) {} + #[TentativeType] + public function setTimezone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): DateTime {} /** * Returns the timezone offset * @return int * @link https://php.net/manual/en/datetime.getoffset.php */ - public function getOffset () {} + #[TentativeType] + public function getOffset(): int {} /** * Sets the current time of the DateTime object to a different time. * @param int $hour * @param int $minute * @param int $second - * @param int $microseconds - * @return static|false - * @since 7.1 $microseconds parameter added. + * @param int $microsecond Added since 7.1 + * @return static * @link https://php.net/manual/en/datetime.settime.php */ - public function setTime ($hour, $minute, $second=0, $microseconds=0) {} + #[TentativeType] + public function setTime( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0, + #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0 + ): DateTime {} /** * Sets the current date of the DateTime object to a different date. @@ -430,59 +641,81 @@ public function setTime ($hour, $minute, $second=0, $microseconds=0) {} * @return static * @link https://php.net/manual/en/datetime.setdate.php */ - public function setDate ($year, $month, $day) {} + #[TentativeType] + public function setDate( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $day + ): DateTime {} /** * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. * @param int $year * @param int $week - * @param int $day + * @param int $dayOfWeek * @return static * @link https://php.net/manual/en/datetime.setisodate.php */ - public function setISODate ($year, $week, $day=1) {} + #[TentativeType] + public function setISODate( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $dayOfWeek = 1 + ): DateTime {} /** * Sets the date and time based on a Unix timestamp. - * @param int $unixtimestamp + * @param int $timestamp * @return static * @link https://php.net/manual/en/datetime.settimestamp.php */ - public function setTimestamp ($unixtimestamp) {} + #[TentativeType] + public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTime {} /** * Gets the Unix timestamp. * @return int * @link https://php.net/manual/en/datetime.gettimestamp.php */ - public function getTimestamp () {} + #[TentativeType] + public function getTimestamp(): int {} /** * Returns the difference between two DateTime objects represented as a DateInterval. - * @param DateTimeInterface $datetime2 The date to compare to. + * @param DateTimeInterface $targetObject The date to compare to. * @param bool $absolute [optional] Whether to return absolute difference. - * @return DateInterval|false The DateInterval object representing the difference between the two dates or FALSE on failure. + * @return DateInterval|false The DateInterval object representing the difference between the two dates. * @link https://php.net/manual/en/datetime.diff.php */ - public function diff ($datetime2, $absolute = false) {} - + #[TentativeType] + public function diff( + #[LanguageLevelTypeAware(['8.0' => 'DateTimeInterface'], default: '')] $targetObject, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $absolute = false + ): DateInterval {} /** * Parse a string into a new DateTime object according to the specified format * @param string $format Format accepted by date(). - * @param string $time String representing the time. - * @param DateTimeZone $timezone A DateTimeZone object representing the desired time zone. + * @param string $datetime String representing the time. + * @param null|DateTimeZone $timezone A DateTimeZone object representing the desired time zone. * @return DateTime|false * @link https://php.net/manual/en/datetime.createfromformat.php */ - public static function createFromFormat ($format, $time, DateTimeZone $timezone=null) {} + #[TentativeType] + public static function createFromFormat( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime, + #[LanguageLevelTypeAware(['8.0' => 'DateTimeZone|null'], default: 'DateTimeZone')] $timezone = null + ): DateTime|false {} /** * Returns an array of warnings and errors found while parsing a date/time string - * @return array + * @return array|false * @link https://php.net/manual/en/datetime.getlasterrors.php */ - public static function getLastErrors () {} + #[ArrayShape(["warning_count" => "int", "warnings" => "string[]", "error_count" => "int", "errors" => "string[]"])] + #[TentativeType] + public static function getLastErrors(): array|false {} /** * The __set_state handler @@ -490,49 +723,71 @@ public static function getLastErrors () {} * @param array $arrayInitialization array.
* @return DateTimeReturns a new instance of a DateTime object.
*/ - public static function __set_state ($array) {} + public static function __set_state($array) {} + + /** + * @param DateTimeInterface $object + * @return DateTime + * @since 8.0 + */ + public static function createFromInterface(DateTimeInterface $object): DateTime {} + + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __serialize(): array {} + + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __unserialize(array $data): void {} } /** * Representation of time zone * @link https://php.net/manual/en/class.datetimezone.php */ -class DateTimeZone { - const AFRICA = 1; - const AMERICA = 2; - const ANTARCTICA = 4; - const ARCTIC = 8; - const ASIA = 16; - const ATLANTIC = 32; - const AUSTRALIA = 64; - const EUROPE = 128; - const INDIAN = 256; - const PACIFIC = 512; - const UTC = 1024; - const ALL = 2047; - const ALL_WITH_BC = 4095; - const PER_COUNTRY = 4096; - +class DateTimeZone +{ + public const AFRICA = 1; + public const AMERICA = 2; + public const ANTARCTICA = 4; + public const ARCTIC = 8; + public const ASIA = 16; + public const ATLANTIC = 32; + public const AUSTRALIA = 64; + public const EUROPE = 128; + public const INDIAN = 256; + public const PACIFIC = 512; + public const UTC = 1024; + public const ALL = 2047; + public const ALL_WITH_BC = 4095; + public const PER_COUNTRY = 4096; /** * @param string $timezone * @link https://php.net/manual/en/datetimezone.construct.php + * @throws Exception Emits Exception in case of an error. */ - public function __construct ($timezone) {} + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezone) {} /** * Returns the name of the timezone * @return string * @link https://php.net/manual/en/datetimezone.getname.php */ - public function getName () {} + #[TentativeType] + public function getName(): string {} /** * Returns location information for a timezone - * @return array + * @return array|false * @link https://php.net/manual/en/datetimezone.getlocation.php */ - public function getLocation () {} + #[TentativeType] + #[ArrayShape([ + 'country_code' => 'string', + 'latitude' => 'double', + 'longitude' => 'double', + 'comments' => 'string', + ])] + public function getLocation(): array|false {} /** * Returns the timezone offset from GMT @@ -540,41 +795,59 @@ public function getLocation () {} * @return int * @link https://php.net/manual/en/datetimezone.getoffset.php */ - public function getOffset (DateTimeInterface $datetime) {} + #[TentativeType] + public function getOffset(DateTimeInterface $datetime): int {} /** * Returns all transitions for the timezone - * @param int $timestamp_begin [optional] - * @param int $timestamp_end [optional] - * @return array + * @param int $timestampBegin + * @param int $timestampEnd + * @return array|false * @link https://php.net/manual/en/datetimezone.gettransitions.php */ - public function getTransitions ($timestamp_begin=null, $timestamp_end=null) {} - + #[TentativeType] + public function getTransitions( + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $timestampBegin, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $timestampEnd, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampBegin = null, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampEnd = null + ): array|false {} /** * Returns associative array containing dst, offset and the timezone name - * @return array + * @return array+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return void No value is returned. - * @since 4.0 - * @since 5.0 */ -function dba_close ($handle) {} +function dba_close($dba): void {} /** * Delete DBA entry specified by key @@ -167,15 +177,13 @@ function dba_close ($handle) {} * @param string $key* The key of the entry which is deleted. *
- * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function dba_delete ($key, $handle) {} +function dba_delete(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, $dba): bool {} /** * Check whether key exists @@ -183,15 +191,13 @@ function dba_delete ($key, $handle) {} * @param string $key* The key the check is performed for. *
- * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return bool TRUE if the key exists, FALSE otherwise. - * @since 4.0 - * @since 5.0 */ -function dba_exists ($key, $handle) {} +function dba_exists(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, $dba): bool {} /** * Fetch data specified by key @@ -210,10 +216,8 @@ function dba_exists ($key, $handle) {} * * @return string|false the associated string if the key/data pair is found, FALSE * otherwise. - * @since 4.0 - * @since 5.0 */ -function dba_fetch ($key, $handle) {} +function dba_fetch($key, $handle): string|false {} /** * Fetch data specified by key @@ -227,16 +231,14 @@ function dba_fetch ($key, $handle) {} * dba_key_split. * * @param int $skip The number of key-value pairs to ignore when using cdb databases. This value is ignored for all other databases which do not support multiple keys with the same name. - * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return string|false the associated string if the key/data pair is found, FALSE * otherwise. - * @since 4.0 - * @since 5.0 */ -function dba_fetch ($key, $skip, $handle) {} +function dba_fetch($key, $skip, $dba): string|false {} /** * Insert entry @@ -249,15 +251,13 @@ function dba_fetch ($key, $skip, $handle) {} * @param string $value* The value to be inserted. *
- * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function dba_insert ($key, $value, $handle) {} +function dba_insert(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, string $value, $dba): bool {} /** * Replace or insert entry @@ -268,67 +268,57 @@ function dba_insert ($key, $value, $handle) {} * @param string $value* The value to be replaced. *
- * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function dba_replace ($key, $value, $handle) {} +function dba_replace(#[LanguageLevelTypeAware(['8.2' => 'array|string'], default: '')] $key, string $value, $dba): bool {} /** * Fetch first key * @link https://php.net/manual/en/function.dba-firstkey.php - * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
- * @return string the key on success or FALSE on failure. - * @since 4.0 - * @since 5.0 + * @return string|false the key on success or FALSE on failure. */ -function dba_firstkey ($handle) {} +function dba_firstkey($dba): string|false {} /** * Fetch next key * @link https://php.net/manual/en/function.dba-nextkey.php - * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
- * @return string the key on success or FALSE on failure. - * @since 4.0 - * @since 5.0 + * @return string|false the key on success or FALSE on failure. */ -function dba_nextkey ($handle) {} +function dba_nextkey($dba): string|false {} /** * Optimize database * @link https://php.net/manual/en/function.dba-optimize.php - * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function dba_optimize ($handle) {} +function dba_optimize($dba): bool {} /** * Synchronize database * @link https://php.net/manual/en/function.dba-sync.php - * @param resource $handle+ * @param resource $dba
* The database handler, returned by dba_open or * dba_popen. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function dba_sync ($handle) {} +function dba_sync($dba): bool {} /** * List all the handlers available @@ -344,31 +334,26 @@ function dba_sync ($handle) {} ** When the internal cdb library is used you will see * cdb and cdb_make. - * @since 4.3 - * @since 5.0 */ -function dba_handlers ($full_info = false) {} +function dba_handlers(bool $full_info = false): array {} /** * List all open database files * @link https://php.net/manual/en/function.dba-list.php * @return array An associative array, in the form resourceid => filename. - * @since 4.3 - * @since 5.0 */ -function dba_list () {} +function dba_list(): array {} /** * Splits a key in string representation into array representation * @link https://php.net/manual/en/function.dba-key-split.php - * @param mixed $key
+ * @param string|false|null $key
* The key in string representation. *
* @return array|false an array of the form array(0 => group, 1 => * value_name). This function will return FALSE if * key is NULL or FALSE. - * @since 5.0 */ -function dba_key_split ($key) {} +function dba_key_split(string|false|null $key): array|false {} // End of dba v. diff --git a/decimal/decimal.php b/decimal/decimal.php new file mode 100644 index 000000000..d07216d44 --- /dev/null +++ b/decimal/decimal.php @@ -0,0 +1,466 @@ +` operator. + * + * @param mixed $other + * + * @return int 0 if this decimal is considered is equal to $other, + * -1 if this decimal should be placed before $other, + * 1 if this decimal should be placed after $other. + */ + public function compareTo($other): int {} + + /** + * String representation. + * + * This method is equivalent to a cast to string, as well as `toString`. + * + * @return string the value of this decimal represented exactly, in either + * fixed or scientific form, depending on the value. + */ + public function __toString(): string {} + + /** + * JSON + * + * This method is only here to honour the interface, and is equivalent to + * `toString`. JSON does not have a decimal type so all decimals are encoded + * as strings in the same format as `toString`. + * + * @return string + */ + public function jsonSerialize() {} +} diff --git a/dio/dio.php b/dio/dio.php new file mode 100644 index 000000000..4bf112b00 --- /dev/null +++ b/dio/dio.php @@ -0,0 +1,215 @@ + + ** The SimpleXMLElement node. *
- * @return DOMElement|false The DOMElement node added or FALSE if any errors occur. + * @return DOMElement|null The DOMElement node added or NULL if any errors occur. */ -function dom_import_simplexml (SimpleXMLElement $node) {} - +#[LanguageLevelTypeAware(['8.0' => 'DOMElement'], default: 'DOMElement|null')] +function dom_import_simplexml(object $node) {} /** * Node is a DOMElement * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_ELEMENT_NODE', 1); +define('XML_ELEMENT_NODE', 1); /** * Node is a DOMAttr * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_ATTRIBUTE_NODE', 2); +define('XML_ATTRIBUTE_NODE', 2); /** * Node is a DOMText * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_TEXT_NODE', 3); +define('XML_TEXT_NODE', 3); /** * Node is a DOMCharacterData * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_CDATA_SECTION_NODE', 4); +define('XML_CDATA_SECTION_NODE', 4); /** * Node is a DOMEntityReference * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_ENTITY_REF_NODE', 5); +define('XML_ENTITY_REF_NODE', 5); /** * Node is a DOMEntity * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_ENTITY_NODE', 6); +define('XML_ENTITY_NODE', 6); /** * Node is a DOMProcessingInstruction * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_PI_NODE', 7); +define('XML_PI_NODE', 7); /** * Node is a DOMComment * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_COMMENT_NODE', 8); +define('XML_COMMENT_NODE', 8); /** * Node is a DOMDocument * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_DOCUMENT_NODE', 9); +define('XML_DOCUMENT_NODE', 9); /** * Node is a DOMDocumentType * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_DOCUMENT_TYPE_NODE', 10); +define('XML_DOCUMENT_TYPE_NODE', 10); /** * Node is a DOMDocumentFragment * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_DOCUMENT_FRAG_NODE', 11); +define('XML_DOCUMENT_FRAG_NODE', 11); /** * Node is a DOMNotation * @link https://php.net/manual/en/dom.constants.php */ -define ('XML_NOTATION_NODE', 12); -define ('XML_HTML_DOCUMENT_NODE', 13); -define ('XML_DTD_NODE', 14); -define ('XML_ELEMENT_DECL_NODE', 15); -define ('XML_ATTRIBUTE_DECL_NODE', 16); -define ('XML_ENTITY_DECL_NODE', 17); -define ('XML_NAMESPACE_DECL_NODE', 18); -define ('XML_LOCAL_NAMESPACE', 18); -define ('XML_ATTRIBUTE_CDATA', 1); -define ('XML_ATTRIBUTE_ID', 2); -define ('XML_ATTRIBUTE_IDREF', 3); -define ('XML_ATTRIBUTE_IDREFS', 4); -define ('XML_ATTRIBUTE_ENTITY', 6); -define ('XML_ATTRIBUTE_NMTOKEN', 7); -define ('XML_ATTRIBUTE_NMTOKENS', 8); -define ('XML_ATTRIBUTE_ENUMERATION', 9); -define ('XML_ATTRIBUTE_NOTATION', 10); +define('XML_NOTATION_NODE', 12); +define('XML_HTML_DOCUMENT_NODE', 13); +define('XML_DTD_NODE', 14); +define('XML_ELEMENT_DECL_NODE', 15); +define('XML_ATTRIBUTE_DECL_NODE', 16); +define('XML_ENTITY_DECL_NODE', 17); +define('XML_NAMESPACE_DECL_NODE', 18); +define('XML_LOCAL_NAMESPACE', 18); +define('XML_ATTRIBUTE_CDATA', 1); +define('XML_ATTRIBUTE_ID', 2); +define('XML_ATTRIBUTE_IDREF', 3); +define('XML_ATTRIBUTE_IDREFS', 4); +define('XML_ATTRIBUTE_ENTITY', 6); +define('XML_ATTRIBUTE_NMTOKEN', 7); +define('XML_ATTRIBUTE_NMTOKENS', 8); +define('XML_ATTRIBUTE_ENUMERATION', 9); +define('XML_ATTRIBUTE_NOTATION', 10); /** * Error code not part of the DOM specification. Meant for PHP errors. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_PHP_ERR', 0); +define('DOM_PHP_ERR', 0); /** * If index or size is negative, or greater than the allowed value. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_INDEX_SIZE_ERR', 1); +define('DOM_INDEX_SIZE_ERR', 1); /** * If the specified range of text does not fit into a * DOMString. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOMSTRING_SIZE_ERR', 2); +define('DOMSTRING_SIZE_ERR', 2); /** * If any node is inserted somewhere it doesn't belong * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_HIERARCHY_REQUEST_ERR', 3); +define('DOM_HIERARCHY_REQUEST_ERR', 3); /** * If a node is used in a different document than the one that created it. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_WRONG_DOCUMENT_ERR', 4); +define('DOM_WRONG_DOCUMENT_ERR', 4); /** * If an invalid or illegal character is specified, such as in a name. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_INVALID_CHARACTER_ERR', 5); +define('DOM_INVALID_CHARACTER_ERR', 5); /** * If data is specified for a node which does not support data. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_NO_DATA_ALLOWED_ERR', 6); +define('DOM_NO_DATA_ALLOWED_ERR', 6); /** * If an attempt is made to modify an object where modifications are not allowed. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_NO_MODIFICATION_ALLOWED_ERR', 7); +define('DOM_NO_MODIFICATION_ALLOWED_ERR', 7); /** * If an attempt is made to reference a node in a context where it does not exist. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_NOT_FOUND_ERR', 8); +define('DOM_NOT_FOUND_ERR', 8); /** * If the implementation does not support the requested type of object or operation. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_NOT_SUPPORTED_ERR', 9); +define('DOM_NOT_SUPPORTED_ERR', 9); /** * If an attempt is made to add an attribute that is already in use elsewhere. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_INUSE_ATTRIBUTE_ERR', 10); +define('DOM_INUSE_ATTRIBUTE_ERR', 10); /** * If an attempt is made to use an object that is not, or is no longer, usable. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_INVALID_STATE_ERR', 11); +define('DOM_INVALID_STATE_ERR', 11); /** * If an invalid or illegal string is specified. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_SYNTAX_ERR', 12); +define('DOM_SYNTAX_ERR', 12); /** * If an attempt is made to modify the type of the underlying object. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_INVALID_MODIFICATION_ERR', 13); +define('DOM_INVALID_MODIFICATION_ERR', 13); /** * If an attempt is made to create or change an object in a way which is * incorrect with regard to namespaces. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_NAMESPACE_ERR', 14); +define('DOM_NAMESPACE_ERR', 14); /** * If a parameter or an operation is not supported by the underlying object. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_INVALID_ACCESS_ERR', 15); +define('DOM_INVALID_ACCESS_ERR', 15); /** * If a call to a method such as insertBefore or removeChild would make the Node @@ -207,7 +206,6 @@ function dom_import_simplexml (SimpleXMLElement $node) {} * the operation would not be done. * @link https://php.net/manual/en/dom.constants.php */ -define ('DOM_VALIDATION_ERR', 16); +define('DOM_VALIDATION_ERR', 16); // End of dom v.20031129 -?> diff --git a/dom/dom_c.php b/dom/dom_c.php index 967cc66c6..9622a4ef6 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -1,222 +1,229 @@ 'string'], default: '')] public $nodeName; /** - * @var string - * @since 5.0 + * @var string|null * The value of this node, depending on its type * @link https://php.net/manual/en/class.domnode.php#domnode.props.nodevalue */ + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] public $nodeValue; /** * @var int - * @since 5.0 * Gets the type of the node. One of the predefined * XML_xxx_NODE constants * @link https://php.net/manual/en/class.domnode.php#domnode.props.nodetype */ + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] public $nodeType; /** * @var DOMNode|null - * @since 5.0 * The parent of this node. If there is no such node, this returns NULL. * @link https://php.net/manual/en/class.domnode.php#domnode.props.parentnode */ + #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')] public $parentNode; /** * @var DOMNodeList - * @since 5.0 * A+ * @param DOMNode $node
* The new node. *
- * @param DOMNode $refnode [optional]+ * @param null|DOMNode $child [optional]
* The reference node. If not supplied, newnode is * appended to the children. *
* @return DOMNode The inserted node. - * @since 5.0 */ - public function insertBefore (DOMNode $newnode, DOMNode $refnode = null) {} + public function insertBefore( + DOMNode $node, + #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: 'DOMNode')] $child = null + ) {} /** * Replaces a child * @link https://php.net/manual/en/domnode.replacechild.php - * @param DOMNode $newnode+ * @param DOMNode $node
* The new node. It must be a member of the target document, i.e. * created by one of the DOMDocument->createXXX() methods or imported in * the document by . *
- * @param DOMNode $oldnode+ * @param DOMNode $child
* The old node. *
- * @return DOMNode The old node or false if an error occur. - * @since 5.0 + * @return DOMNode|false The old node or false if an error occur. */ - public function replaceChild (DOMNode $newnode , DOMNode $oldnode ) {} + public function replaceChild(DOMNode $node, DOMNode $child) {} /** * Removes child from list of children * @link https://php.net/manual/en/domnode.removechild.php - * @param DOMNode $oldnode+ * @param DOMNode $child
* The removed child. *
* @return DOMNode If the child could be removed the functions returns the old child. - * @since 5.0 */ - public function removeChild (DOMNode $oldnode ) {} + public function removeChild(DOMNode $child) {} /** * Adds new child at the end of the children * @link https://php.net/manual/en/domnode.appendchild.php - * @param DOMNode $newnode+ * @param DOMNode $node
* The appended child. *
* @return DOMNode The node added. - * @since 5.0 */ - public function appendChild (DOMNode $newnode ) {} + public function appendChild(DOMNode $node) {} /** * Checks if node has children * @link https://php.net/manual/en/domnode.haschildnodes.php * @return bool true on success or false on failure. - * @since 5.0 */ - public function hasChildNodes () {} + #[TentativeType] + public function hasChildNodes(): bool {} /** * Clones a node * @link https://php.net/manual/en/domnode.clonenode.php - * @param bool $deep [optional]+ * @param bool $deep
* Indicates whether to copy all descendant nodes. This parameter is * defaulted to false. *
- * @return DOMNode The cloned node. - * @since 5.0 + * @return static The cloned node. */ - public function cloneNode ($deep = null) {} + public function cloneNode( + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $deep, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $deep = false + ) {} /** * Normalizes the node * @link https://php.net/manual/en/domnode.normalize.php * @return void - * @since 5.0 */ - public function normalize () {} + #[TentativeType] + public function normalize(): void {} /** * Checks if feature is supported for specified version @@ -230,56 +237,71 @@ public function normalize () {} * The version number of the feature to test. * * @return bool true on success or false on failure. - * @since 5.0 */ - public function isSupported ($feature, $version) {} + #[TentativeType] + public function isSupported( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version + ): bool {} /** * Checks if node has attributes * @link https://php.net/manual/en/domnode.hasattributes.php * @return bool true on success or false on failure. - * @since 5.0 */ - public function hasAttributes () {} + #[TentativeType] + public function hasAttributes(): bool {} /** * @param DOMNode $other */ - public function compareDocumentPosition (DOMNode $other) {} + public function compareDocumentPosition(DOMNode $other) {} /** * Indicates if two nodes are the same node * @link https://php.net/manual/en/domnode.issamenode.php - * @param DOMNode $node+ * @param DOMNode $otherNode
* The compared node. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function isSameNode (DOMNode $node ) {} + #[TentativeType] + public function isSameNode(DOMNode $otherNode): bool {} /** * Gets the namespace prefix of the node based on the namespace URI * @link https://php.net/manual/en/domnode.lookupprefix.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI. *
* @return string The prefix of the namespace. - * @since 5.0 */ - public function lookupPrefix ($namespaceURI) {} + #[TentativeType] + public function lookupPrefix(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): ?string {} /** * Checks if the specified namespaceURI is the default namespace or not * @link https://php.net/manual/en/domnode.isdefaultnamespace.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI to look for. *
* @return bool Return true if namespaceURI is the default * namespace, false otherwise. - * @since 5.0 */ - public function isDefaultNamespace ($namespaceURI) {} + #[TentativeType] + public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace): bool {} + + /** + * Gets the namespace URI of the node based on the prefix + * @link https://php.net/manual/en/domnode.lookupnamespaceuri.php + * @param string|null $prefix+ * The prefix of the namespace. + *
+ * @return string The namespace URI of the node. + */ + #[PhpStormStubsElementAvailable(from: '8.0')] + #[TentativeType] + public function lookupNamespaceURI(?string $prefix): ?string {} /** * Gets the namespace URI of the node based on the prefix @@ -288,74 +310,86 @@ public function isDefaultNamespace ($namespaceURI) {} * The prefix of the namespace. * * @return string The namespace URI of the node. - * @since 5.0 */ - public function lookupNamespaceUri ($prefix) {} + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] + public function lookupNamespaceUri($prefix) {} /** * @param DOMNode $arg * @return bool */ - public function isEqualNode (DOMNode $arg) {} + public function isEqualNode(DOMNode $arg) {} /** * @param $feature * @param $version * @return mixed */ - public function getFeature ($feature, $version) {} + public function getFeature($feature, $version) {} /** * @param $key * @param $data * @param $handler */ - public function setUserData ($key, $data, $handler) {} + public function setUserData($key, $data, $handler) {} /** * @param $key * @return mixed */ - public function getUserData ($key) {} + public function getUserData($key) {} /** * Gets an XPath location path for the node * @return string|null the XPath, or NULL in case of an error. * @link https://secure.php.net/manual/en/domnode.getnodepath.php - * @since 5.3 */ - public function getNodePath () {} - + #[TentativeType] + public function getNodePath(): ?string {} - /** - * Get line number for a node - * @link https://php.net/manual/en/domnode.getlineno.php - * @return int Always returns the line number where the node was defined in. - * @since 5.3 - */ - public function getLineNo () {} + /** + * Get line number for a node + * @link https://php.net/manual/en/domnode.getlineno.php + * @return int Always returns the line number where the node was defined in. + */ + #[TentativeType] + public function getLineNo(): int {} /** * Canonicalize nodes to a string * @param bool $exclusive [optional] Enable exclusive parsing of only the nodes matched by the provided xpath or namespace prefixes. - * @param bool $with_comments [optional] Retain comments in output. - * @param array $xpath [optional] An array of xpaths to filter the nodes by. - * @param array $ns_prefixes [optional] An array of namespace prefixes to filter the nodes by. - * @return string canonicalized nodes as a string or FALSE on failure + * @param bool $withComments [optional] Retain comments in output. + * @param null|array $xpath [optional] An array of xpaths to filter the nodes by. + * @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by. + * @return string|false Canonicalized nodes as a string or FALSE on failure */ - public function C14N ($exclusive, $with_comments, array $xpath = null, $ns_prefixes = null) {} + #[TentativeType] + public function C14N( + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false, + #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null, + #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null + ): string|false {} /** * Canonicalize nodes to a file. - * @param $uri Number of bytes written or FALSE on failure - * @param $exclusive [optional] Enable exclusive parsing of only the nodes matched by the provided xpath or namespace prefixes. - * @param $with_comments [optional] Retain comments in output. - * @param $xpath [optional] An array of xpaths to filter the nodes by. - * @param $ns_prefixes [optional] An array of namespace prefixes to filter the nodes by. + * @link https://www.php.net/manual/en/domnode.c14nfile + * @param string $uri Number of bytes written or FALSE on failure + * @param bool $exclusive [optional] Enable exclusive parsing of only the nodes matched by the provided xpath or namespace prefixes. + * @param bool $withComments [optional] Retain comments in output. + * @param null|array $xpath [optional] An array of xpaths to filter the nodes by. + * @param null|array $nsPrefixes [optional] An array of namespace prefixes to filter the nodes by. * @return int|false Number of bytes written or FALSE on failure */ - public function C14NFile ($uri, $exclusive, array $with_comments, array $xpath = null, $ns_prefixes = null) {} - + #[TentativeType] + public function C14NFile( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $uri, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $exclusive = false, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $withComments = false, + #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null, + #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null + ): int|false {} } /** @@ -363,160 +397,203 @@ public function C14NFile ($uri, $exclusive, array $with_comments, array $xpath = * when an operation is impossible to perform for logical reasons. * @link https://php.net/manual/en/class.domexception.php */ -class DOMException extends Exception { - +final class DOMException extends Exception +{ /** - * @since 5.0 - * An integer indicating the type of error generated * @link https://php.net/manual/en/class.domexception.php#domexception.props.code + * @var int An integer indicating the type of error generated */ public $code; } -class DOMStringList { - - /** - * @param $index - * @return mixed - */ - public function item ($index) {} - +class DOMStringList +{ + /** + * @param $index + * @return mixed + */ + public function item($index) {} } /** * @link https://php.net/manual/en/ref.dom.php + * @removed 8.0 */ -class DOMNameList { - - /** - * @param $index - * @return mixed - */ - public function getName ($index) {} - - /** - * @param $index - * @return mixed - */ - public function getNamespaceURI ($index) {} +class DOMNameList +{ + /** + * @param $index + * @return mixed + */ + public function getName($index) {} + /** + * @param $index + * @return mixed + */ + public function getNamespaceURI($index) {} } -class DOMImplementationList { - - /** - * @param $index - * @return mixed - */ - public function item ($index) {} - +/** + * @removed 8.0 + */ +class DOMImplementationList +{ + /** + * @param $index + * @return mixed + */ + public function item($index) {} } -class DOMImplementationSource { - - /** - * @param $features - * @return mixed - */ - public function getDomimplementation ($features) {} - - /** - * @param $features - * @return mixed - */ - public function getDomimplementations ($features) {} +/** + * @removed 8.0 + */ +class DOMImplementationSource +{ + /** + * @param $features + * @return mixed + */ + public function getDomimplementation($features) {} + /** + * @param $features + * @return mixed + */ + public function getDomimplementations($features) {} } /** * The DOMImplementation interface provides a number - * of methods for performing operations that are independent of any + * of methods for performing operations that are independent of any * particular instance of the document object model. * @link https://php.net/manual/en/class.domimplementation.php */ -class DOMImplementation { - +class DOMImplementation +{ /** - * Creates a new DOMImplementation object - * @link https://php.net/manual/en/domimplementation.construct.php - * @since 5.0 + * @param string $feature + * @param string $version + * @return mixed */ - public function __construct(){} + #[TentativeType] + public function getFeature( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $feature, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version + ): never {} /** - * @param $feature - * @param $version - * @return mixed + * Test if the DOM implementation implements a specific feature + * @link https://php.net/manual/en/domimplementation.hasfeature.php + * @param string $feature+ * The feature to test. + *
+ * @param string $version+ * The version number of the feature to test. In + * level 2, this can be either 2.0 or 1.0. + *
+ * @return bool true on success or false on failure. */ - public function getFeature ($feature, $version) {} - - /** - * Test if the DOM implementation implements a specific feature - * @link https://php.net/manual/en/domimplementation.hasfeature.php - * @param string $feature- * The feature to test. - *
- * @param string $version- * The version number of the feature to test. In - * level 2, this can be either 2.0 or - * 1.0. - *
- * @return bool true on success or false on failure. - * @since 5.0 - */ - public function hasFeature ($feature, $version) {} + public function hasFeature($feature, $version) {} /** * Creates an empty DOMDocumentType object * @link https://php.net/manual/en/domimplementation.createdocumenttype.php - * @param string $qualifiedName [optional]+ * @param string $qualifiedName
* The qualified name of the document type to create. *
- * @param string $publicId [optional]+ * @param string $publicId
* The external subset public identifier. *
- * @param string $systemId [optional]+ * @param string $systemId
* The external subset system identifier. *
- * @return DOMDocumentType A new DOMDocumentType node with its - * ownerDocument set to &null;. - * @since 5.0 + * @return DOMDocumentType|false A new DOMDocumentType node with its + * ownerDocument set to null. + * @throws DOMException If there is an error with the namespace */ - public function createDocumentType ($qualifiedName = null, $publicId = null, $systemId = null) {} + public function createDocumentType( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $publicId, + #[PhpStormStubsElementAvailable(from: '8.0')] string $publicId = '', + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $systemId, + #[PhpStormStubsElementAvailable(from: '8.0')] string $systemId = '' + ) {} /** * Creates a DOMDocument object of the specified type with its document element * @link https://php.net/manual/en/domimplementation.createdocument.php - * @param string $namespaceURI [optional]+ * @param string|null $namespace
* The namespace URI of the document element to create. *
- * @param string $qualifiedName [optional]+ * @param string $qualifiedName
* The qualified name of the document element to create. *
- * @param DOMDocumentType $doctype [optional]- * The type of document to create or &null;. - *
- * @return DOMDocument A new DOMDocument object. If - * namespaceURI, qualifiedName, - * and doctype are null, the returned - * DOMDocument is empty with no document element - * @since 5.0 - */ - public function createDocument ($namespaceURI = null, $qualifiedName = null, DOMDocumentType $doctype = null) {} - + * @param DOMDocumentType|null $doctype+ * The type of document to create or null. + *
+ * @return DOMDocument|false A new DOMDocument object. If + * namespaceURI, qualifiedName, and doctype are null, the + * returned DOMDocument is empty with no document element. + * @throws DOMException If $doctype has already been used + * with adifferent document or was created from a different + * implementation. If there is an error with the namespace, + * as determined by $namespace and $qualifiedName. + */ + public function createDocument( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $namespace, + #[PhpStormStubsElementAvailable(from: '8.0')] ?string $namespace = null, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $qualifiedName, + #[PhpStormStubsElementAvailable(from: '8.0')] string $qualifiedName = '', + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] DOMDocumentType $doctype, + #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'DOMDocumentType|null'], default: 'DOMDocumentType')] $doctype = null + ) {} } +class DOMNameSpaceNode +{ + #[LanguageLevelTypeAware(['8.1' => 'DOMNode|null'], default: '')] + public $parentNode; + + #[LanguageLevelTypeAware(['8.1' => 'DOMDocument|null'], default: '')] + public $ownerDocument; + + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] + public $namespaceURI; + + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] + public $localName; + + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] + public $prefix; + + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] + public $nodeType; + + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] + public $nodeValue; -class DOMNameSpaceNode { + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] + public $nodeName; } /** * The DOMDocumentFragment class * @link https://php.net/manual/en/class.domdocumentfragment.php */ -class DOMDocumentFragment extends DOMNode { +class DOMDocumentFragment extends DOMNode implements DOMParentNode +{ + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] + public $childElementCount; - public function __construct () {} + #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')] + public $lastElementChild; + + #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')] + public $firstElementChild; + + public function __construct() {} /** * Append raw XML data @@ -525,315 +602,337 @@ public function __construct () {} * XML to append. * * @return bool true on success or false on failure. - * @since 5.1 */ - public function appendXML ($data) {} + #[TentativeType] + public function appendXML(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {} + + /** + * {@inheritDoc} + */ + public function append(...$nodes): void {} + /** + * {@inheritDoc} + */ + public function prepend(...$nodes): void {} } /** * The DOMDocument class represents an entire HTML or XML * document; serves as the root of the document tree. - * @link https://php.net/manual/class.domdocument.php + * @link https://php.net/manual/en/class.domdocument.php */ -class DOMDocument extends DOMNode { - +class DOMDocument extends DOMNode implements DOMParentNode +{ /** - * @var string - * @since 5.0 - * Deprecated. Actual encoding of the document, is a readonly equivalent to encoding. - * @link https://php.net/manual/class.domdocument.php#domdocument.props.actualencoding - * @deprecated + * @var string|null + * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.actualencoding */ + #[Deprecated("Actual encoding of the document, is a readonly equivalent to encoding.")] + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] public $actualEncoding; /** * @var DOMConfiguration - * @since 5.0 - * Deprecated. Configuration used when {@link DOMDocument::normalizeDocument()} is invoked. - * @link https://php.net/manual/class.domdocument.php#domdocument.props.config - * @deprecated + * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.config + * @see DOMDocument::normalizeDocument() */ + #[Deprecated("Configuration used when DOMDocument::normalizeDocument() is invoked.")] + #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] public $config; /** * @var DOMDocumentType - * @since 5.0 * The Document Type Declaration associated with this document. - * @link https://php.net/manual/class.domdocument.php#domdocument.props.doctype + * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.doctype */ + #[LanguageLevelTypeAware(['8.1' => 'DOMDocumentType|null'], default: '')] public $doctype; /** * @var DOMElement - * @since 5.0 * This is a convenience attribute that allows direct access to the child node * that is the document element of the document. - * @link https://php.net/manual/class.domdocument.php#domdocument.props.documentelement + * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documentelement */ + #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')] public $documentElement; /** * @var string|null - * @since 5.0 * The location of the document or NULL if undefined. - * @link https://php.net/manual/class.domdocument.php#domdocument.props.documenturi + * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.documenturi */ + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] public $documentURI; /** - * @var string - * @since 5.0 + * @var string|null * Encoding of the document, as specified by the XML declaration. This attribute is not present * in the final DOM Level 3 specification, but is the only way of manipulating XML document * encoding in this implementation. - * @link https://php.net/manual/class.domdocument.php#domdocument.props.encoding + * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.encoding */ - public $encoding ; + #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')] + public $encoding; /** * @var bool - * @since 5.0 * Nicely formats output with indentation and extra space. - * @link https://php.net/manual/class.domdocument.php#domdocument.props.formatoutput + * @link https://php.net/manual/en/class.domdocument.php#domdocument.props.formatoutput */ - public $formatOutput ; + #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')] + public $formatOutput; /** * @var DOMImplementation - * @since 5.0 * The+ * @link https://php.net/manual/en/domdocument.createelement.php + * @param string $localName
* The tag name of the element. *
* @param string $value [optional]* The value of the element. By default, an empty element will be created. * You can also set the value later with DOMElement->nodeValue. *
- * @return DOMElement a new instance of class DOMElement or false - * if an error occured. - * @since 5.0 + * @return DOMElement|false A new instance of class DOMElement or false + * if an error occurred. + * @throws DOMException If invalid $localName */ - public function createElement ($name, $value = null) {} + public function createElement( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = '' + ) {} /** * Create new document fragment - * @link https://php.net/manual/domdocument.createdocumentfragment.php - * @return DOMDocumentFragment The new DOMDocumentFragment or false if an error occured. - * @since 5.0 + * @link https://php.net/manual/en/domdocument.createdocumentfragment.php + * @return DOMDocumentFragment|false The new DOMDocumentFragment or false if an error occurred. */ - public function createDocumentFragment () {} + #[TentativeType] + public function createDocumentFragment(): DOMDocumentFragment {} /** * Create new text node - * @link https://php.net/manual/domdocument.createtextnode.php - * @param string $content+ * @link https://php.net/manual/en/domdocument.createtextnode.php + * @param string $data
* The content of the text. *
- * @return DOMText The new DOMText or false if an error occured. - * @since 5.0 + * @return DOMText|false The new DOMText or false if an error occurred. */ - public function createTextNode ($content) {} + #[TentativeType] + public function createTextNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMText {} /** * Create new comment node - * @link https://php.net/manual/domdocument.createcomment.php + * @link https://php.net/manual/en/domdocument.createcomment.php * @param string $data* The content of the comment. *
- * @return DOMComment The new DOMComment or false if an error occured. - * @since 5.0 + * @return DOMComment|false The new DOMComment or false if an error occurred. */ - public function createComment ($data) {} + #[TentativeType] + public function createComment(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): DOMComment {} /** * Create new cdata node - * @link https://php.net/manual/domdocument.createcdatasection.php + * @link https://php.net/manual/en/domdocument.createcdatasection.php * @param string $data* The content of the cdata. *
- * @return DOMCDATASection The new DOMCDATASection or false if an error occured. - * @since 5.0 + * @return DOMCDATASection|false The new DOMCDATASection or false if an error occurred. */ - public function createCDATASection ($data) {} + public function createCDATASection(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {} /** * Creates new PI node - * @link https://php.net/manual/domdocument.createprocessinginstruction.php + * @link https://php.net/manual/en/domdocument.createprocessinginstruction.php * @param string $target* The target of the processing instruction. *
- * @param string $data [optional]+ * @param string $data
* The content of the processing instruction. *
- * @return DOMProcessingInstruction The new DOMProcessingInstruction or false if an error occured. - * @since 5.0 + * @return DOMProcessingInstruction|false The new DOMProcessingInstruction or false if an error occurred. */ - public function createProcessingInstruction ($target, $data = null) {} + public function createProcessingInstruction( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $data, + #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data = null + ) {} /** * Create new attribute - * @link https://php.net/manual/domdocument.createattribute.php - * @param string $name+ * @link https://php.net/manual/en/domdocument.createattribute.php + * @param string $localName
* The name of the attribute. *
- * @return DOMAttr The new DOMAttr or false if an error occured. - * @since 5.0 + * @return DOMAttr|false The new DOMAttr or false if an error occurred. + * @throws DOMException If invalid $localName */ - public function createAttribute ($name) {} + public function createAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName) {} /** * Create new entity reference node - * @link https://php.net/manual/domdocument.createentityreference.php + * @link https://php.net/manual/en/domdocument.createentityreference.php * @param string $name* The content of the entity reference, e.g. the entity reference minus * the leading & and the trailing * ; characters. *
- * @return DOMEntityReference The new DOMEntityReference or false if an error - * occured. - * @since 5.0 + * @return DOMEntityReference|false The new DOMEntityReference or false if an error + * occurred. */ - public function createEntityReference ($name) {} + public function createEntityReference(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name) {} /** * Searches for all elements with given tag name - * @link https://php.net/manual/domdocument.getelementsbytagname.php - * @param string $name+ * @link https://php.net/manual/en/domdocument.getelementsbytagname.php + * @param string $qualifiedName
* The name of the tag to match on. The special value * * matches all tags. *
* @return DOMNodeList A new DOMNodeList object containing all the matched * elements. - * @since 5.0 */ - public function getElementsByTagName ($name) {} + #[TentativeType] + public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {} /** * Import node into current document - * @link https://php.net/manual/domdocument.importnode.php - * @param DOMNode $importedNode+ * @link https://php.net/manual/en/domdocument.importnode.php + * @param DOMNode $node
* The node to import. *
- * @param bool $deep [optional]+ * @param bool $deep
* If set to true, this method will recursively import the subtree under * the importedNode. *
** To copy the nodes attributes deep needs to be set to true *
- * @return DOMNode The copied node or false, if it cannot be copied. - * @since 5.0 + * @return DOMNode|false The copied node or false, if it cannot be copied. */ - public function importNode (DOMNode $importedNode , $deep = null) {} + public function importNode( + DOMNode $node, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $deep, + #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $deep = false + ) {} /** * Create new element node with an associated namespace - * @link https://php.net/manual/domdocument.createelementns.php - * @param string $namespaceURI+ * @link https://php.net/manual/en/domdocument.createelementns.php + * @param string|null $namespace
* The URI of the namespace. *
* @param string $qualifiedName@@ -843,29 +942,36 @@ public function importNode (DOMNode $importedNode , $deep = null) {} * The value of the element. By default, an empty element will be created. * You can also set the value later with DOMElement->nodeValue. *
- * @return DOMElement The new DOMElement or false if an error occured. - * @since 5.0 + * @return DOMElement|false The new DOMElement or false if an error occurred. + * @throws DOMException If invalid $namespace or $qualifiedName */ - public function createElementNS ($namespaceURI, $qualifiedName, $value = null) {} + public function createElementNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = '' + ) {} /** * Create new attribute node with an associated namespace - * @link https://php.net/manual/domdocument.createattributens.php - * @param string $namespaceURI+ * @link https://php.net/manual/en/domdocument.createattributens.php + * @param string|null $namespace
* The URI of the namespace. *
* @param string $qualifiedName* The tag name and prefix of the attribute, as prefix:tagname. *
- * @return DOMAttr The new DOMAttr or false if an error occured. - * @since 5.0 + * @return DOMAttr|false The new DOMAttr or false if an error occurred. + * @throws DOMException If invalid $namespace or $qualifiedName */ - public function createAttributeNS ($namespaceURI, $qualifiedName) {} + public function createAttributeNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName + ) {} /** * Searches for all elements with given tag name in specified namespace - * @link https://php.net/manual/domdocument.getelementsbytagnamens.php - * @param string $namespaceURI+ * @link https://php.net/manual/en/domdocument.getelementsbytagnamens.php + * @param string $namespace
* The namespace URI of the elements to match on. * The special value * matches all namespaces. *
@@ -875,45 +981,58 @@ public function createAttributeNS ($namespaceURI, $qualifiedName) {} * * @return DOMNodeList A new DOMNodeList object containing all the matched * elements. - * @since 5.0 */ - public function getElementsByTagNameNS ($namespaceURI, $localName) {} + #[TentativeType] + public function getElementsByTagNameNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName + ): DOMNodeList {} /** * Searches for an element with a certain id - * @link https://php.net/manual/domdocument.getelementbyid.php + * @link https://php.net/manual/en/domdocument.getelementbyid.php * @param string $elementId* The unique id value for an element. *
- * @return DOMElement|null The DOMElement or &null; if the element is + * @return DOMElement|null The DOMElement or null if the element is * not found. - * @since 5.0 */ - public function getElementById ($elementId) {} + #[TentativeType] + public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId): ?DOMElement {} + + /** + * @param DOMNode $node + */ + public function adoptNode(DOMNode $node) {} /** - * @param DOMNode $source + * {@inheritDoc} */ - public function adoptNode (DOMNode $source) {} + public function append(...$nodes): void {} + + /** + * {@inheritDoc} + */ + public function prepend(...$nodes): void {} /** * Normalizes the document - * @link https://php.net/manual/domdocument.normalizedocument.php + * @link https://php.net/manual/en/domdocument.normalizedocument.php * @return void - * @since 5.0 */ - public function normalizeDocument () {} + #[TentativeType] + public function normalizeDocument(): void {} /** * @param DOMNode $node - * @param $namespaceURI + * @param $namespace * @param $qualifiedName */ - public function renameNode (DOMNode $node, $namespaceURI, $qualifiedName) {} + public function renameNode(DOMNode $node, $namespace, $qualifiedName) {} /** * Load XML from a file - * @link https://php.net/manual/domdocument.load.php + * @link https://php.net/manual/en/domdocument.load.php * @param string $filename* The path to the XML document. *
@@ -921,30 +1040,31 @@ public function renameNode (DOMNode $node, $namespaceURI, $qualifiedName) {} * Bitwise OR * of the libxml option constants. * - * @return mixed true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. If called statically, returns a * DOMDocument and issues E_STRICT * warning. - * @since 5.0 */ - public function load ($filename, $options = null) {} + public function load( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null + ) {} /** * Dumps the internal XML tree back into a file - * @link https://php.net/manual/domdocument.save.php + * @link https://php.net/manual/en/domdocument.save.php * @param string $filename* The path to the saved XML document. *
* @param int $options [optional]* Additional Options. Currently only LIBXML_NOEMPTYTAG is supported. *
- * @return int the number of bytes written or false if an error occurred. - * @since 5.0 + * @return int|false the number of bytes written or false if an error occurred. */ - public function save ($filename, $options = null) {} + public function save($filename, $options = null) {} /** * Load XML from a string - * @link https://php.net/manual/domdocument.loadxml.php + * @link https://php.net/manual/en/domdocument.loadxml.php * @param string $source* The string containing the XML. *
@@ -952,244 +1072,261 @@ public function save ($filename, $options = null) {} * Bitwise OR * of the libxml option constants. * - * @return mixed true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. If called statically, returns a * DOMDocument and issues E_STRICT * warning. - * @since 5.0 */ - public function loadXML ($source, $options = null) {} + public function loadXML( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null + ) {} /** * Dumps the internal XML tree back into a string - * @link https://php.net/manual/domdocument.savexml.php - * @param DOMNode $node [optional]+ * @link https://php.net/manual/en/domdocument.savexml.php + * @param null|DOMNode $node [optional]
* Use this parameter to output only a specific node without XML declaration * rather than the entire document. *
* @param int $options [optional]* Additional Options. Currently only LIBXML_NOEMPTYTAG is supported. *
- * @return string the XML, or false if an error occurred. - * @since 5.0 + * @return string|false the XML, or false if an error occurred. */ - public function saveXML (DOMNode $node = null , $options = null) {} + #[TentativeType] + public function saveXML( + ?DOMNode $node = null, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null + ): string|false {} /** * Creates a new DOMDocument object - * @link https://php.net/manual/domdocument.construct.php + * @link https://php.net/manual/en/domdocument.construct.php * @param string $version [optional] The version number of the document as part of the XML declaration. * @param string $encoding [optional] The encoding of the document as part of the XML declaration. - * @since 5.0 */ - public function __construct ($version = '', $encoding = '') {} + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $version = '1.0', + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encoding = '' + ) {} /** * Validates the document based on its DTD - * @link https://php.net/manual/domdocument.validate.php + * @link https://php.net/manual/en/domdocument.validate.php * @return bool true on success or false on failure. * If the document have no DTD attached, this method will return false. - * @since 5.0 */ - public function validate () {} + #[TentativeType] + public function validate(): bool {} /** * Substitutes XIncludes in a DOMDocument Object - * @link https://php.net/manual/domdocument.xinclude.php + * @link https://php.net/manual/en/domdocument.xinclude.php * @param int $options [optional]* libxml parameters. Available * since PHP 5.1.0 and Libxml 2.6.7. *
- * @return int the number of XIncludes in the document. - * @since 5.0 + * @return int|false the number of XIncludes in the document. */ - public function xinclude ($options = null) {} + #[TentativeType] + public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): int|false {} /** * Load HTML from a string - * @link https://php.net/manual/domdocument.loadhtml.php + * @link https://php.net/manual/en/domdocument.loadhtml.php * @param string $source* The HTML string. *
- * @param string $options [optional]- * Since PHP 5.4.0 and Libxml 2.6.0, you may also + * @param int $options [optional]
+ * Since PHP 5.4.0 and Libxml 2.6.0, you may also * use the options parameter to specify additional Libxml parameters. *
- * @return bool true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. If called statically, returns a * DOMDocument and issues E_STRICT * warning. - * @since 5.0 */ - public function loadHTML ($source, $options = 0) {} + public function loadHTML( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0 + ) {} /** * Load HTML from a file - * @link https://php.net/manual/domdocument.loadhtmlfile.php + * @link https://php.net/manual/en/domdocument.loadhtmlfile.php * @param string $filename* The path to the HTML file. *
- * @param string $options [optional]- * Since PHP 5.4.0 and Libxml 2.6.0, you may also + * @param int $options [optional]
+ * Since PHP 5.4.0 and Libxml 2.6.0, you may also * use the options parameter to specify additional Libxml parameters. *
- * @return bool true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. If called statically, returns a * DOMDocument and issues E_STRICT * warning. - * @since 5.0 */ - public function loadHTMLFile ($filename, $options = 0) {} + public function loadHTMLFile( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0 + ) {} /** * Dumps the internal document into a string using HTML formatting - * @link https://php.net/manual/domdocument.savehtml.php - * @param DOMNode $node [optional] parameter to output a subset of the document. - * @return string the HTML, or false if an error occurred. - * @since 5.0 + * @link https://php.net/manual/en/domdocument.savehtml.php + * @param null|DOMNode $node [optional] parameter to output a subset of the document. + * @return string|false The HTML, or false if an error occurred. */ - public function saveHTML (DOMNode $node = NULL) {} + public function saveHTML(DOMNode $node = null) {} /** * Dumps the internal document into a file using HTML formatting - * @link https://php.net/manual/domdocument.savehtmlfile.php + * @link https://php.net/manual/en/domdocument.savehtmlfile.php * @param string $filename* The path to the saved HTML document. *
- * @return int the number of bytes written or false if an error occurred. - * @since 5.0 + * @return int|false the number of bytes written or false if an error occurred. */ - public function saveHTMLFile ($filename) {} + #[TentativeType] + public function saveHTMLFile(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): int|false {} /** * Validates a document based on a schema - * @link https://php.net/manual/domdocument.schemavalidate.php + * @link https://php.net/manual/en/domdocument.schemavalidate.php * @param string $filename* The path to the schema. *
- * @param int $options [optional]- * Bitwise OR - * of the libxml option constants. - *
+ * @param int $options [optional]+ * Bitwise OR + * of the libxml option constants. + *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function schemaValidate ($filename, $options = null) {} + public function schemaValidate($filename, $options = null) {} /** * Validates a document based on a schema - * @link https://php.net/manual/domdocument.schemavalidatesource.php + * @link https://php.net/manual/en/domdocument.schemavalidatesource.php * @param string $source* A string containing the schema. *
* @param int $flags [optional]A bitmask of Libxml schema validation flags. Currently the only supported value is LIBXML_SCHEMA_CREATE. * Available since PHP 5.5.2 and Libxml 2.6.14.
* @return bool true on success or false on failure. - * @since 5.0 */ - public function schemaValidateSource ($source, $flags) {} + public function schemaValidateSource($source, $flags) {} /** * Performs relaxNG validation on the document - * @link https://php.net/manual/domdocument.relaxngvalidate.php + * @link https://php.net/manual/en/domdocument.relaxngvalidate.php * @param string $filename* The RNG file. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function relaxNGValidate ($filename) {} + #[TentativeType] + public function relaxNGValidate(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename): bool {} /** * Performs relaxNG validation on the document - * @link https://php.net/manual/domdocument.relaxngvalidatesource.php + * @link https://php.net/manual/en/domdocument.relaxngvalidatesource.php * @param string $source* A string containing the RNG schema. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function relaxNGValidateSource ($source) {} + #[TentativeType] + public function relaxNGValidateSource(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source): bool {} /** * Register extended class used to create base node type - * @link https://php.net/manual/domdocument.registernodeclass.php - * @param string $baseclass+ * @link https://php.net/manual/en/domdocument.registernodeclass.php + * @param string $baseClass
* The DOM class that you want to extend. You can find a list of these * classes in the chapter introduction. *
- * @param string $extendedclass- * Your extended class name. If &null; is provided, any previously + * @param string $extendedClass
+ * Your extended class name. If null is provided, any previously * registered class extending baseclass will * be removed. *
* @return bool true on success or false on failure. - * @since 5.2 */ - public function registerNodeClass ($baseclass, $extendedclass) {} - + #[TentativeType] + public function registerNodeClass( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $baseClass, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extendedClass + ): bool {} } /** * The DOMNodeList class * @link https://php.net/manual/en/class.domnodelist.php */ -class DOMNodeList implements Traversable, Countable { - +class DOMNodeList implements IteratorAggregate, Countable +{ /** * @var int - * @since 5.0 * The number of nodes in the list. The range of valid child node indices is 0 to length - 1 inclusive. * @link https://php.net/manual/en/class.domnodelist.php#domnodelist.props.length */ + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] + #[Immutable] public $length; - /** - * Retrieves a node specified by index - * @link https://php.net/manual/en/domnodelist.item.php - * @param int $index- * Index of the node into the collection. - * The range of valid child node indices is 0 to length - 1 inclusive. - *
- * @return DOMNode|null The node at the indexth position in the - * DOMNodeList, or &null; if that is not a valid - * index. - * @since 5.0 - */ - public function item ($index) {} + /** + * Retrieves a node specified by index + * @link https://php.net/manual/en/domnodelist.item.php + * @param int $index+ * Index of the node into the collection. + * The range of valid child node indices is 0 to length - 1 inclusive. + *
+ * @return DOMNode|null The node at the indexth position in the + * DOMNodeList, or null if that is not a valid + * index. + */ + public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {} /** + * @return int<0, max> * @since 7.2 */ - public function count() {} + #[TentativeType] + public function count(): int {} + /** + * @return Iterator + * @since 8.0 + */ + public function getIterator(): Iterator {} } /** * The DOMNamedNodeMap class * @link https://php.net/manual/en/class.domnamednodemap.php - * @property-read $length The number of nodes in the map. The range of valid child node indices is 0 to length - 1 inclusive. + * @property-read int $length The number of nodes in the map. The range of valid child node indices is 0 to length - 1 inclusive. */ -class DOMNamedNodeMap implements Traversable, Countable { - +class DOMNamedNodeMap implements IteratorAggregate, Countable +{ /** * Retrieves a node specified by name * @link https://php.net/manual/en/domnamednodemap.getnameditem.php - * @param string $name+ * @param string $qualifiedName
* The nodeName of the node to retrieve. *
* @return DOMNode|null A node (of any type) with the specified nodeName, or - * &null; if no node is found. - * @since 5.0 + * null if no node is found. */ - public function getNamedItem ($name) {} + #[TentativeType] + public function getNamedItem(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): ?DOMNode {} /** * @param DOMNode $arg */ - public function setNamedItem (DOMNode $arg) {} + public function setNamedItem(DOMNode $arg) {} /** * @param $name [optional] */ - public function removeNamedItem ($name) {} + public function removeNamedItem($name) {} /** * Retrieves a node specified by index @@ -1197,44 +1334,59 @@ public function removeNamedItem ($name) {} * @param int $index* Index into this map. *
- * @return DOMNode|null The node at the indexth position in the map, or &null; + * @return DOMNode|null The node at the indexth position in the map, or null * if that is not a valid index (greater than or equal to the number of nodes * in this map). - * @since 5.0 */ - public function item ($index) {} + #[TentativeType] + public function item( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] $index = 0, + #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index + ): ?DOMNode {} /** * Retrieves a node specified by local name and namespace URI * @link https://php.net/manual/en/domnamednodemap.getnameditemns.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI of the node to retrieve. *
* @param string $localName* The local name of the node to retrieve. *
* @return DOMNode|null A node (of any type) with the specified local name and namespace URI, or - * &null; if no node is found. - * @since 5.0 + * null if no node is found. */ - public function getNamedItemNS ($namespaceURI, $localName) {} + #[TentativeType] + public function getNamedItemNS( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $namespaceURI = '', + #[PhpStormStubsElementAvailable(from: '8.0')] ?string $namespace, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $localName = '', + #[PhpStormStubsElementAvailable(from: '8.0')] string $localName + ): ?DOMNode {} /** * @param DOMNode $arg [optional] */ - public function setNamedItemNS (DOMNode $arg) {} + public function setNamedItemNS(DOMNode $arg) {} /** - * @param $namespaceURI [optional] + * @param $namespace [optional] * @param $localName [optional] */ - public function removeNamedItemNS ($namespaceURI, $localName) {} + public function removeNamedItemNS($namespace, $localName) {} /** + * @return int<0,max> * @since 7.2 */ - public function count() {} + #[TentativeType] + public function count(): int {} + /** + * @return Iterator + * @since 8.0 + */ + public function getIterator(): Iterator {} } /** @@ -1242,25 +1394,30 @@ public function count() {} * No nodes directly correspond to this class, but other nodes do inherit from it. * @link https://php.net/manual/en/class.domcharacterdata.php */ -class DOMCharacterData extends DOMNode { - - +class DOMCharacterData extends DOMNode implements DOMChildNode +{ /** * @var string - * @since 5.0 * The contents of the node. * @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.data */ + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] public $data; /** * @var int - * @since 5.0 * The length of the contents. * @link https://php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.length */ + #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] public $length; + #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')] + public $nextElementSibling; + + #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')] + public $previousElementSibling; + /** * Extracts a range of data from the node * @link https://php.net/manual/en/domcharacterdata.substringdata.php @@ -1273,9 +1430,11 @@ class DOMCharacterData extends DOMNode { * @return string The specified substring. If the sum of offset * and count exceeds the length, then all 16-bit units * to the end of the data are returned. - * @since 5.0 */ - public function substringData ($offset, $count) {} + public function substringData( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count + ) {} /** * Append the string to the end of the character data of the node @@ -1284,9 +1443,9 @@ public function substringData ($offset, $count) {} * The string to append. * * @return void - * @since 5.0 */ - public function appendData ($data) {} + #[TentativeType] + public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {} /** * Insert a string at the specified 16-bit unit offset @@ -1297,10 +1456,13 @@ public function appendData ($data) {} * @param string $data* The string to insert. *
- * @return void - * @since 5.0 + * @return bool */ - public function insertData ($offset, $data) {} + #[TentativeType] + public function insertData( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data + ): bool {} /** * Remove a range of characters from the node @@ -1314,9 +1476,12 @@ public function insertData ($offset, $data) {} * the length, then all characters to the end of the data are deleted. * * @return void - * @since 5.0 */ - public function deleteData ($offset, $count) {} + #[TentativeType] + public function deleteData( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count + ): bool {} /** * Replace a substring within the DOMCharacterData node @@ -1332,11 +1497,34 @@ public function deleteData ($offset, $count) {} * @param string $data* The string with which the range must be replaced. *
- * @return void - * @since 5.0 + * @return bool */ - public function replaceData ($offset, $count, $data) {} + #[TentativeType] + public function replaceData( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $count, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data + ): bool {} + /** + * {@inheritDoc} + */ + public function remove(): void {} + + /** + * {@inheritDoc} + */ + public function before(...$nodes): void {} + + /** + * {@inheritDoc} + */ + public function after(...$nodes): void {} + + /** + * {@inheritDoc} + */ + public function replaceWith(...$nodes): void {} } /** @@ -1345,13 +1533,13 @@ public function replaceData ($offset, $count, $data) {} */ class DOMAttr extends DOMNode { - /** * @var string * (PHP5)The tag name of the attribute.
+ * @param string $value [optional]The value of the attribute.
+ * @throws DOMException If invalid $name + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = '' + ) {} } /** * The DOMElement class * @link https://php.net/manual/en/class.domelement.php */ -class DOMElement extends DOMNode { - - +class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode +{ /** - * @var DOMElement|null - * @since 5.0 + * @var DOMNode|null * The parent of this node. If there is no such node, this returns NULL. * @link https://php.net/manual/en/class.domnode.php#domnode.props.parentnode */ public $parentNode; /** - * @var DOMElement|null - * @since 5.0 + * @var DOMNode|null * The first child of this node. If there is no such node, this returns NULL. * @link https://php.net/manual/en/class.domnode.php#domnode.props.firstchild */ public $firstChild; /** - * @var DOMElement|null - * @since 5.0 + * @var DOMNode|null * The last child of this node. If there is no such node, this returns NULL. * @link https://php.net/manual/en/class.domnode.php#domnode.props.lastchild */ public $lastChild; /** - * @var DOMElement|null - * @since 5.0 + * @var DOMNode|null * The node immediately preceding this node. If there is no such node, this returns NULL. * @link https://php.net/manual/en/class.domnode.php#domnode.props.previoussibling */ public $previousSibling; /** - * @var DOMElement|null - * @since 5.0 + * @var DOMNode|null * The node immediately following this node. If there is no such node, this returns NULL. * @link https://php.net/manual/en/class.domnode.php#domnode.props.nextsibling */ public $nextSibling; + /** + * @var DOMNamedNodeMap + * A+ * @param string $qualifiedName
* The name of the attribute. *
* @return string The value of the attribute, or an empty string if no attribute with the * given name is found. - * @since 5.0 */ - public function getAttribute ($name) {} + #[TentativeType] + public function getAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): string {} /** * Adds new attribute * @link https://php.net/manual/en/domelement.setattribute.php - * @param string $name+ * @param string $qualifiedName
* The name of the attribute. *
* @param string $value* The value of the attribute. *
- * @return DOMAttr The new DOMAttr or false if an error occured. - * @since 5.0 + * @return DOMAttr|false The new DOMAttr or false if an error occurred. */ - public function setAttribute ($name, $value) {} + public function setAttribute( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value + ) {} /** * Removes attribute * @link https://php.net/manual/en/domelement.removeattribute.php - * @param string $name+ * @param string $qualifiedName
* The name of the attribute. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function removeAttribute ($name) {} + #[TentativeType] + public function removeAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {} /** * Returns attribute node * @link https://php.net/manual/en/domelement.getattributenode.php - * @param string $name+ * @param string $qualifiedName
* The name of the attribute. *
* @return DOMAttr The attribute node. - * @since 5.0 */ - public function getAttributeNode ($name) {} + public function getAttributeNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {} /** * Adds new attribute node to element @@ -1521,39 +1734,37 @@ public function getAttributeNode ($name) {} * @param DOMAttr $attr* The attribute node. *
- * @return DOMAttr|null Old node if the attribute has been replaced or &null;. - * @since 5.0 + * @return DOMAttr|null Old node if the attribute has been replaced or null. */ - public function setAttributeNode (DOMAttr $attr) {} + public function setAttributeNode(DOMAttr $attr) {} /** * Removes attribute * @link https://php.net/manual/en/domelement.removeattributenode.php - * @param DOMAttr $oldnode+ * @param DOMAttr $attr
* The attribute node. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function removeAttributeNode (DOMAttr $oldnode) {} + public function removeAttributeNode(DOMAttr $attr) {} /** * Gets elements by tagname * @link https://php.net/manual/en/domelement.getelementsbytagname.php - * @param string $name+ * @param string $qualifiedName
* The tag name. Use * to return all elements within * the element tree. *
* @return DOMNodeList This function returns a new instance of the class * DOMNodeList of all matched elements. - * @since 5.0 */ - public function getElementsByTagName ($name) {} + #[TentativeType] + public function getElementsByTagName(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): DOMNodeList {} /** * Returns value of attribute * @link https://php.net/manual/en/domelement.getattributens.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI. *
* @param string $localName@@ -1562,14 +1773,17 @@ public function getElementsByTagName ($name) {} * @return string The value of the attribute, or an empty string if no attribute with the * given localName and namespaceURI * is found. - * @since 5.0 */ - public function getAttributeNS ($namespaceURI, $localName) {} + #[TentativeType] + public function getAttributeNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName + ): string {} /** * Adds new attribute * @link https://php.net/manual/en/domelement.setattributens.php - * @param string $namespaceURI
+ * @param string $namespace
* The namespace URI. *
* @param string $qualifiedName@@ -1579,51 +1793,59 @@ public function getAttributeNS ($namespaceURI, $localName) {} * The value of the attribute. *
* @return void - * @since 5.0 */ - public function setAttributeNS ($namespaceURI, $qualifiedName, $value) {} + #[TentativeType] + public function setAttributeNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value + ): void {} /** * Removes attribute * @link https://php.net/manual/en/domelement.removeattributens.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI. *
* @param string $localName* The local name. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function removeAttributeNS ($namespaceURI, $localName) {} + #[TentativeType] + public function removeAttributeNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName + ): void {} /** * Returns attribute node * @link https://php.net/manual/en/domelement.getattributenodens.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI. *
* @param string $localName* The local name. *
* @return DOMAttr The attribute node. - * @since 5.0 */ - public function getAttributeNodeNS ($namespaceURI, $localName) {} + public function getAttributeNodeNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName + ) {} /** * Adds new attribute node to element * @link https://php.net/manual/en/domelement.setattributenodens.php * @param DOMAttr $attr * @return DOMAttr the old node if the attribute has been replaced. - * @since 5.0 */ - public function setAttributeNodeNS (DOMAttr $attr) {} + public function setAttributeNodeNS(DOMAttr $attr) {} /** * Get elements by namespaceURI and localName * @link https://php.net/manual/en/domelement.getelementsbytagnamens.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI. *
* @param string $localName@@ -1633,39 +1855,45 @@ public function setAttributeNodeNS (DOMAttr $attr) {} * @return DOMNodeList This function returns a new instance of the class * DOMNodeList of all matched elements in the order in * which they are encountered in a preorder traversal of this element tree. - * @since 5.0 */ - public function getElementsByTagNameNS ($namespaceURI, $localName) {} + #[TentativeType] + public function getElementsByTagNameNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName + ): DOMNodeList {} /** * Checks to see if attribute exists * @link https://php.net/manual/en/domelement.hasattribute.php - * @param string $name
+ * @param string $qualifiedName
* The attribute name. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function hasAttribute ($name) {} + #[TentativeType] + public function hasAttribute(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName): bool {} /** * Checks to see if attribute exists * @link https://php.net/manual/en/domelement.hasattributens.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI. *
* @param string $localName* The local name. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function hasAttributeNS ($namespaceURI, $localName) {} + #[TentativeType] + public function hasAttributeNS( + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName + ): bool {} /** * Declares the attribute specified by name to be of type ID * @link https://php.net/manual/en/domelement.setidattribute.php - * @param string $name+ * @param string $qualifiedName
* The name of the attribute. *
* @param bool $isId@@ -1673,17 +1901,20 @@ public function hasAttributeNS ($namespaceURI, $localName) {} * ID, false otherwise. *
* @return void - * @since 5.0 */ - public function setIdAttribute ($name, $isId) {} + #[TentativeType] + public function setIdAttribute( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId + ): void {} /** * Declares the attribute specified by local name and namespace URI to be of type ID * @link https://php.net/manual/en/domelement.setidattributens.php - * @param string $namespaceURI+ * @param string $namespace
* The namespace URI of the attribute. *
- * @param string $localName+ * @param string $qualifiedName
* The local name of the attribute, as prefix:tagname. *
* @param bool $isId@@ -1691,9 +1922,13 @@ public function setIdAttribute ($name, $isId) {} * ID, false otherwise. *
* @return void - * @since 5.0 */ - public function setIdAttributeNS ($namespaceURI, $localName, $isId) {} + #[TentativeType] + public function setIdAttributeNS( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId + ): void {} /** * Declares the attribute specified by node to be of type ID @@ -1706,62 +1941,53 @@ public function setIdAttributeNS ($namespaceURI, $localName, $isId) {} * ID, false otherwise. * * @return void - * @since 5.0 */ - public function setIdAttributeNode (DOMAttr $attr, $isId) {} + #[TentativeType] + public function setIdAttributeNode(DOMAttr $attr, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $isId): void {} /** - * Creates a new DOMElement object - * @link https://php.net/manual/en/domelement.construct.php - * @param string $name The tag name of the element. When also passing in namespaceURI, the element name may take a prefix to be associated with the URI. - * @param string|null $value [optional] The value of the element. - * @param string|null $uri [optional] A namespace URI to create the element within a specific namespace. - * @since 5.0 + * {@inheritDoc} */ - public function __construct ($name, $value = null, $uri = null) {} + public function remove(): void {} /** - * Adds a new child before a reference node - * @link https://php.net/manual/en/domnode.insertbefore.php - * @param DOMNode $newnode- * The new node. - *
- * @param DOMNode $refnode [optional]- * The reference node. If not supplied, newnode is - * appended to the children. - *
- * @return DOMNode The inserted node. - * @since 5.0 + * {@inheritDoc} */ - public function insertBefore (DOMNode $newnode , $refnode = null) {} + public function before(...$nodes): void {} /** - * Replaces a child - * @link https://php.net/manual/en/domnode.replacechild.php - * @param DOMNode $newnode- * The new node. It must be a member of the target document, i.e. - * created by one of the DOMDocument->createXXX() methods or imported in - * the document by . - *
- * @param DOMNode $oldnode- * The old node. - *
- * @return DOMNode The old node or false if an error occur. - * @since 5.0 + * {@inheritDoc} */ - public function replaceChild (DOMNode $newnode , DOMNode $oldnode ) {} + public function after(...$nodes): void {} /** - * Removes child from list of children - * @link https://php.net/manual/en/domnode.removechild.php - * @param DOMNode $oldnode- * The removed child. - *
- * @return DOMNode If the child could be removed the functions returns the old child. - * @since 5.0 + * {@inheritDoc} + */ + public function replaceWith(...$nodes): void {} + + /** + * {@inheritDoc} */ - public function removeChild (DOMNode $oldnode ) {} + public function append(...$nodes): void {} + /** + * {@inheritDoc} + */ + public function prepend(...$nodes): void {} + + /** + * Creates a new DOMElement object + * @link https://php.net/manual/en/domelement.construct.php + * @param string $qualifiedName The tag name of the element. When also passing in namespaceURI, the element name may take a prefix to be associated with the URI. + * @param string|null $value [optional] The value of the element. + * @param string $namespace [optional] A namespace URI to create the element within a specific namespace. + * @throws DOMException If invalid $qualifiedName + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace = null + ) {} } /** @@ -1769,13 +1995,13 @@ public function removeChild (DOMNode $oldnode ) {} * a* The prefix. *
- * @param string $namespaceURI+ * @param string $namespace
* The URI of the namespace. *
* @return bool true on success or false on failure. - * @since 5.0 */ - public function registerNamespace ($prefix, $namespaceURI) {} + #[TentativeType] + public function registerNamespace( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $prefix, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace + ): bool {} /** * Evaluates the given XPath expression @@ -2137,7 +2367,7 @@ public function registerNamespace ($prefix, $namespaceURI) {} * @param string $expression* The XPath expression to execute. *
- * @param DOMNode $contextnode [optional]+ * @param DOMNode $contextNode [optional]
* The optional contextnode can be specified for * doing relative XPath queries. By default, the queries are relative to * the root element. @@ -2148,9 +2378,13 @@ public function registerNamespace ($prefix, $namespaceURI) {} * the given XPath expression. Any expression which does not return nodes * will return an empty DOMNodeList. The return is false if the expression * is malformed or the contextnode is invalid. - * @since 5.0 */ - public function query ($expression, $contextnode = null, $registerNodeNS = true) {} + #[TentativeType] + public function query( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] #[Language('XPath')] $expression, + #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true + ): mixed {} /** * Evaluates the given XPath expression and returns a typed result if possible. @@ -2158,7 +2392,7 @@ public function query ($expression, $contextnode = null, $registerNodeNS = true) * @param string $expression
* The XPath expression to execute. *
- * @param DOMNode $contextnode [optional]+ * @param DOMNode $contextNode [optional]
* The optional contextnode can be specified for * doing relative XPath queries. By default, the queries are relative to * the root element. @@ -2169,14 +2403,18 @@ public function query ($expression, $contextnode = null, $registerNodeNS = true) *
* @return mixed a typed result if possible or a DOMNodeList * containing all nodes matching the given XPath expression. - * @since 5.1 */ - public function evaluate ($expression, $contextnode = null, $registerNodeNS = true) {} + #[TentativeType] + public function evaluate( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] #[Language('XPath')] $expression, + #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $contextNode = null, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $registerNodeNS = true + ): mixed {} /** * Register PHP functions as XPath functions * @link https://php.net/manual/en/domxpath.registerphpfunctions.php - * @param mixed $restrict [optional]+ * @param string|string[] $restrict [optional]
* Use this parameter to only allow certain functions to be called from XPath. *
*@@ -2184,8 +2422,81 @@ public function evaluate ($expression, $contextnode = null, $registerNodeNS = tr * an array of function names. *
* @return void - * @since 5.3 */ - public function registerPhpFunctions ($restrict = null) {} + public function registerPhpFunctions($restrict = null) {} +} + +/** + * @property-read DOMElement|null $firstElementChild + * @property-read DOMElement|null $lastElementChild + * @property-read int $childElementCount + * + * @since 8.0 + */ +interface DOMParentNode +{ + /** + * Appends one or many nodes to the list of children behind the last + * child node. + * + * @param DOMNode|string|null ...$nodes + * @return void + * @since 8.0 + */ + public function append(...$nodes): void; + + /** + * Prepends one or many nodes to the list of children before the first + * child node. + * + * @param DOMNode|string|null ...$nodes + * @return void + * @since 8.0 + */ + public function prepend(...$nodes): void; +} + +/** + * @property-read DOMElement|null $previousElementSibling + * @property-read DOMElement|null $nextElementSibling + * + * @since 8.0 + */ +interface DOMChildNode +{ + /** + * Acts as a simpler version of {@see DOMNode::removeChild()}. + * + * @return void + * @since 8.0 + */ + public function remove(): void; + /** + * Add passed node(s) before the current node + * + * @param DOMNode|string|null ...$nodes + * @return void + * @since 8.0 + */ + public function before(...$nodes): void; + + /** + * Add passed node(s) after the current node + * + * @param DOMNode|string|null ...$nodes + * @return void + * @since 8.0 + */ + public function after(...$nodes): void; + + /** + * Replace current node with new node(s), a combination + * of {@see DOMChildNode::remove()} + {@see DOMChildNode::append()}. + * + * @param DOMNode|string|null ...$nodes + * @return void + * @since 8.0 + */ + public function replaceWith(...$nodes): void; } diff --git a/ds/ds.php b/ds/ds.php new file mode 100644 index 000000000..da2215bc1 --- /dev/null +++ b/ds/ds.php @@ -0,0 +1,2714 @@ + + * @copyright © 2019 PHP Documentation Group + * @license CC-BY 3.0, https://www.php.net/manual/en/cc.license.php + */ + +namespace Ds; + + use ArrayAccess; + use Countable; + use IteratorAggregate; + use JsonSerializable; + use OutOfBoundsException; + use OutOfRangeException; + use Traversable; + use UnderflowException; + + /** + * Collection is the base interface which covers functionality common to all + * the data structures in this library. It guarantees that all structures + * are traversable, countable, and can be converted to json using + * json_encode(). + * @package Ds + * + * @template-covariant TKey + * @template-covariant TValue + * @extends IteratorAggregateNote: Casting to an array is not supported yet.
+ * @link https://www.php.net/manual/en/ds-collection.toarray.php + * @return arrayNote: Capacity will stay the same if this value is + * less than or equal to the current capacity.
+ * @link https://www.php.net/manual/en/ds-sequence.allocate.php + */ + public function allocate(int $capacity): void; + + /** + * Updates all values by applying a callback function to each value in + * the sequence. + * @param callable(TValue): TValue $callback A callable to apply to each value in the + * sequence. The callback should return what the value should be + * replaced by. + *callback ( mixed $value ) : mixed
+ * @link https://www.php.net/manual/en/ds-sequence.apply.php
+ */
+ public function apply(callable $callback): void;
+
+ /**
+ * Returns the current capacity.
+ * @return int The current capacity.
+ * @link https://www.php.net/manual/en/ds-sequence.capacity.php
+ */
+ public function capacity(): int;
+
+ /**
+ * Determines if the sequence contains all values.
+ * @param TValue ...$values Values to check.
+ * @return bool FALSE if any of the provided values are not in the
+ * sequence, TRUE otherwise.
+ * @link https://www.php.net/manual/en/ds-sequence.contains.php
+ */
+ public function contains(...$values): bool;
+
+ /**
+ * Creates a new sequence using a callable to determine which values
+ * to include.
+ * @param null|callable(TValue): bool $callback Optional callable which returns TRUE if the
+ * value should be included, FALSE otherwise. If a callback is not
+ * provided, only values which are TRUE (see converting to boolean) will
+ * be included.
+ * callback ( mixed $value ) : bool
+ * @return SequenceNote: You can insert at the index equal to the number of values.
+ * @param TValue ...$values The value or values to insert. + * @throws OutOfRangeException if the index is not valid. + * @link https://www.php.net/manual/en/ds-sequence.insert.php + */ + public function insert(int $index, ...$values): void; + + /** + * Joins all values together as a string using an optional separator + * between each value. + * @param string $glue An optional string to separate each value. + * @return string All values of the sequence joined together as a + * string. + * @link https://www.php.net/manual/en/ds-sequence.join.php + */ + public function join(string $glue = ''): string; + + /** + * Returns the last value in the sequence. + * @return TValue The last value in the sequence. + * @throws UnderflowException if empty. + * @link https://www.php.net/manual/en/ds-sequence.last.php + */ + public function last(); + + /** + * Returns the result of applying a callback function to each value in + * the sequence. + * @template TNewValue + * @param callable(TValue): TNewValue $callback A callable to apply to each value in the + * sequence. + * The callable should return what the new value will be in the new + * sequence. + *callback ( mixed $value ) : mixed
+ * @return SequenceNote: The values of the current instance won't be + * affected.
+ * @link https://www.php.net/manual/en/ds-sequence.map.php + */ + public function map(callable $callback): Sequence; + + /** + * Returns the result of adding all given values to the sequence. + * @template TValue2 + * @param iterable
+ *
+ * callback ( mixed $carry , mixed $value ) : mixed
+ * $carry The return value of the previous callback, or initial if it's
+ * the first iteration.
+ * $value The value of the current iteration.
+ *
Note: The current instance is not affected.
+ */ + public function reversed(); + + /** + * Rotates the sequence by a given number of rotations, which is + * equivalent to successively calling + * $sequence->push($sequence->shift()) if the number of rotations is + * positive, or $sequence->unshift($sequence->pop()) if negative. + * @param int $rotations The number of times the sequence should be + * rotated. + * @link https://www.php.net/manual/en/ds-sequence.rotate.php + */ + public function rotate(int $rotations): void; + + /** + * Updates a value at a given index. + * @param int $index The index of the value to update. + * @param TValue $value The new value. + * @throws OutOfRangeException if the index is not valid. + * @link https://www.php.net/manual/en/ds-sequence.set.php + */ + public function set(int $index, $value): void; + + /** + * Removes and returns the first value. + * @return TValue + * @throws UnderflowException if empty. + * @link https://www.php.net/manual/en/ds-sequence.shift.php + */ + public function shift(); + + /** + * Creates a sub-sequence of a given range. + * @param int $index The index at which the sub-sequence starts. + * If positive, the sequence will start at that index in the sequence. + * If negative, the sequence will start that far from the end. + * @param int|null $length If a length is given and is positive, the + * resulting sequence will have up to that many values in it. If the + * length results in an overflow, only values up to the end of the + * sequence will be included. If a length is given and is negative, + * the sequence will stop that many values from the end. If a length + * is not provided, the resulting sequence will contain all values + * between the index and the end of the sequence. + * @return Sequence
+ * callback ( mixed $a, mixed $b ) : int
Caution: Returning non-integer values from the comparison + * function, such as float, will result in an internal cast to integer + * of the callback's return value. So values such as 0.99 and 0.1 will + * both be cast to an integer value of 0, which will compare such + * values as equal.
+ * @link https://www.php.net/manual/en/ds-sequence.sort.php + */ + public function sort(?callable $comparator = null): void; + + /** + * Returns a sorted copy, using an optional comparator function. + * @param callable(TValue, TValue): int|null $comparator The comparison function must return + * an integer less than, equal to, or greater than zero if the first + * argument is considered to be respectively less than, equal to, or + * greater than the second. Note that before PHP 7.0.0 this integer had + * to be in the range from -2147483648 to 2147483647.
+ * callback ( mixed $a, mixed $b ) : int
Caution: Returning non-integer values from the comparison + * function, such as float, will result in an internal cast to integer + * of the callback's return value. So values such as 0.99 and 0.1 will + * both be cast to an integer value of 0, which will compare such + * values as equal.
+ * @return SequenceNote: Arrays and objects are considered equal to zero when + * calculating the sum.
+ * @return float|int The sum of all the values in the sequence as + * either a float or int depending on the values in the sequence. + */ + public function sum(): float|int; + + /** + * Adds values to the front of the sequence, moving all the current + * values forward to make room for the new values. + * @param TValue ...$values The values to add to the front of the sequence. + *Note: Multiple values will be added in the same order that they + * are passed.
+ */ + public function unshift(...$values): void; + } + + /** + * A Vector is a sequence of values in a contiguous buffer that grows and + * shrinks automatically. It’s the most efficient sequential structure + * because a value’s index is a direct mapping to its index in the buffer, + * and the growth factor isn't bound to a specific multiple or exponent. + *+ *
Note: Capacity will stay the same if this value is less than or + * equal to the current capacity.
+ * @link https://www.php.net/manual/en/ds-vector.allocate.php + */ + public function allocate(int $capacity): void {} + + /** + * Updates all values by applying a callback function to each value in + * the vector. + * @param callable(TValue): TValue $callback + *callback ( mixed $value ) : mixed
+ * A callable to apply to each value in the vector. The callback should
+ * return what the value should be replaced by.
+ * @link https://www.php.net/manual/en/ds-vector.apply.php
+ */
+ public function apply(callable $callback): void {}
+
+ /**
+ * Returns the current capacity.
+ * @return int The current capacity.
+ * @link https://www.php.net/manual/en/ds-vector.capacity.php
+ */
+ public function capacity(): int {}
+
+ /**
+ * Removes all values from the vector.
+ * @link https://www.php.net/manual/en/ds-vector.clear.php
+ */
+ public function clear(): void {}
+
+ /**
+ * Determines if the vector contains all values.
+ * @param TValue ...$values Values to check.
+ * @return bool FALSE if any of the provided values are not in the
+ * vector, TRUE otherwise.
+ * @link https://www.php.net/manual/en/ds-vector.contains.php
+ */
+ public function contains(...$values): bool {}
+
+ /**
+ *Returns a shallow copy of the vector.
+ * @return Vectorcallback ( mixed $value ) : bool
+ * @return VectorNote: Values will be compared by value and by type.
+ * @link https://www.php.net/manual/en/ds-vector.find.php + */ + public function find($value) {} + + /** + * Returns the first value in the vector. + * @return TValue + * @throws UnderflowException if empty. + * @link https://www.php.net/manual/en/ds-vector.first.php + */ + public function first() {} + + /** + * Returns the value at a given index. + * @param int $index The index to access, starting at 0. + * @return TValue + * @link https://www.php.net/manual/en/ds-vector.get.php + */ + public function get(int $index) {} + + public function getIterator(): Traversable {} + + /** + * Inserts values into the sequence at a given index. + * + * @param int $index The index at which to insert. 0 <= index <= count + * Note:callback ( mixed $carry , mixed $value ) : mixed
callback ( mixed $a, mixed $b ) : int
+ * Caution: Returning non-integer values from the comparison function,
+ * such as float, will result in an
+ * internal cast to integer of the callback's return value. So values
+ * such as 0.99 and 0.1 will both be cast to an integer value of 0,
+ * which will compare such values as equal.
+ */
+ public function sort(?callable $comparator = null): void {}
+
+ /**
+ * Returns a sorted copy, using an optional comparator function.
+ * @link https://www.php.net/manual/en/ds-vector.sorted.php
+ * @param callable(TValue, TValue): int|null $comparator The comparison function must return an integer less than, equal to, or
+ * greater than zero if the first argument is considered to be respectively less than, equal to, or greater
+ * than the second. Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to
+ * 2147483647.callback ( mixed $a, mixed $b ) : int
+ * Caution: Returning non-integer values from the comparison function, such as float, will result in an
+ * internal cast to integer of the callback's return value. So values such as 0.99 and 0.1 will both be cast to
+ * an integer value of 0, which will compare such values as equal.
+ * @return Vector+ * The return value is cast to an integer. + *
+ * @since 5.1 + */ + public function count(): int {} + + /** + * Returns whether the collection is empty. + * @link https://www.php.net/manual/en/ds-vector.isempty.php + * @return bool + */ + public function isEmpty(): bool {} + + /** + * Converts the collection to an array. + *Note: Casting to an array is not supported yet.
+ * @link https://www.php.net/manual/en/ds-vector.toarray.php + * @return array+ * The return value is cast to an integer. + *
+ * @since 5.1 + */ + public function count(): int {} + + /** + * Removes all values from the deque. + * @link https://www.php.net/manual/en/ds-deque.clear.php + */ + public function clear(): void {} + + /** + * Returns a shallow copy of the deque. + * @link https://www.php.net/manual/en/ds-deque.copy.php + * @return DequeNote: Casting to an array is not supported yet.
+ * @link https://www.php.net/manual/en/ds-deque.toarray.php + * @return arrayNote: Capacity will stay the same if this value is + * less than or equal to the current capacity.
+ *Note: Capacity will always be rounded up to the nearest power of 2.
+ * @link https://www.php.net/manual/en/ds-deque.allocate.php + */ + public function allocate(int $capacity): void {} + + /** + * Updates all values by applying a callback function to each value in + * the deque. + * @param callable(TValue): TValue $callback A callable to apply to each value in the + * deque. The callback should return what the value should be + * replaced by.
+ * callback ( mixed $value ) : mixed
+ *
+ * callback ( mixed $value ) : bool
+ *
Note: You can insert at the index equal to the number of values.
+ * @param TValue ...$values The value or values to insert. + * @throws OutOfRangeException if the index is not valid. + * @link https://www.php.net/manual/en/ds-deque.insert.php + */ + public function insert(int $index, ...$values): void {} + + /** + * Joins all values together as a string using an optional separator + * between each value. + * @param string $glue An optional string to separate each value. + * @return string All values of the deque joined together as a + * string. + * @link https://www.php.net/manual/en/ds-deque.join.php + */ + public function join(string $glue = ''): string {} + + /** + * Returns the last value in the deque. + * @return TValue The last value in the deque. + * @throws UnderflowException if empty. + * @link https://www.php.net/manual/en/ds-deque.last.php + */ + public function last() {} + + /** + * Returns the result of applying a callback function to each value in + * the deque. + * + * @template TNewValue + * @param callable(TValue): TNewValue $callback A callable to apply to each value in the + * deque. + * The callable should return what the new value will be in the new + * deque. + *callback ( mixed $value ) : mixed
+ *
+ * @return DequeNote: The values of the current instance won't be + * affected.
+ * @link https://www.php.net/manual/en/ds-deque.map.php + */ + public function map(callable $callback): Deque {} + + /** + * Returns the result of adding all given values to the deque. + * @template TValue2 + * @param iterablecallback ( mixed $carry , mixed $value ) : mixed
+ * $carry The return value of the previous callback, or initial if it's
+ * the first iteration.+ * $value The value of the current iteration. + *
+ * @param TCarry $initial The initial value of the carry value. Can be NULL. + * @return TCarry The return value of the final callback. + * @link https://www.php.net/manual/en/ds-deque.reduce.php + */ + public function reduce(callable $callback, $initial = null) {} + + /** + * Removes and returns a value by index. + * @param int $index The index of the value to remove. + * @return TValue The value that was removed. + * @link https://www.php.net/manual/en/ds-deque.remove.php + */ + public function remove(int $index) {} + + /** + * Reverses the deque in-place. + * @link https://www.php.net/manual/en/ds-deque.reverse.php + */ + public function reverse(): void {} + + /** + * Returns a reversed copy of the deque. + * @return DequeNote: The current instance is not affected.
+ */ + public function reversed(): Deque {} + + /** + * Rotates the deque by a given number of rotations, which is + * equivalent to successively calling + * $deque->push($deque->shift()) if the number of rotations is + * positive, or $deque->unshift($deque->pop()) if negative. + * @param int $rotations The number of times the deque should be + * rotated. + * @link https://www.php.net/manual/en/ds-deque.rotate.php + */ + public function rotate(int $rotations): void {} + + /** + * Updates a value at a given index. + * @param int $index The index of the value to update. + * @param TValue $value The new value. + * @throws OutOfRangeException if the index is not valid. + * @link https://www.php.net/manual/en/ds-deque.set.php + */ + public function set(int $index, $value): void {} + + /** + * Removes and returns the first value. + * @return TValue + * @throws UnderflowException if empty. + * @link https://www.php.net/manual/en/ds-deque.shift.php + */ + public function shift() {} + + /** + * Creates a sub-deque of a given range. + * @param int $index The index at which the sub-deque starts. + * If positive, the deque will start at that index in the deque. + * If negative, the deque will start that far from the end. + * @param int|null $length If a length is given and is positive, the + * resulting deque will have up to that many values in it. If the + * length results in an overflow, only values up to the end of the + * deque will be included. If a length is given and is negative, + * the deque will stop that many values from the end. If a length + * is not provided, the resulting deque will contain all values + * between the index and the end of the deque. + * @return Dequecallback ( mixed $a, mixed $b ) : int
+ * Caution: Returning non-integer values from the comparison + * function, such as float, will result in an internal cast to integer + * of the callback's return value. So values such as 0.99 and 0.1 will + * both be cast to an integer value of 0, which will compare such + * values as equal.
+ * @link https://www.php.net/manual/en/ds-deque.sort.php + */ + public function sort(?callable $comparator = null): void {} + + /** + * Returns a sorted copy, using an optional comparator function. + * @param callable(TValue, TValue): int|null $comparator The comparison function must return + * an integer less than, equal to, or greater than zero if the first + * argument is considered to be respectively less than, equal to, or + * greater than the second. Note that before PHP 7.0.0 this integer had + * to be in the range from -2147483648 to 2147483647. + *callback ( mixed $a, mixed $b ) : int
+ * Caution: Returning non-integer values from the comparison + * function, such as float, will result in an internal cast to integer + * of the callback's return value. So values such as 0.99 and 0.1 will + * both be cast to an integer value of 0, which will compare such + * values as equal.
+ * @return DequeNote: Arrays and objects are considered equal to zero when + * calculating the sum.
+ * @return float|int The sum of all the values in the deque as + * either a float or int depending on the values in the deque. + */ + public function sum(): float|int {} + + /** + * Adds values to the front of the deque, moving all the current + * values forward to make room for the new values. + * @param TValue ...$values The values to add to the front of the deque. + *Note: Multiple values will be added in the same order that they + * are passed.
+ */ + public function unshift(...$values): void {} + + /** + * Specify data which should be serialized to JSON + * @link https://php.net/manual/en/ds-vector.jsonserialize.php + * @return mixed data which can be serialized by json_encode, + * which is a value of any type other than a resource. + * @since 5.4 + */ + public function jsonSerialize() {} + + /** + * @param int $offset + */ + public function offsetExists(mixed $offset): bool {} + + /** + * @param int $offset + * + * @return TValue + */ + public function offsetGet(mixed $offset) {} + + /** + * @param int $offset + * @param TValue $value + */ + public function offsetSet(mixed $offset, mixed $value) {} + + /** + * @param int $offset + */ + public function offsetUnset(mixed $offset): void {} + } + + /** + * @template TKey + * @template TValue + * @implements CollectionNote: Capacity will stay the same if this value is less than or equal to the current capacity.
+ * Capacity will always be rounded up to the nearest power of 2. + * + * @link https://www.php.net/manual/en/ds-map.allocate.php + */ + public function allocate(int $capacity) {} + + /** + * Updates all values by applying a callback function to each value in the map. + * + * @param callable(TKey, TValue): TValue $callback A callable to apply to each value in the map. The callback should return what + * the value should be replaced by. + * + * @link https://www.php.net/manual/en/ds-map.apply.php + */ + public function apply(callable $callback) {} + + /** + * Returns the current capacity. + * + * @return int + * + * @link https://www.php.net/manual/en/ds-map.capacity.php + */ + public function capacity(): int {} + + /** + * Count elements of an object + * @link https://php.net/manual/en/countable.count.php + * @return int The custom count as an integer. + * + *
+ * The return value is cast to an integer.
+ * @since 5.1
+ */
+ public function count(): int {}
+
+ /**
+ * Removes all values from the collection.
+ * @link https://www.php.net/manual/en/ds-collection.clear.php
+ */
+ public function clear(): void {}
+
+ /**
+ * Returns a shallow copy of the collection.
+ * @link https://www.php.net/manual/en/ds-collection.copy.php
+ * @return Map
+ * Note: Keys of type object are supported. If an object implements Ds\Hashable, equality will be
+ * determined by the object's equals function. If an object does not implement Ds\Hashable, objects must be references to the same instance to be considered equal.
+ *
+ * Note: You can also use array syntax to access values by key, eg. $map["key"].
+ *
+ * Caution: Be careful when using array syntax. Scalar keys will be coerced to integers by the engine. For
+ * example, $map["1"] will attempt to access int(1), while $map->get("1") will correctly look up the string key.
+ * Note: Values from the current instance will be kept. Note: Casting to an array is not supported yet. Caution: Maps where non-scalar keys are can't be converted to an
+ * array.
+ * Caution: An array will treat all numeric keys as integers, eg.
+ * "1" and 1 as keys in the map will only result in 1 being included in
+ * the array.
+ * Caution: Returning non-integer values from the comparison function, such
+ * as float, will result in an internal cast to integer of the
+ * callback's return value. So values such as 0.99 and 0.1 will both be
+ * cast to an integer value of 0, which will compare such values as
+ * equal. Caution: Returning non-integer values from the comparison function, such
+ * as float, will result in an internal cast to integer of the
+ * callback's return value. So values such as 0.99 and 0.1 will both be
+ * cast to an integer value of 0, which will compare such values as
+ * equal. Note: The current instance is not affected. Note: Values of the current instance will be overwritten by those
+ * provided where keys are equal. Note: Casting to an array is not supported yet. Note: Values of type object are supported. If an object implements
+ * Ds\Hashable, equality will be determined by the object's equals
+ * function. If an object does not implement Ds\Hashable, objects must
+ * be references to the same instance to be considered equal.
+ *
+ * Caution: All comparisons are strict (type and value).
+ *
+ * @param TValue ...$values Values to add to the set.
+ *
+ * @link https://php.net/manual/en/ds-set.add.php
+ */
+ public function add(...$values) {}
+
+ /**
+ * Allocates enough memory for a required capacity.
+ *
+ * @param int $capacity The number of values for which capacity should
+ * be allocated.
+ *
+ * Note: Capacity will stay the same if this value is less than or
+ * equal to the current capacity.
+ *
+ * Capacity will always be rounded up to the nearest power of 2.
+ *
+ * @link https://php.net/manual/en/ds-set.allocate.php
+ */
+ public function allocate(int $capacity) {}
+
+ /**
+ * Determines if the set contains all values.
+ *
+ * Values of type object are supported. If an object implements
+ * Ds\Hashable, equality will be determined by the object's equals
+ * function. If an object does not implement Ds\Hashable, objects must
+ * be references to the same instance to be considered equal.
+ *
+ * Caution: All comparisons are strict (type and value).
+ *
+ * @param TValue ...$values Values to check.
+ *
+ * @return bool
+ *
+ * @link https://php.net/manual/en/ds-set.contains.php
+ */
+ public function contains(...$values): bool {}
+
+ /**
+ * Returns the current capacity.
+ * @link https://www.php.net/manual/en/ds-set.capacity.php
+ *
+ * @return int
+ */
+ public function capacity(): int {}
+
+ /**
+ * Removes all values from the set.
+ * @link https://www.php.net/manual/en/ds-set.clear.php
+ */
+ public function clear(): void {}
+
+ /**
+ * Count elements of an object
+ * @link https://php.net/manual/en/ds-set.count.php
+ * @return int The custom count as an integer.
+ *
+ * The return value is cast to an integer.
+ * @since 5.1
+ */
+ public function count(): int {}
+
+ /**
+ * Returns a shallow copy of the set.
+ * @link https://www.php.net/manual/en/ds-set.copy.php
+ * @return Set Note: The values of the current instance won't be affected. Note: The current instance won't be affected. Note: The current instance is not affected. Caution: Returning non-integer values from the comparison
+ * function, such as float, will result in an
+ * internal cast to integer of the callback's return value. So values
+ * such as 0.99 and 0.1 will both be cast to an integer value of 0,
+ * which will compare such values as equal. Note: Arrays and objects are considered equal to zero when
+ * calculating the sum. Note: Casting to an array is not supported yet. Note: Capacity will stay the same if this value is less than or
+ * equal to the current capacity.
+ * The return value is cast to an integer.
+ * @since 5.1
+ */
+ public function count(): int {}
+
+ /**
+ * Returns a shallow copy of the collection.
+ * @link https://www.php.net/manual/en/ds-stack.copy.php
+ * @return Stack Note: Casting to an array is not supported yet. Note: Capacity will stay the same if this value is less than or
+ * equal to the current capacity.
+ * The return value is cast to an integer.
+ * @since 5.1
+ */
+ public function count(): int {}
+
+ /**
+ * Returns a shallow copy of the collection.
+ * @link https://www.php.net/manual/en/ds-queue.copy.php
+ * @return Queue Note: Casting to an array is not supported yet.
+ * The return value is cast to an integer.
+ * @since 5.1
+ */
+ public function count(): int {}
+
+ /**
+ * Allocates enough memory for a required capacity
+ * @link https://www.php.net/manual/en/ds-priorityqueue.allocate.php
+ *
+ * @param int $capacity
+ */
+ public function allocate(int $capacity): void {}
+
+ /**
+ * Returns the current capacity
+ * @link https://www.php.net/manual/en/ds-priorityqueue.capacity.php
+ *
+ * @return int
+ */
+ public function capacity(): int {}
+
+ /**
+ * Removes all values from the collection.
+ * @link https://www.php.net/manual/en/ds-collection.clear.php
+ */
+ public function clear(): void {}
+
+ /**
+ * Returns a shallow copy of the collection.
+ * @link https://www.php.net/manual/en/ds-collection.copy.php
+ * @return PriorityQueue Note: Casting to an array is not supported yet.
+ * @param resource|EnchantBroker $broker
* Broker resource
*
+ * @param resource|EnchantBroker $broker
* Broker resource.
*
+ * @param resource|EnchantBroker $broker
* Broker resource
*
+ * @param resource|EnchantBroker $broker
* Broker resource
*
* A tag describing the locale, for example en_US, de_DE
*
+ * @param resource|EnchantBroker $broker
* Broker resource
*
* Path to the PWL file.
*
+ * @param resource|EnchantDictionary $dict
* Dictionary resource.
*
+ * @param resource|EnchantBroker $broker
* Broker resource
*
@@ -107,13 +118,13 @@ function enchant_broker_free_dict ($dict) {}
*
+ * @param resource|EnchantBroker $broker
* Broker resource
*
@@ -126,24 +137,24 @@ function enchant_broker_dict_exists ($broker, $tag) {}
*
+ * @param resource|EnchantBroker $broker
* Broker resource
*
+ * @param resource|EnchantDictionary $dict
* Dictionary resource
*
@@ -151,13 +162,13 @@ function enchant_broker_describe ($broker) {}
*
+ * @param resource|EnchantDictionary $dict
* Dictionary resource
*
@@ -165,7 +176,7 @@ function enchant_dict_check ($dict, $word) {}
*
+ * @param resource|EnchantDictionary $dict
* Dictionary resource
*
* The word to add
*
+ * An Enchant dictionary returned by enchant_broker_request_dict() or enchant_broker_request_pwl_dict().
+ *
+ * The word to add
+ * callback ( mixed $a, mixed $b ) : int
+ * callback ( mixed $a, mixed $b ) : int
+ * callback ( mixed $key , mixed $value ) : mixed
+ * @return Mapcallback ( mixed $carry , mixed $key , mixed $value ) : mixed
+ * carry The return value of the previous callback, or initial if
+ * it's the first iteration.
+ * key The key of the current iteration.
+ * value The value of the current iteration.
+ *
+ * @param TCarry $initial The initial value of the carry value. Can be
+ * NULL.
+ *
+ * @return TCarry
+ * @link https://www.php.net/manual/en/ds-map.reduce.php
+ */
+ public function reduce(callable $callback, $initial) {}
+
+ /**
+ * Removes and returns a value by key, or return an optional default
+ * value if the key could not be found.
+ *
+ * @template TDefault
+ * @param TKey $key The key to remove.
+ * @param TDefault $default The optional default value, returned if the key
+ * could not be found.
+ *
+ * Note: Keys of type object are supported. If an object implements
+ * Ds\Hashable, equality will be determined
+ * by the object's equals function. If an object does not implement
+ * Ds\Hashable, objects must be references to the same instance to be
+ * considered equal.
+ *
+ * Note: You can also use array syntax to access values by key, eg.
+ * $map["key"].
+ *
+ * Caution: Be careful when using array syntax. Scalar keys will be
+ * coerced to integers by the engine. For example, $map["1"] will
+ * attempt to access int(1), while $map->get("1") will correctly look up
+ * the string key.
+ *
+ * @return TValue|TDefault The value that was removed, or the default value if
+ * provided and the key could not be found in the map.
+ *
+ * @throws OutOfBoundsException if the key could not be found and a
+ * default value was not provided.
+ *
+ * @link https://www.php.net/manual/en/ds-map.remove.php
+ */
+ public function remove($key, $default = null) {}
+
+ /**
+ * Reverses the map in-place.
+ *
+ * @link https://www.php.net/manual/en/ds-map.reverse.php
+ */
+ public function reverse() {}
+
+ /**
+ * Returns a reversed copy of the map.
+ *
+ * @return Mapcallback ( mixed $a, mixed $b ) : int
+ *
+ * Caution: Returning non-integer values from the comparison function,
+ * such as float, will result in an internal cast to integer of the
+ * callback's return value. So values such as 0.99 and 0.1 will both be
+ * cast to an integer value of 0, which will compare such values as
+ * equal.
+ *
+ * @link https://www.php.net/manual/en/ds-map.sort.php
+ */
+ public function sort(?callable $comparator = null) {}
+
+ /**
+ * Returns a copy, sorted by value using an optional comparator function.
+ *
+ * @param callable(TValue, TValue): int|null $comparator The comparison function must return
+ * an integer less than, equal to, or greater than zero if the first
+ * argument is considered to be respectively less than, equal to, or
+ * greater than the second. Note that before PHP 7.0.0 this integer had
+ * to be in the range from -2147483648 to 2147483647.
+ *
+ * callback ( mixed $a, mixed $b ) : int
+ *
+ * Caution: Returning non-integer values from the comparison function,
+ * such as float, will result in an internal cast to integer of the
+ * callback's return value. So values such as 0.99 and 0.1 will both be
+ * cast to an integer value of 0, which will compare such values as
+ * equal.
+ *
+ * @return Mapcallback ( mixed $value ) : mixed
+ * @return Setcallback ( mixed $carry , mixed $value ) : mixed
+ * $carry The return value of the previous callback, or initial if
+ * it's the first iteration.
+ * $value The value of the current iteration.
+ *
+ * @param TCarry $initial The initial value of the carry value. Can be
+ * NULL.
+ *
+ * @return TCarry The return value of the final callback.
+ */
+ public function reduce(callable $callback, $initial = null) {}
+
+ /**
+ * Removes all given values from the set, ignoring any that are not in
+ * the set.
+ *
+ * @link https://www.php.net/manual/en/ds-set.remove.php
+ *
+ * @param TValue ...$values The values to remove.
+ */
+ public function remove(...$values) {}
+
+ /**
+ * Reverses the set in-place.
+ *
+ * @link https://www.php.net/manual/en/ds-set.reverse.php
+ */
+ public function reverse() {}
+
+ /**
+ * Returns a reversed copy of the set.
+ *
+ * @link https://www.php.net/manual/en/ds-set.reversed.php
+ *
+ * callback ( mixed $a, mixed $b ) : int
+ * callback ( mixed $a, mixed $b ) : int
+ *
+ *
- * Free the broker resource and its dictionnaries
+ * Free the broker resource and its dictionaries
* @link https://php.net/manual/en/function.enchant-broker-free.php
- * @param resource $broker
* Returns the last error of the broker
* @link https://php.net/manual/en/function.enchant-broker-get-error.php
- * @param resource $broker
* Returns a list of available dictionaries
* @link https://php.net/manual/en/function.enchant-broker-list-dicts.php
- * @param resource $broker
* create a new dictionary using a tag
* @link https://php.net/manual/en/function.enchant-broker-request-dict.php
- * @param resource $broker
* creates a dictionary using a PWL file
* @link https://php.net/manual/en/function.enchant-broker-request-pwl-dict.php
- * @param resource $broker
* Free a dictionary resource
* @link https://php.net/manual/en/function.enchant-broker-free-dict.php
- * @param resource $dict
* Whether a dictionary exists or not. Using non-empty tag
* @link https://php.net/manual/en/function.enchant-broker-dict-exists.php
- * @param resource $broker
* Declares a preference of dictionaries to use for the language
* @link https://php.net/manual/en/function.enchant-broker-set-ordering.php
- * @param resource $broker
* Enumerates the Enchant providers
* @link https://php.net/manual/en/function.enchant-broker-describe.php
- * @param resource $broker
* Check whether a word is correctly spelled or not
* @link https://php.net/manual/en/function.enchant-dict-check.php
- * @param resource $dict
* Will return a list of values if any of those pre-conditions are not met
* @link https://php.net/manual/en/function.enchant-dict-suggest.php
- * @param resource $dict
@@ -178,22 +189,43 @@ function enchant_dict_suggest ($dict, $word) {}
* The word to add
*
* add 'word' to this spell-checking session
* @link https://php.net/manual/en/function.enchant-dict-add-to-session.php
- * @param resource $dict
+ * Add a word to personal word list
+ * @link https://php.net/manual/en/function.enchant-dict-add.php
+ * @param EnchantDictionary $dictionary
@@ -206,14 +238,20 @@ function enchant_dict_add_to_session ($dict, $word) {}
* The word to lookup
*
+ * @param resource|EnchantDictionary $dict
* Dictionary resource *
* @param string $mis@@ -224,50 +262,73 @@ function enchant_dict_is_in_session ($dict, $word) {} *
* @return void */ -function enchant_dict_store_replacement ($dict, $mis, $cor) {} +function enchant_dict_store_replacement($dict, $mis, $cor) {} /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )+ * @param resource|EnchantDictionary $dict
* Dictinaray resource *
- * @return string the error message as string or FALSE if no error occurred. + * @return string|false the error message as string or FALSE if no error occurred. + */ +function enchant_dict_get_error($dict) {} + +/** + * (PHP 8)+ * An Enchant dictionary returned by enchant_broker_request_dict() or enchant_broker_request_pwl_dict(). + *
+ * @param string $word+ * The word to lookup + *
+ * @return bool TRUE if the word exists or FALSE + * @since 8.0 */ -function enchant_dict_get_error ($dict) {} +function enchant_dict_is_added($dictionary, $word) {} /** * (PHP 5 >= 5.3.0, PECL enchant >= 0.1.0 )+ * @param resource|EnchantDictionary $dict
* Dictionary resource *
- * @return mixed TRUE on success or FALSE on failure. + * @return array Returns the details of the dictionary. */ -function enchant_dict_describe ($dict) {} +function enchant_dict_describe($dict) {} /** * (PHP 5 >= 5.3.0, PECL enchant:0.2.0-1.0.1)+ * @param resource|EnchantDictionary $dict
* Dictionary resource *
* @param string $word* The word to check *
- * @param array $suggestions [optional]+ * @param null|array &$suggestions [optional]
* If the word is not correctly spelled, this variable will * contain an array of suggestions. *
* @return bool TRUE if the word is correctly spelled or FALSE */ -function enchant_dict_quick_check ($dict, $word, array &$suggestions = null) {} +function enchant_dict_quick_check($dict, $word, ?array &$suggestions = null) {} + +/** + * @deprecated 8.0 + */ +define('ENCHANT_MYSPELL', 1); +/** + * @deprecated 8.0 + */ +define('ENCHANT_ISPELL', 2); -define ('ENCHANT_MYSPELL', 1); -define ('ENCHANT_ISPELL', 2); +final class EnchantBroker {} +final class EnchantDictionary {} // End of enchant v.1.1.0 -?> diff --git a/event/event.php b/event/event.php index 5f5d85be1..d30feeb52 100644 --- a/event/event.php +++ b/event/event.php @@ -1,13 +1,14 @@ + * @param string $file* The location of the image file. This cannot be an URL. * Since 7.2.0 this can either be a path to the file (stream wrappers are also supported as usual) * or a stream resource. *
- * @param string $sections [optional]+ * @param string|null $required_sections [optional]
* Is a comma separated list of sections that need to be present in file * to produce a result array. If none of the requested * sections could be found the return value is FALSE. @@ -60,25 +61,23 @@ * * *
- * @param bool $arrays [optional]+ * @param bool $as_arrays [optional]
* Specifies whether or not each section becomes an array. The * sections COMPUTED, * THUMBNAIL, and COMMENT * always become arrays as they may contain values whose names conflict * with other sections. *
- * @param bool $thumbnail [optional]+ * @param bool $read_thumbnail [optional]
* When set to TRUE the thumbnail itself is read. Otherwise, only the * tagged data is read. *
- * @return array It returns an associative array where the array indexes are + * @return array|false It returns an associative array where the array indexes are * the header names and the array values are the values associated with * those headers. If no data can be returned, * exif_read_data will return FALSE. - * @since 4.2 - * @since 5.0 */ -function exif_read_data ($stream, $sections = null, $arrays = false, $thumbnail = false) {} +function exif_read_data($file, ?string $required_sections, bool $as_arrays = false, bool $read_thumbnail = false): array|false {} /** * Alias of exif_read_data @@ -87,11 +86,10 @@ function exif_read_data ($stream, $sections = null, $arrays = false, $thumbnail * @param $sections [optional] * @param $arrays [optional] * @param $thumbnail [optional] - * @since 4.0.1 - * @since 5.0 - * @deprecated 7.2 Use {@see exif_read_data()} instead. + * @removed 8.0 */ -function read_exif_data ($filename, $sections = null, $arrays = false, $thumbnail = false) {} +#[Deprecated(replacement: "exif_read_data(%parametersList%)", since: "7.2")] +function read_exif_data($filename, $sections = null, $arrays = false, $thumbnail = false) {} /** * Get the header name for an index @@ -101,35 +99,31 @@ function read_exif_data ($filename, $sections = null, $arrays = false, $thumbnai * * @return string|false the header name, or FALSE if index is * not a defined EXIF tag id. - * @since 4.2 - * @since 5.0 */ -function exif_tagname ($index) {} +function exif_tagname(int $index): string|false {} /** * Retrieve the embedded thumbnail of a TIFF or JPEG image * @link https://php.net/manual/en/function.exif-thumbnail.php - * @param string|resource $stream+ * @param string|resource $file
* The location of the image file. This cannot be an URL. * Since 7.2.0 this can either be a path to the file (stream wrappers are also supported as usual) * or a stream resource. *
- * @param int $width [optional]+ * @param int &$width [optional]
* The return width of the returned thumbnail. *
- * @param int $height [optional]+ * @param int &$height [optional]
* The returned height of the returned thumbnail. *
- * @param int $imagetype [optional]+ * @param int &$image_type [optional]
* The returned image type of the returned thumbnail. This is either * TIFF or JPEG. *
* @return string|false the embedded thumbnail, or FALSE if the image contains no * thumbnail. - * @since 4.2 - * @since 5.0 */ -function exif_thumbnail ($stream, &$width = null, &$height = null, &$imagetype = null) {} +function exif_thumbnail($file, &$width, &$height, &$image_type): string|false {} /** * Determine the type of an image @@ -144,12 +138,9 @@ function exif_thumbnail ($stream, &$width = null, &$height = null, &$imagetype = * exif_imagetype will emit an E_NOTICE * and return FALSE if it is unable to read enough bytes from the file to * determine the image type. - * @since 4.3 - * @since 5.0 */ -function exif_imagetype ($filename) {} +function exif_imagetype(string $filename): int|false {} -define ('EXIF_USE_MBSTRING', 1); +define('EXIF_USE_MBSTRING', 1); // End of exif v.1.4 $Id$ -?> diff --git a/expect/expect.php b/expect/expect.php new file mode 100644 index 000000000..8205276eb --- /dev/null +++ b/expect/expect.php @@ -0,0 +1,99 @@ +expect_expectl(), when EOF is reached. + * @link https://www.php.net/manual/en/expect.constants.php + */ +const EXP_EOF = -11; +/** + * Value, returned by expect_expectl() upon timeout of seconds, specified in value of expect.timeout + * @link https://www.php.net/manual/en/expect.constants.php + */ +const EXP_TIMEOUT = -2; +/** + * Value, returned by expect_expectl() if no pattern have been matched. + * @link https://www.php.net/manual/en/expect.constants.php + */ +const EXP_FULLBUFFER = -5; + +/** + * Execute command via Bourne shell, and open the PTY stream to the process + * + * @param string $command Command to execute. + * @return resource|false Returns an open PTY stream to the processes stdio, stdout, and stderr. + * On failure this function returns FALSE. + * @since PECL expect >= 0.1.0 + * @link https://www.php.net/manual/en/function.expect-popen.php + */ +function expect_popen(string $command) +{ + unset($command); + return false; +} + +/** + * Waits until the output from a process matches one of the patterns, a specified time period has passed, + * or an EOF is seen. + * + * If match is provided, then it is filled with the result of search. The matched string can be found in match[0]. + * The match substrings (according to the parentheses) in the original pattern can be found in match[1], match[2], + * and so on, up to match[9] (the limitation of libexpect). + * + * @param resource $expect An Expect stream, previously opened with expect_popen() + * @param array $casesAn array of expect cases. Each expect case is an indexed array, as described in the following table:
+ *+ *
- * One or disjunction of more Fileinfo - * constants. - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function set_flags ($options) {} - - /** - * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)- * Name of a file to be checked. - *
- * @param int $options [optional]- * One or disjunction of more Fileinfo - * constants. - *
- * @param resource $context [optional]- * For a description of contexts, refer to . - *
- * @return string a textual description of the contents of the - * filename argument, or FALSE if an error occurred. - */ - public function file ($file_name = null, $options = FILEINFO_NONE, $context = null) {} - - /** - * (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)- * Content of a file to be checked. - *
- * @param int $options [optional]- * One or disjunction of more Fileinfo - * constants. - *
- * @param resource $context [optional] - * @return string a textual description of the string - * argument, or FALSE if an error occurred. - */ - public function buffer ($string = null, $options = FILEINFO_NONE, $context = null) {} - +use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; +use JetBrains\PhpStorm\Internal\TentativeType; +use JetBrains\PhpStorm\Pure; + +class finfo +{ + /** + * @param int $flags [optional] + * @param string $magic_database [optional] + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $magic_database + ) {} + + /** + * @param $options [optional] + * @param $arg [optional] + */ + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] + public function finfo($options, $arg) {} + + /** + * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)+ * One or disjunction of more Fileinfo + * constants. + *
+ * @return bool TRUE on success or FALSE on failure. + */ + public function set_flags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags) {} + + /** + * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)+ * Name of a file to be checked. + *
+ * @param int $flags [optional]+ * One or disjunction of more Fileinfo + * constants. + *
+ * @param resource $context [optional]+ * For a description of contexts, refer to . + *
+ * @return string a textual description of the contents of the + * filename argument, or FALSE if an error occurred. + */ + #[Pure] + #[TentativeType] + public function file( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE, + $context = null + ): string|false {} + + /** + * (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)+ * Content of a file to be checked. + *
+ * @param int $flags [optional]+ * One or disjunction of more Fileinfo + * constants. + *
+ * @param resource $context [optional] + * @return string a textual description of the string + * argument, or FALSE if an error occurred. + */ + #[Pure] + #[TentativeType] + public function buffer( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE, + $context = null + ): string|false {} } /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)+ * @param int $flags
* One or disjunction of more Fileinfo * constants. *
- * @param string $magic_file [optional]+ * @param string|null $magic_database [optional]
* Name of a magic database file, usually something like * /path/to/magic.mime. If not specified, * the MAGIC environment variable is used. If this variable @@ -76,9 +102,10 @@ public function buffer ($string = null, $options = FILEINFO_NONE, $context = nul * A .mime and/or .mgc suffix is added if * needed. *
- * @return resource a magic database resource on success or FALSE on failure. + * @return resource|false a magic database resource on success or FALSE on failure. */ -function finfo_open ($options = null, $magic_file = null) {} +#[LanguageLevelTypeAware(['8.1' => 'finfo|false'], default: 'resource|false')] +function finfo_open(int $flags = 0, ?string $magic_database = null) {} /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* Fileinfo resource returned by finfo_open. *
- * @param int $options+ * @param int $flags
* One or disjunction of more Fileinfo * constants. *
* @return bool TRUE on success or FALSE on failure. */ -function finfo_set_flags ($finfo, $options) {} +function finfo_set_flags(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, int $flags): bool {} /** * (PHP >= 5.3.0, PECL fileinfo >= 0.1.0)* Fileinfo resource returned by finfo_open. *
- * @param string $file_name+ * @param string $filename
* Name of a file to be checked. *
- * @param int $options [optional]+ * @param int $flags
* One or disjunction of more Fileinfo * constants. *
* @param resource $context [optional]* For a description of contexts, refer to . *
- * @return mixed a textual description of the contents of the + * @return string|false a textual description of the contents of the * filename argument, or FALSE if an error occurred. */ -function finfo_file ($finfo, $file_name, $options = null, $context = null) {} +function finfo_file(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, string $filename, int $flags = 0, $context): string|false {} /** * (PHP 5 >= 5.3.0, PECL fileinfo >= 0.1.0)* Content of a file to be checked. *
- * @param int $options [optional]- * One or disjunction of more Fileinfo - * constants. - *
- * @param resource $context [optional]- *
- * @param string $string - * @param int $options [optional] One or disjunction of more + * @param int $flags [optional] One or disjunction of more * Fileinfo constants. - * @param resource $context [optional] - * @return string a textual description of the string + * @param resource $context [optional] + * @return string|false a textual description of the string * argument, or FALSE if an error occurred. */ -function finfo_buffer ($finfo ,$string, $options = FILEINFO_NONE, $context = NULL) {} +function finfo_buffer(#[LanguageLevelTypeAware(['8.1' => 'finfo'], default: 'resource')] $finfo, string $string, int $flags = FILEINFO_NONE, $context): string|false {} /** * Detect MIME Content-type for a file @@ -159,78 +179,77 @@ function finfo_buffer ($finfo ,$string, $options = FILEINFO_NONE, $context = NUL * @param string $filename* Path to the tested file. *
- * @return string the content type in MIME format, like + * @return string|false the content type in MIME format, like * text/plain or application/octet-stream. - * @since 4.3 - * @since 5.0 */ -function mime_content_type ($filename) {} - +function mime_content_type($filename): string|false {} /** * No special handling. * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_NONE', 0); +define('FILEINFO_NONE', 0); /** * Follow symlinks. * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_SYMLINK', 2); +define('FILEINFO_SYMLINK', 2); /** * Return the mime type and mime encoding as defined by RFC 2045. * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_MIME', 1040); +define('FILEINFO_MIME', 1040); /** * Return the mime type. - * @since 5.3 * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_MIME_TYPE', 16); +define('FILEINFO_MIME_TYPE', 16); /** * Return the mime encoding of the file. - * @since 5.3 * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_MIME_ENCODING', 1024); +define('FILEINFO_MIME_ENCODING', 1024); /** * Look at the contents of blocks or character special devices. * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_DEVICES', 8); +define('FILEINFO_DEVICES', 8); /** * Return all matches, not just the first. * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_CONTINUE', 32); +define('FILEINFO_CONTINUE', 32); /** * If possible preserve the original access time. * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_PRESERVE_ATIME', 128); +define('FILEINFO_PRESERVE_ATIME', 128); /** * Don't translate unprintable characters to a \ooo octal * representation. * @link https://php.net/manual/en/fileinfo.constants.php */ -define ('FILEINFO_RAW', 256); +define('FILEINFO_RAW', 256); /** - * Returns the file extension appropiate for a the MIME type detected in the file. + * Returns the file extension appropriate for a the MIME type detected in the file. * For types that commonly have multiple file extensions, such as JPEG images, then the return value is multiple extensions speparated by a forward slash e.g.: "jpeg/jpg/jpe/jfif". * For unknown types not available in the magic.mime database, then return value is "???". Available since PHP 7.2.0. * @since 7.2 */ define('FILEINFO_EXTENSION', 2097152); +/** + * @since 8.2 + */ +define('FILEINFO_APPLE', 2048); + // End of fileinfo v.1.0.5 -?> diff --git a/filter/filter.php b/filter/filter.php index 4bfd4680b..c928e2d0d 100644 --- a/filter/filter.php +++ b/filter/filter.php @@ -1,6 +1,7 @@ INPUT_COOKIE, INPUT_SERVER, or * INPUT_ENV. * - * @param string $variable_name+ * @param string $var_name
* Name of a variable to get. *
* @param int $filter [optional]* The ID of the filter to apply. The * manual page lists the available filters. *
- * @param mixed $options [optional]+ * @param array|int $options
* Associative array of options or bitwise disjunction of flags. If filter * accepts options, flags can be provided in "flags" field of array. *
@@ -25,21 +26,21 @@ * or NULL if the variable_name variable is not set. * If the flag FILTER_NULL_ON_FAILURE is used, it * returns FALSE if the variable is not set and NULL if the filter fails. - * @since 5.2 */ -function filter_input ($type, $variable_name, $filter = FILTER_DEFAULT, $options = null) {} +#[Pure] +function filter_input(int $type, string $var_name, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {} /** * Filters a variable with a specified filter * @link https://php.net/manual/en/function.filter-var.php - * @param mixed $variable+ * @param mixed $value
* Value to filter. *
* @param int $filter [optional]* The ID of the filter to apply. The * manual page lists the available filters. *
- * @param mixed $options [optional]+ * @param array|int $options
* Associative array of options or bitwise disjunction of flags. If filter * accepts options, flags can be provided in "flags" field of array. For * the "callback" filter, callable type should be passed. The @@ -81,9 +82,9 @@ function filter_input ($type, $variable_name, $filter = FILTER_DEFAULT, $options * *
* @return mixed the filtered data, or FALSE if the filter fails. - * @since 5.2 */ -function filter_var ($variable, $filter = FILTER_DEFAULT, $options = null) {} +#[Pure] +function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {} /** * Gets external variables and optionally filters them @@ -93,7 +94,7 @@ function filter_var ($variable, $filter = FILTER_DEFAULT, $options = null) {} * INPUT_COOKIE, INPUT_SERVER, or * INPUT_ENV. * - * @param mixed $definition [optional]+ * @param array|int $options [optional]
* An array defining the arguments. A valid key is a string * containing a variable name and a valid value is either a filter type, or an array * optionally specifying the filter, flags and options. If the value is an @@ -110,22 +111,22 @@ function filter_var ($variable, $filter = FILTER_DEFAULT, $options = null) {} * @param bool $add_empty [optional]
* Add missing keys as NULL to the return value. *
- * @return mixed An array containing the values of the requested variables on success, or FALSE + * @return array|false|null An array containing the values of the requested variables on success, or FALSE * on failure. An array value will be FALSE if the filter fails, or NULL if * the variable is not set. Or if the flag FILTER_NULL_ON_FAILURE * is used, it returns FALSE if the variable is not set and NULL if the filter * fails. - * @since 5.2 */ -function filter_input_array ($type, $definition = null, $add_empty = true) {} +#[Pure] +function filter_input_array(int $type, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {} /** * Gets multiple variables and optionally filters them * @link https://php.net/manual/en/function.filter-var-array.php - * @param array $data+ * @param array $array
* An array with string keys containing the data to filter. *
- * @param mixed $definition [optional]+ * @param array|int $options [optional]
* An array defining the arguments. A valid key is a string * containing a variable name and a valid value is either a * filter type, or an @@ -143,12 +144,12 @@ function filter_input_array ($type, $definition = null, $add_empty = true) {} * @param bool $add_empty [optional]
* Add missing keys as NULL to the return value. *
- * @return mixed An array containing the values of the requested variables on success, or FALSE + * @return array|false|null An array containing the values of the requested variables on success, or FALSE * on failure. An array value will be FALSE if the filter fails, or NULL if * the variable is not set. - * @since 5.2 */ -function filter_var_array (array $data, $definition = null, $add_empty = true) {} +#[Pure] +function filter_var_array(array $array, array|int $options = FILTER_DEFAULT, bool $add_empty = true): array|false|null {} /** * Returns a list of all supported filters @@ -156,135 +157,143 @@ function filter_var_array (array $data, $definition = null, $add_empty = true) { * @return array an array of names of all supported filters, empty array if there * are no such filters. Indexes of this array are not filter IDs, they can be * obtained with filter_id from a name instead. - * @since 5.2 */ -function filter_list () {} +#[Pure] +function filter_list(): array {} /** * Checks if variable of specified type exists * @link https://php.net/manual/en/function.filter-has-var.php - * @param int $type+ * @param int $input_type
* One of INPUT_GET, INPUT_POST, * INPUT_COOKIE, INPUT_SERVER, or * INPUT_ENV. *
- * @param string $variable_name+ * @param string $var_name
* Name of a variable to check. *
* @return bool TRUE on success or FALSE on failure. - * @since 5.2 */ -function filter_has_var ($type, $variable_name) {} +#[Pure] +function filter_has_var(int $input_type, string $var_name): bool {} /** * Returns the filter ID belonging to a named filter * @link https://php.net/manual/en/function.filter-id.php - * @param string $filtername+ * @param string $name
* Name of a filter to get. *
* @return int|false ID of a filter on success or FALSE if filter doesn't exist. - * @since 5.2 */ -function filter_id ($filtername) {} - +#[Pure] +function filter_id(string $name): int|false {} /** * POST variables. * @link https://php.net/manual/en/filter.constants.php */ -define ('INPUT_POST', 0); +define('INPUT_POST', 0); /** * GET variables. * @link https://php.net/manual/en/filter.constants.php */ -define ('INPUT_GET', 1); +define('INPUT_GET', 1); /** * COOKIE variables. * @link https://php.net/manual/en/filter.constants.php */ -define ('INPUT_COOKIE', 2); +define('INPUT_COOKIE', 2); /** * ENV variables. * @link https://php.net/manual/en/filter.constants.php */ -define ('INPUT_ENV', 4); +define('INPUT_ENV', 4); /** * SERVER variables. * @link https://php.net/manual/en/filter.constants.php */ -define ('INPUT_SERVER', 5); +define('INPUT_SERVER', 5); /** * SESSION variables. * (not implemented yet) * @link https://php.net/manual/en/filter.constants.php + * @removed 8.0 */ -define ('INPUT_SESSION', 6); +define('INPUT_SESSION', 6); /** * REQUEST variables. * (not implemented yet) * @link https://php.net/manual/en/filter.constants.php + * @removed 8.0 */ -define ('INPUT_REQUEST', 99); +define('INPUT_REQUEST', 99); /** * No flags. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_NONE', 0); +define('FILTER_FLAG_NONE', 0); /** * Flag used to require scalar as input * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_REQUIRE_SCALAR', 33554432); +define('FILTER_REQUIRE_SCALAR', 33554432); /** * Require an array as input. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_REQUIRE_ARRAY', 16777216); +define('FILTER_REQUIRE_ARRAY', 16777216); /** * Always returns an array. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FORCE_ARRAY', 67108864); +define('FILTER_FORCE_ARRAY', 67108864); /** * Use NULL instead of FALSE on failure. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_NULL_ON_FAILURE', 134217728); +define('FILTER_NULL_ON_FAILURE', 134217728); /** * ID of "int" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_VALIDATE_INT', 257); +define('FILTER_VALIDATE_INT', 257); /** * ID of "boolean" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_VALIDATE_BOOLEAN', 258); +define('FILTER_VALIDATE_BOOLEAN', 258); +/** + * ID of "boolean" filter. + * @link https://php.net/manual/en/filter.constants.php + * @link https://php.net/manual/en/filter.filters.validate.php + * @since 8.0 Using `FILTER_VALIDATE_BOOL` is preferred. + */ +define('FILTER_VALIDATE_BOOL', 258); /** * ID of "float" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_VALIDATE_FLOAT', 259); +define('FILTER_VALIDATE_FLOAT', 259); /** * ID of "validate_regexp" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_VALIDATE_REGEXP', 272); +define('FILTER_VALIDATE_REGEXP', 272); define('FILTER_VALIDATE_DOMAIN', 277); @@ -292,26 +301,26 @@ function filter_id ($filtername) {} * ID of "validate_url" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_VALIDATE_URL', 273); +define('FILTER_VALIDATE_URL', 273); /** * ID of "validate_email" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_VALIDATE_EMAIL', 274); +define('FILTER_VALIDATE_EMAIL', 274); /** * ID of "validate_ip" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_VALIDATE_IP', 275); -define ('FILTER_VALIDATE_MAC', 276); +define('FILTER_VALIDATE_IP', 275); +define('FILTER_VALIDATE_MAC', 276); /** * ID of default ("string") filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_DEFAULT', 516); +define('FILTER_DEFAULT', 516); /** * @since 7.3 @@ -322,195 +331,206 @@ function filter_id ($filtername) {} * ID of "unsafe_raw" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_UNSAFE_RAW', 516); +define('FILTER_UNSAFE_RAW', 516); /** * ID of "string" filter. * @link https://php.net/manual/en/filter.constants.php + * @deprecated 8.1 */ -define ('FILTER_SANITIZE_STRING', 513); +define('FILTER_SANITIZE_STRING', 513); /** * ID of "stripped" filter. * @link https://php.net/manual/en/filter.constants.php + * @deprecated 8.1 */ -define ('FILTER_SANITIZE_STRIPPED', 513); +define('FILTER_SANITIZE_STRIPPED', 513); /** * ID of "encoded" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_SANITIZE_ENCODED', 514); +define('FILTER_SANITIZE_ENCODED', 514); /** * ID of "special_chars" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_SANITIZE_SPECIAL_CHARS', 515); -define ('FILTER_SANITIZE_FULL_SPECIAL_CHARS', 522); +define('FILTER_SANITIZE_SPECIAL_CHARS', 515); +define('FILTER_SANITIZE_FULL_SPECIAL_CHARS', 522); /** * ID of "email" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_SANITIZE_EMAIL', 517); +define('FILTER_SANITIZE_EMAIL', 517); /** * ID of "url" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_SANITIZE_URL', 518); +define('FILTER_SANITIZE_URL', 518); /** * ID of "number_int" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_SANITIZE_NUMBER_INT', 519); +define('FILTER_SANITIZE_NUMBER_INT', 519); /** * ID of "number_float" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_SANITIZE_NUMBER_FLOAT', 520); +define('FILTER_SANITIZE_NUMBER_FLOAT', 520); /** * ID of "magic_quotes" filter. * @link https://php.net/manual/en/filter.constants.php * @deprecated 7.4 + * @removed 8.0 */ -define ('FILTER_SANITIZE_MAGIC_QUOTES', 521); +define('FILTER_SANITIZE_MAGIC_QUOTES', 521); /** * ID of "callback" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_CALLBACK', 1024); +define('FILTER_CALLBACK', 1024); /** * Allow octal notation (0[0-7]+) in "int" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ALLOW_OCTAL', 1); +define('FILTER_FLAG_ALLOW_OCTAL', 1); /** * Allow hex notation (0x[0-9a-fA-F]+) in "int" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ALLOW_HEX', 2); +define('FILTER_FLAG_ALLOW_HEX', 2); /** * Strip characters with ASCII value less than 32. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_STRIP_LOW', 4); +define('FILTER_FLAG_STRIP_LOW', 4); /** * Strip characters with ASCII value greater than 127. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_STRIP_HIGH', 8); -define ('FILTER_FLAG_STRIP_BACKTICK', 512); +define('FILTER_FLAG_STRIP_HIGH', 8); +define('FILTER_FLAG_STRIP_BACKTICK', 512); /** * Encode characters with ASCII value less than 32. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ENCODE_LOW', 16); +define('FILTER_FLAG_ENCODE_LOW', 16); /** * Encode characters with ASCII value greater than 127. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ENCODE_HIGH', 32); +define('FILTER_FLAG_ENCODE_HIGH', 32); /** - * Encode &. + * Encode &. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ENCODE_AMP', 64); +define('FILTER_FLAG_ENCODE_AMP', 64); /** * Don't encode ' and ". * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_NO_ENCODE_QUOTES', 128); +define('FILTER_FLAG_NO_ENCODE_QUOTES', 128); /** * (No use for now.) * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_EMPTY_STRING_NULL', 256); +define('FILTER_FLAG_EMPTY_STRING_NULL', 256); /** * Allow fractional part in "number_float" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ALLOW_FRACTION', 4096); +define('FILTER_FLAG_ALLOW_FRACTION', 4096); /** * Allow thousand separator (,) in "number_float" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ALLOW_THOUSAND', 8192); +define('FILTER_FLAG_ALLOW_THOUSAND', 8192); /** * Allow scientific notation (e, E) in * "number_float" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_ALLOW_SCIENTIFIC', 16384); +define('FILTER_FLAG_ALLOW_SCIENTIFIC', 16384); /** * Require scheme in "validate_url" filter. * @link https://php.net/manual/en/filter.constants.php * @deprecated 7.3 + * @removed 8.0 */ -define ('FILTER_FLAG_SCHEME_REQUIRED', 65536); +define('FILTER_FLAG_SCHEME_REQUIRED', 65536); /** * Require host in "validate_url" filter. * @link https://php.net/manual/en/filter.constants.php * @deprecated 7.3 + * @removed 8.0 */ -define ('FILTER_FLAG_HOST_REQUIRED', 131072); +define('FILTER_FLAG_HOST_REQUIRED', 131072); /** * Require path in "validate_url" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_PATH_REQUIRED', 262144); +define('FILTER_FLAG_PATH_REQUIRED', 262144); /** * Require query in "validate_url" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_QUERY_REQUIRED', 524288); +define('FILTER_FLAG_QUERY_REQUIRED', 524288); /** * Allow only IPv4 address in "validate_ip" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_IPV4', 1048576); +define('FILTER_FLAG_IPV4', 1048576); /** * Allow only IPv6 address in "validate_ip" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_IPV6', 2097152); +define('FILTER_FLAG_IPV6', 2097152); /** * Deny reserved addresses in "validate_ip" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_NO_RES_RANGE', 4194304); +define('FILTER_FLAG_NO_RES_RANGE', 4194304); /** * Deny private addresses in "validate_ip" filter. * @link https://php.net/manual/en/filter.constants.php */ -define ('FILTER_FLAG_NO_PRIV_RANGE', 8388608); +define('FILTER_FLAG_NO_PRIV_RANGE', 8388608); define('FILTER_FLAG_HOSTNAME', 1048576); define('FILTER_FLAG_EMAIL_UNICODE', 1048576); + +/** + * filters Global IPs per RFC 6890 + * @since 8.2 + */ +define('FILTER_FLAG_GLOBAL_RANGE', 268435456); + // End of filter v.0.11.0 -?> diff --git a/fpm/fpm.php b/fpm/fpm.php index 8935b1a5e..4a6550ccc 100644 --- a/fpm/fpm.php +++ b/fpm/fpm.php @@ -2,6 +2,15 @@ /** * Returns FPM status info array * @since 7.3 - * @return array + * @return array|false */ -function fpm_get_status() : array { } \ No newline at end of file +function fpm_get_status(): array|false {} + +/** + * This function flushes all response data to the client and finishes the request. + * This allows for time consuming tasks to be performed without leaving the connection to the client open. + * @return bool Returns TRUE on success or FALSE on failure. + * @link https://php.net/manual/en/install.fpm.php + * @since 5.3.3 + */ +function fastcgi_finish_request() {}; diff --git a/ftp/Connection.php b/ftp/Connection.php new file mode 100644 index 000000000..1b7ccf47d --- /dev/null +++ b/ftp/Connection.php @@ -0,0 +1,8 @@ + 'FTP\Connection'], default: 'resource')] $ftp, + string $remote_filename, + string $local_filename, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY +): bool {} /** + * returns a list of files in the given directory * @param resource $ftp * @param string $directory - * @return array + * @return array|false * @since 7.2 */ -function ftp_mlsd ($ftp, $directory) {} +function ftp_mlsd(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): array|false {} /** * Opens an FTP connection * @link https://php.net/manual/en/function.ftp-connect.php - * @param string $host+ * @param string $hostname
* The FTP server address. This parameter shouldn't have any trailing * slashes and shouldn't be prefixed with ftp://. *
@@ -38,15 +53,14 @@ function ftp_mlsd ($ftp, $directory) {} * ftp_get_option. * * @return resource|false a FTP stream on success or FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ftp_connect ($host, $port = 21, $timeout = 90) {} +#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection|false'], default: 'resource|false')] +function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) {} /** - * Opens an Secure SSL-FTP connection + * Opens a Secure SSL-FTP connection * @link https://php.net/manual/en/function.ftp-ssl-connect.php - * @param string $host+ * @param string $hostname
* The FTP server address. This parameter shouldn't have any trailing * slashes and shouldn't be prefixed with ftp://. *
@@ -61,15 +75,14 @@ function ftp_connect ($host, $port = 21, $timeout = 90) {} * ftp_get_option. * * @return resource|false a SSL-FTP stream on success or FALSE on error. - * @since 4.3 - * @since 5.0 */ -function ftp_ssl_connect ($host, $port = 21, $timeout = 90) {} +#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection|false'], default: 'resource|false')] +function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) {} /** * Logs in to an FTP connection * @link https://php.net/manual/en/function.ftp-login.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $username@@ -80,39 +93,33 @@ function ftp_ssl_connect ($host, $port = 21, $timeout = 90) {} *
* @return bool TRUE on success or FALSE on failure. * If login fails, PHP will also throw a warning. - * @since 4.0 - * @since 5.0 */ -function ftp_login ($ftp_stream, $username, $password) {} +function ftp_login(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $username, string $password): bool {} /** * Returns the current directory name * @link https://php.net/manual/en/function.ftp-pwd.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @return string the current directory name or FALSE on error. - * @since 4.0 - * @since 5.0 + * @return string|false the current directory name or FALSE on error. */ -function ftp_pwd ($ftp_stream) {} +function ftp_pwd(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {} /** * Changes to the parent directory * @link https://php.net/manual/en/function.ftp-cdup.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_cdup ($ftp_stream) {} +function ftp_cdup(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {} /** * Changes the current directory on a FTP server * @link https://php.net/manual/en/function.ftp-chdir.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $directory@@ -120,15 +127,13 @@ function ftp_cdup ($ftp_stream) {} *
* @return bool TRUE on success or FALSE on failure. * If changing directory fails, PHP will also throw a warning. - * @since 4.0 - * @since 5.0 */ -function ftp_chdir ($ftp_stream, $directory) {} +function ftp_chdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {} /** * Requests execution of a command on the FTP server * @link https://php.net/manual/en/function.ftp-exec.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $command@@ -136,46 +141,42 @@ function ftp_chdir ($ftp_stream, $directory) {} *
* @return bool TRUE if the command was successful (server sent response code: * 200); otherwise returns FALSE. - * @since 4.0.3 - * @since 5.0 */ -function ftp_exec ($ftp_stream, $command) {} +function ftp_exec(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): bool {} /** * Sends an arbitrary command to an FTP server * @link https://php.net/manual/en/function.ftp-raw.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $command* The command to execute. *
- * @return array the server's response as an array of strings. + * @return string[] the server's response as an array of strings. * No parsing is performed on the response string, nor does * ftp_raw determine if the command succeeded. - * @since 5.0 */ -function ftp_raw ($ftp_stream, $command) {} +#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] +function ftp_raw(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command) {} /** * Creates a directory * @link https://php.net/manual/en/function.ftp-mkdir.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $directory* The name of the directory that will be created. *
- * @return string the newly created directory name on success or FALSE on error. - * @since 4.0 - * @since 5.0 + * @return string|false the newly created directory name on success or FALSE on error. */ -function ftp_mkdir ($ftp_stream, $directory) {} +function ftp_mkdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): string|false {} /** * Removes a directory * @link https://php.net/manual/en/function.ftp-rmdir.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $directory@@ -183,50 +184,46 @@ function ftp_mkdir ($ftp_stream, $directory) {} * path to an empty directory. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_rmdir ($ftp_stream, $directory) {} +function ftp_rmdir(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): bool {} /** * Set permissions on a file via FTP * @link https://php.net/manual/en/function.ftp-chmod.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param int $mode+ * @param int $permissions
* The new permissions, given as an octal value. *
* @param string $filename* The remote file. *
* @return int|false the new file permissions on success or FALSE on error. - * @since 5.0 */ -function ftp_chmod ($ftp_stream, $mode, $filename) {} +function ftp_chmod(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $permissions, string $filename): int|false {} /** * Allocates space for a file to be uploaded * @link https://php.net/manual/en/function.ftp-alloc.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param int $filesize+ * @param int $size
* The number of bytes to allocate. *
- * @param string $result [optional]+ * @param string &$response [optional]
* A textual representation of the servers response will be returned by * reference in result if a variable is provided. *
* @return bool TRUE on success or FALSE on failure. - * @since 5.0 */ -function ftp_alloc ($ftp_stream, $filesize, &$result = null) {} +function ftp_alloc(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, int $size, &$response): bool {} /** * Returns a list of files in the given directory * @link https://php.net/manual/en/function.ftp-nlist.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $directory@@ -235,17 +232,15 @@ function ftp_alloc ($ftp_stream, $filesize, &$result = null) {} * Note that this parameter isn't escaped so there may be some issues with * filenames containing spaces and other characters. *
- * @return array an array of filenames from the specified directory on success or + * @return string[]|false an array of filenames from the specified directory on success or * FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ftp_nlist ($ftp_stream, $directory) {} +function ftp_nlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory): array|false {} /** * Returns a detailed list of files in the given directory * @link https://php.net/manual/en/function.ftp-rawlist.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $directory@@ -255,208 +250,226 @@ function ftp_nlist ($ftp_stream, $directory) {} * @param bool $recursive [optional]
* If set to TRUE, the issued command will be LIST -R. *
- * @return array an array where each element corresponds to one line of text. - * + * @return string[]|false an array where each element corresponds to one line of text. ** The output is not parsed in any way. The system type identifier returned by * ftp_systype can be used to determine how the results * should be interpreted. - * @since 4.0 - * @since 5.0 + *
*/ -function ftp_rawlist ($ftp_stream, $directory, $recursive = false) {} +function ftp_rawlist(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $directory, bool $recursive = false): array|false {} /** * Returns the system type identifier of the remote FTP server * @link https://php.net/manual/en/function.ftp-systype.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @return string the remote system type, or FALSE on error. - * @since 4.0 - * @since 5.0 + * @return string|false the remote system type, or FALSE on error. */ -function ftp_systype ($ftp_stream) {} +function ftp_systype(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): string|false {} /** * Turns passive mode on or off * @link https://php.net/manual/en/function.ftp-pasv.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param bool $pasv+ * @param bool $enable
* If TRUE, the passive mode is turned on, else it's turned off. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_pasv ($ftp_stream, $pasv) {} +function ftp_pasv(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, bool $enable): bool {} /** * Downloads a file from the FTP server * @link https://php.net/manual/en/function.ftp-get.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $local_file+ * @param string $local_filename
* The local file path (will be overwritten if the file already exists). *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Optional since PHP 7.3 *
- * @param int $resumepos [optional]+ * @param int $offset [optional]
* The position in the remote file to start downloading from. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_get ($ftp_stream, $local_file, $remote_file, $mode = FTP_BINARY, $resumepos = 0) {} +function ftp_get( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + string $local_filename, + string $remote_filename, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +): bool {} /** * Downloads a file from the FTP server and saves to an open file * @link https://php.net/manual/en/function.ftp-fget.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param resource $handle+ * @param resource $stream
* An open file pointer in which we store the data. *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Since PHP 7.3 parameter is optional *
- * @param int $resumepos [optional]+ * @param int $offset [optional]
* The position in the remote file to start downloading from. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_fget ($ftp_stream, $handle, $remote_file, $mode = FTP_BINARY, $resumepos = 0) {} +function ftp_fget( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + $stream, + string $remote_filename, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +): bool {} /** * Uploads a file to the FTP server * @link https://php.net/manual/en/function.ftp-put.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param string $local_file+ * @param string $local_filename
* The local file path. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Optional since PHP 7.3 *
- * @param int $startpos [optional]The position in the remote file to start uploading to.
+ * @param int $offset [optional]The position in the remote file to start uploading to.
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_put ($ftp_stream, $remote_file, $local_file, $mode = FTP_BINARY, $startpos = 0) {} +function ftp_put( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + string $remote_filename, + string $local_filename, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +): bool {} /** * Uploads from an open file to the FTP server * @link https://php.net/manual/en/function.ftp-fput.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param resource $handle+ * @param resource $stream
* An open file pointer on the local file. Reading stops at end of file. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Optional since PHP 7.3 *
- * @param int $startpos [optional]The position in the remote file to start uploading to.
+ * @param int $offset [optional]The position in the remote file to start uploading to.
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_fput ($ftp_stream, $remote_file, $handle, $mode = FTP_BINARY, $startpos = 0) {} +function ftp_fput( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + string $remote_filename, + $stream, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +): bool {} /** * Returns the size of the given file * @link https://php.net/manual/en/function.ftp-size.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $remote_file+ * @param string $filename
* The remote file. *
* @return int the file size on success, or -1 on error. - * @since 4.0 - * @since 5.0 */ -function ftp_size ($ftp_stream, $remote_file) {} +function ftp_size(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): int {} /** * Returns the last modified time of the given file * @link https://php.net/manual/en/function.ftp-mdtm.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $remote_file+ * @param string $filename
* The file from which to extract the last modification time. *
* @return int the last modified time as a Unix timestamp on success, or -1 on * error. - * @since 4.0 - * @since 5.0 */ -function ftp_mdtm ($ftp_stream, $remote_file) {} +function ftp_mdtm(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): int {} /** * Renames a file or a directory on the FTP server * @link https://php.net/manual/en/function.ftp-rename.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $oldname+ * @param string $from
* The old file/directory name. *
- * @param string $newname+ * @param string $to
* The new name. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_rename ($ftp_stream, $oldname, $newname) {} +function ftp_rename(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $from, string $to): bool {} /** * Deletes a file on the FTP server * @link https://php.net/manual/en/function.ftp-delete.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $path+ * @param string $filename
* The file to delete. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_delete ($ftp_stream, $path) {} +function ftp_delete(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $filename): bool {} /** * Sends a SITE command to the server * @link https://php.net/manual/en/function.ftp-site.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param string $command@@ -464,27 +477,23 @@ function ftp_delete ($ftp_stream, $path) {} * be some issues with filenames containing spaces and other characters. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ftp_site ($ftp_stream, $command) {} +function ftp_site(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, string $command): bool {} /** * Closes an FTP connection * @link https://php.net/manual/en/function.ftp-close.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.2 - * @since 5.0 */ -function ftp_close ($ftp_stream) {} +function ftp_close(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {} /** * Set miscellaneous runtime FTP options * @link https://php.net/manual/en/function.ftp-set-option.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param int $option@@ -518,15 +527,13 @@ function ftp_close ($ftp_stream) {} * message will be thrown if the option is not * supported or the passed value doesn't match the * expected value for the given option. - * @since 4.2 - * @since 5.0 */ -function ftp_set_option ($ftp_stream, $option, $value) {} +function ftp_set_option(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, #[EV(flags: [FTP_TIMEOUT_SEC, FTP_AUTOSEEK, FTP_USEPASVADDRESS])] int $option, $value): bool {} /** * Retrieves various runtime behaviours of the current FTP stream * @link https://php.net/manual/en/function.ftp-get-option.php - * @param resource $ftp_stream
+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @param int $option@@ -547,156 +554,188 @@ function ftp_set_option ($ftp_stream, $option, $value) {} * *
+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param resource $handle+ * @param resource $stream
* An open file pointer in which we store the data. *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Optional since PHP 7.3 *
- * @param int $resumepos [optional]The position in the remote file to start downloading from.
+ * @param int $offset [optional]The position in the remote file to start downloading from.
* @return int FTP_FAILED or FTP_FINISHED * or FTP_MOREDATA. - * @since 4.3 - * @since 5.0 */ -function ftp_nb_fget ($ftp_stream, $handle, $remote_file, $mode = FTP_BINARY, $resumepos = 0) {} +#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] +function ftp_nb_fget( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + $stream, + string $remote_filename, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +): int {} /** * Retrieves a file from the FTP server and writes it to a local file (non-blocking) * @link https://php.net/manual/en/function.ftp-nb-get.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $local_file+ * @param string $local_filename
* The local file path (will be overwritten if the file already exists). *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Optional since PHP 7.3 *
- * @param int $resumepos [optional]The position in the remote file to start downloading from.
- * @return int FTP_FAILED or FTP_FINISHED + * @param int $offset [optional]The position in the remote file to start downloading from.
+ * @return int|false FTP_FAILED or FTP_FINISHED * or FTP_MOREDATA. - * @since 4.3 - * @since 5.0 */ -function ftp_nb_get ($ftp_stream, $local_file, $remote_file, $mode = FTP_BINARY, $resumepos = 0) {} +#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] +#[LanguageLevelTypeAware(["8.1" => "int|false"], default: "int")] +function ftp_nb_get( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + string $local_filename, + string $remote_filename, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +) {} /** * Continues retrieving/sending a file (non-blocking) * @link https://php.net/manual/en/function.ftp-nb-continue.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
* @return int FTP_FAILED or FTP_FINISHED * or FTP_MOREDATA. - * @since 4.3 - * @since 5.0 */ -function ftp_nb_continue ($ftp_stream) {} +#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] +function ftp_nb_continue(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): int {} /** * Stores a file on the FTP server (non-blocking) * @link https://php.net/manual/en/function.ftp-nb-put.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param string $local_file+ * @param string $local_filename
* The local file path. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Optional since PHP 7.3 *
- * @param int $startpos [optional]The position in the remote file to start uploading to.
- * @return int FTP_FAILED or FTP_FINISHED + * @param int $offset [optional]The position in the remote file to start uploading to.
+ * @return int|false FTP_FAILED or FTP_FINISHED * or FTP_MOREDATA. - * @since 4.3 - * @since 5.0 */ -function ftp_nb_put ($ftp_stream, $remote_file, $local_file, $mode = FTP_BINARY, $startpos = 0) {} +#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] +function ftp_nb_put( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + string $remote_filename, + string $local_filename, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +): int|false {} /** * Stores a file from an open file to the FTP server (non-blocking) * @link https://php.net/manual/en/function.ftp-nb-fput.php - * @param resource $ftp_stream+ * @param resource $ftp
* The link identifier of the FTP connection. *
- * @param string $remote_file+ * @param string $remote_filename
* The remote file path. *
- * @param resource $handle+ * @param resource $stream
* An open file pointer on the local file. Reading stops at end of file. *
- * @param int $mode [optional]- * The transfer mode. Must be either FTP_ASCII or - * FTP_BINARY. + * @param int $mode
+ * The transfer mode. Must be either FTP_ASCII or FTP_BINARY. Optional since PHP 7.3 *
- * @param int $startpos [optional]The position in the remote file to start uploading to.
+ * @param int $offset [optional]The position in the remote file to start uploading to.
* @return int FTP_FAILED or FTP_FINISHED * or FTP_MOREDATA. - * @since 4.3 - * @since 5.0 */ -function ftp_nb_fput ($ftp_stream, $remote_file, $handle, $mode = FTP_BINARY, $startpos = 0) {} +#[EV([FTP_FAILED, FTP_FINISHED, FTP_MOREDATA])] +function ftp_nb_fput( + #[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp, + string $remote_filename, + $stream, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.2')] + int $mode, + #[EV([FTP_ASCII, FTP_BINARY])] + #[PhpStormStubsElementAvailable(from: '7.3')] + int $mode = FTP_BINARY, + int $offset = 0 +): int {} /** * Alias of ftp_close * @link https://php.net/manual/en/function.ftp-quit.php - * @param $ftp - * @since 4.0 - * @since 5.0 + * @param resource $ftp + * @return bool TRUE on success or FALSE on failure. */ -function ftp_quit ($ftp) {} - +function ftp_quit(#[LanguageLevelTypeAware(['8.1' => 'FTP\Connection'], default: 'resource')] $ftp): bool {} /** * * @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_ASCII', 1); +define('FTP_ASCII', 1); /** * * @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_TEXT', 1); +define('FTP_TEXT', 1); /** * * @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_BINARY', 2); +define('FTP_BINARY', 2); /** * * @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_IMAGE', 2); +define('FTP_IMAGE', 2); /** *@@ -705,7 +744,7 @@ function ftp_quit ($ftp) {} *
* @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_AUTORESUME', -1); +define('FTP_AUTORESUME', -1); /** *@@ -713,7 +752,7 @@ function ftp_quit ($ftp) {} *
* @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_TIMEOUT_SEC', 0); +define('FTP_TIMEOUT_SEC', 0); /** *@@ -721,8 +760,7 @@ function ftp_quit ($ftp) {} *
* @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_AUTOSEEK', 1); - +define('FTP_AUTOSEEK', 1); define('FTP_USEPASVADDRESS', 2); @@ -732,7 +770,7 @@ function ftp_quit ($ftp) {} * * @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_FAILED', 0); +define('FTP_FAILED', 0); /** *@@ -740,7 +778,7 @@ function ftp_quit ($ftp) {} *
* @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_FINISHED', 1); +define('FTP_FINISHED', 1); /** *@@ -748,7 +786,6 @@ function ftp_quit ($ftp) {} *
* @link https://php.net/manual/en/ftp.constants.php */ -define ('FTP_MOREDATA', 2); +define('FTP_MOREDATA', 2); // End of ftp v. -?> diff --git a/gd/GdFont.php b/gd/GdFont.php new file mode 100644 index 000000000..3a8558fbd --- /dev/null +++ b/gd/GdFont.php @@ -0,0 +1,6 @@ + **
points[0] | @@ -1422,23 +1381,27 @@ function imageloadfont ($file) {} *= y1 | *
upper left y-coordinate | * * Returns false on error. - * @since 4.0.7 - * @since 5.0 */ -function imagefttext ($image, $size, $angle, $x, $y, $color, $fontfile, $text, $extrainfo = null ) {} +function imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $extrainfo = null) {} /** * Load a PostScript Type 1 font from file @@ -1948,86 +1909,76 @@ function imagefttext ($image, $size, $angle, $x, $y, $color, $fontfile, $text, $ * @param string $filenameupper right y-coordinate | * * Returns false on error. - * @since 4.0 - * @since 5.0 - * @deprecated 7.0 This function was REMOVED in PHP 7.0.0. + * @removed 7.0 This function was REMOVED in PHP 7.0.0. */ -function imagepstext ($image, $text, $font_index, $size, $foreground, $background, $x, $y, $space = null, $tightness = null, $angle = null, $antialias_steps = null) {} +function imagepstext($image, $text, $font_index, $size, $foreground, $background, $x, $y, $space = null, $tightness = null, $angle = null, $antialias_steps = null) {} /** * Give the bounding box of a text rectangle using PostScript Type1 fonts @@ -2101,7 +2050,7 @@ function imagepstext ($image, $text, $font_index, $size, $foreground, $backgroun * @param string $textlower y-coordinate | * * Returns false on error. - * @since 4.0 - * @since 5.0 - * @deprecated 7.0 This function was REMOVED in PHP 7.0.0. + * @removed 7.0 */ -function imagepsbbox ($text, $font, $size) {} +function imagepsbbox($text, $font, $size) {} /** * Return the image types supported by this PHP build * @link https://php.net/manual/en/function.imagetypes.php * @return int a bit-field corresponding to the image formats supported by the - * version of GD linked into PHP. The following bits are returned, + * version of GD linked into PHP. The following bits are returned, * IMG_BMP | IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM | IMG_WEBP - * @since 4.0.2 - * @since 5.0 */ -function imagetypes () {} +#[Pure] +function imagetypes(): int {} /** * Convert JPEG image file to WBMP image file @@ -2159,11 +2105,11 @@ function imagetypes () {} * Threshold value, between 0 and 8 (inclusive). * * @return bool true on success or false on failure. - * @since 4.0.5 - * @since 5.0 - * @deprecated 7.2 Use imagecreatefromjpeg() and imagewbmp() instead + * @removed 8.0 + * @see imagecreatefromjpeg() */ -function jpeg2wbmp ($jpegname, $wbmpname, $dest_height, $dest_width, $threshold) {} +#[Deprecated(reason: "Use imagecreatefromjpeg() and imagewbmp() instead", since: "7.2")] +function jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold) {} /** * Convert PNG image file to WBMP image file @@ -2184,16 +2130,17 @@ function jpeg2wbmp ($jpegname, $wbmpname, $dest_height, $dest_width, $threshold) * Threshold value, between 0 and 8 (inclusive). * * @return bool true on success or false on failure. - * @since 4.0.5 - * @since 5.0 - * @deprecated 7.2 Use imagecreatefrompng() and imagewbmp() instead + * @removed 8.0 + * @see imagecreatefrompng() + * @see imagewbmp() */ -function png2wbmp ($pngname, $wbmpname, $dest_height, $dest_width, $threshold) {} +#[Deprecated("Use imagecreatefrompng() and imagewbmp() instead", since: "7.2")] +function png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold) {} /** * Output image to browser or file * @link https://php.net/manual/en/function.image2wbmp.php - * @param resource $image + * @param resource|GdImage $image * @param string $filename [optional]Meaning | * * + * *|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
IMG_FLIP_HORIZONTAL | *
@@ -3054,38 +3074,37 @@ function imagecropauto ($image, $mode = -1, $threshold = .5, $color = -1) {}
* @return bool Returns TRUE on success or FALSE on failure.
* @since 5.5
*/
-function imageflip ($image, $mode) {}
+function imageflip(GdImage $image, int $mode): bool {}
/**
* Converts a palette based image to true color
* @link https://secure.php.net/manual/en/function.imagepalettetotruecolor.php
- * @param resource $image + * @param resource|GdImage $image * An image resource, returnd by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. * * @return bool Returns TRUE if the convertion was complete, or if the source image already is a true color image, otherwise FALSE is returned. * @since 5.5 */ -function imagepalettetotruecolor ($image) {} +function imagepalettetotruecolor(GdImage $image): bool {} /** - * @since 5.5 - * Scale an image using the given new width and height - * @link https://secure.php.net/manual/en/function.imagescale.php - * @param resource $image+ * @param resource|GdImage $image * An image resource, returnd by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. * - * @param int $new_width - * @param int $new_height [optional] + * @param int $width + * @param int $height [optional] * @param int $mode [optional] One of IMG_NEAREST_NEIGHBOUR, IMG_BILINEAR_FIXED, IMG_BICUBIC, IMG_BICUBIC_FIXED or anything else (will use two pass). - * @return resource|bool Return scaled image resource on success or FALSE on failure. + * @return resource|GdImage|false Return scaled image resource on success or FALSE on failure. + *@link https://secure.php.net/manual/en/function.imagescale.php + * @since 5.5 + * Scale an image using the given new width and height */ - -function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_FIXED) {} +function imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {} /** * Set the interpolation method * @link https://secure.php.net/manual/en/function.imagesetinterpolation.php - * @param resource $image+ * @param resource|GdImage $image * An image resource, returned by one of the image creation functions, such as {@link https://secure.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}. * * @param int $method@@ -3159,4 +3178,17 @@ function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_ * @return bool Returns TRUE on success or FALSE on failure. * @since 5.5 */ -function imagesetinterpolation ($image, $method = IMG_BILINEAR_FIXED) {} +function imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool {} + +/** + * @since 8.0 + */ +final class GdImage +{ + /** + * You cannot initialize a GdImage object except through helper functions. + */ + private function __construct() {} + + private function __clone() {} +} diff --git a/gearman/gearman.php b/gearman/gearman.php index 5c153b470..bce652125 100644 --- a/gearman/gearman.php +++ b/gearman/gearman.php @@ -804,13 +804,8 @@ */ define('GEARMAN_WORKER_STATE_PRE_SLEEP', 5); - -/** - */ function gearman_version() {} -/** - */ function gearman_bugreport() {} /** @@ -1170,8 +1165,6 @@ function gearman_task_recv_data($task_object, $data_len) {} */ function gearman_worker_return_code($worker_object) {} -/** - */ function gearman_worker_create() {} /** @@ -1326,6 +1319,7 @@ function gearman_job_send_exception($job_object, $exception) {} function gearman_job_send_fail($job_object) {} /** + * Get the job handle * @param $job_object */ function gearman_job_handle($job_object) {} @@ -1350,13 +1344,11 @@ function gearman_job_workload($job_object) {} */ function gearman_job_workload_size($job_object) {} - - /** * Class: GearmanClient - * */ -class GearmanClient { +class GearmanClient +{ /** * Creates a GearmanClient instance representing a client that connects to the job * server and submits tasks to complete. @@ -1389,8 +1381,6 @@ public function error() {} */ public function getErrno() {} - /** - */ public function options() {} /** @@ -1478,8 +1468,6 @@ public function addServer($host = '127.0.0.1', $port = 4730) {} */ public function addServers($servers = '127.0.0.1:4730') {} - /** - */ public function wait() {} /** @@ -1517,12 +1505,12 @@ public function doNormal($function_name, $workload, $unique = null) {} * priority tasks in the job queue. * * @link https://php.net/manual/en/gearmanclient.dolow.php - * @param string $function_name + * @param string $function * @param string $workload - * @param string $unique + * @param string|null $unique * @return string A string representing the results of running a task */ - public function doLow($function_name, $workload, $unique = null) {} + public function doLow($function, $workload, $unique = null) {} /** * Gets that job handle for a running task. This should be used between repeated @@ -1549,12 +1537,12 @@ public function doStatus() {} * the status of the running task. * * @link https://php.net/manual/en/gearmanclient.dobackground.php - * @param string $function_name + * @param string $function * @param string $workload - * @param string $unique + * @param string|null $unique * @return string The job handle for the submitted task */ - public function doBackground($function_name, $workload, $unique = null) {} + public function doBackground($function, $workload, $unique = null) {} /** * Runs a high priority task in the background, returning a job handle which can be @@ -1562,12 +1550,12 @@ public function doBackground($function_name, $workload, $unique = null) {} * over normal and low priority tasks in the job queue. * * @link https://php.net/manual/en/gearmanclient.dohighbackground.php - * @param string $function_name + * @param string $function * @param string $workload - * @param string $unique + * @param string|null $unique * @return string The job handle for the submitted task */ - public function doHighBackground($function_name, $workload, $unique = null) {} + public function doHighBackground($function, $workload, $unique = null) {} /** * Runs a low priority task in the background, returning a job handle which can be @@ -1575,12 +1563,12 @@ public function doHighBackground($function_name, $workload, $unique = null) {} * precedence over low priority tasks in the job queue. * * @link https://php.net/manual/en/gearmanclient.dolowbackground.php - * @param string $function_name + * @param string $function * @param string $workload - * @param string $unique + * @param string|null $unique * @return string The job handle for the submitted task */ - public function doLowBackground($function_name, $workload, $unique = null) {} + public function doLowBackground($function, $workload, $unique = null) {} /** * Object oriented style (method):. @@ -1703,7 +1691,7 @@ public function addTaskStatus($job_handle, $context = null) {} * single argument, a GearmanTask object. * * @link https://php.net/manual/en/gearmanclient.setworkloadcallback.php - * @param callback $callback A function to call + * @param callable $callback A function to call * @return bool */ public function setWorkloadCallback($callback) {} @@ -1723,7 +1711,7 @@ public function setCreatedCallback($callback) {} * function should take a single argument, a GearmanTask object. * * @link https://php.net/manual/en/gearmanclient.setdatacallback.php - * @param callback $callback A function or method to call + * @param callable $callback A function or method to call * @return bool */ public function setDataCallback($callback) {} @@ -1733,7 +1721,7 @@ public function setDataCallback($callback) {} * accept a single argument, a GearmanTask object. * * @link https://php.net/manual/en/gearmanclient.setwarningcallback.php - * @param callback $callback A function to call + * @param callable $callback A function to call * @return bool */ public function setWarningCallback($callback) {} @@ -1743,7 +1731,7 @@ public function setWarningCallback($callback) {} * worker. The function should accept a single argument, a GearmanTask object. * * @link https://php.net/manual/en/gearmanclient.setstatuscallback.php - * @param callback $callback A function to call + * @param callable $callback A function to call * @return bool */ public function setStatusCallback($callback) {} @@ -1753,7 +1741,7 @@ public function setStatusCallback($callback) {} * function should accept a single argument, a GearmanTask oject. * * @link https://php.net/manual/en/gearmanclient.setcompletecallback.php - * @param callback $callback A function to be called + * @param callable $callback A function to be called * @return bool */ public function setCompleteCallback($callback) {} @@ -1762,7 +1750,7 @@ public function setCompleteCallback($callback) {} * Specifies a function to call when a worker for a task sends an exception. * * @link https://php.net/manual/en/gearmanclient.setexceptioncallback.php - * @param callback $callback Function to call when the worker throws an exception + * @param callable $callback Function to call when the worker throws an exception * @return bool */ public function setExceptionCallback($callback) {} @@ -1772,7 +1760,7 @@ public function setExceptionCallback($callback) {} * successfully. The function should accept a single argument, a GearmanTask object. * * @link https://php.net/manual/en/gearmanclient.setfailcallback.php - * @param callback $callback A function to call + * @param callable $callback A function to call * @return bool */ public function setFailCallback($callback) {} @@ -1808,12 +1796,11 @@ public function runTasks() {} public function ping($workload) {} } - /** * Class: GearmanTask - * */ -class GearmanTask { +class GearmanTask +{ /** * Returns the last Gearman return code for this task. * @@ -1920,12 +1907,11 @@ public function dataSize() {} public function recvData($data_len) {} } - /** * Class: GearmanWorker - * */ -class GearmanWorker { +class GearmanWorker +{ /** * Creates a GearmanWorker instance representing a worker that connects to the job * server and accepts tasks to run. @@ -2017,7 +2003,7 @@ public function setTimeout($timeout) {} * the list of available workers. * * @link https://php.net/manual/en/gearmanworker.setid.php - * @param int $id A string identifier + * @param string $id A string identifier * @return bool Returns TRUE on success or FALSE on failure */ public function setId($id) {} @@ -2087,8 +2073,6 @@ public function unregister($function_name) {} */ public function unregisterAll() {} - /** - */ public function grabJob() {} /** @@ -2099,7 +2083,7 @@ public function grabJob() {} * @link https://php.net/manual/en/gearmanworker.addfunction.php * @param string $function_name The name of a function to register with the job * server - * @param callback $function A callback that gets called when a job for the + * @param callable $function A callback that gets called when a job for the * registered function name is submitted * @param mixed $context A reference to arbitrary application context data that can * be modified by the worker function @@ -2117,15 +2101,13 @@ public function addFunction($function_name, $function, $context = null, $timeout * @return bool */ public function work() {} - } - /** * Class: GearmanJob - * */ -class GearmanJob { +class GearmanJob +{ /** * Returns the last return code issued by the job server. * @@ -2138,7 +2120,7 @@ public function returnCode() {} * Sets the return value for this job, indicates how the job completed. * * @link https://php.net/manual/en/gearmanjob.setreturn.php - * @param string $gearman_return_t A valid Gearman return value + * @param int $gearman_return_t A valid Gearman return value * @return bool Description */ public function setReturn($gearman_return_t) {} @@ -2166,9 +2148,9 @@ public function sendWarning($warning) {} * to specify what percentage of the job has been completed. * * @link https://php.net/manual/en/gearmanjob.sendstatus.php - * @param int $numerator The numerator of the precentage completed expressed as a + * @param int $numerator The numerator of the percentage completed expressed as a * fraction - * @param int $denominator The denominator of the precentage completed expressed as + * @param int $denominator The denominator of the percentage completed expressed as * a fraction * @return bool */ @@ -2246,24 +2228,7 @@ public function workload() {} public function workloadSize() {} } - /** * Class: GearmanException - * - * @property-read $ Prop description - * @property-read $ Prop description - * @property-read $ Prop description */ -class GearmanException extends Exception { - /** - * Prop description. - * - * @link https://php.net/manual/en/class.gearmanexception.php#gearmanexception.props.code - * @var $code - */ - public $code; - -} - - -?> +class GearmanException extends Exception {} diff --git a/geoip/geoip.php b/geoip/geoip.php index fa64c3d09..b9a851365 100644 --- a/geoip/geoip.php +++ b/geoip/geoip.php @@ -1,6 +1,7 @@ @@ -11,9 +12,10 @@ * various constants defined with * this extension (ie: GEOIP_*_EDITION). * - * @return string the corresponding database version, or NULL on error. + * @return string|null the corresponding database version, or NULL on error. */ -function geoip_database_info ($database = GEOIP_COUNTRY_EDITION) {} +#[Pure] +function geoip_database_info($database = GEOIP_COUNTRY_EDITION) {} /** * (PECL geoip >= 0.2.0)@@ -25,7 +27,8 @@ function geoip_database_info ($database = GEOIP_COUNTRY_EDITION) {} * @return string|false the two letter ISO country code on success, or FALSE * if the address cannot be found in the database. */ -function geoip_country_code_by_name ($hostname) {} +#[Pure] +function geoip_country_code_by_name($hostname) {} /** * (PECL geoip >= 0.2.0) @@ -37,7 +40,8 @@ function geoip_country_code_by_name ($hostname) {} * @return string|false the three letter country code on success, or FALSE * if the address cannot be found in the database. */ -function geoip_country_code3_by_name ($hostname) {} +#[Pure] +function geoip_country_code3_by_name($hostname) {} /** * (PECL geoip >= 0.2.0) @@ -49,7 +53,8 @@ function geoip_country_code3_by_name ($hostname) {} * @return string|false the country name on success, or FALSE if the address cannot * be found in the database. */ -function geoip_country_name_by_name ($hostname) {} +#[Pure] +function geoip_country_name_by_name($hostname) {} /** * (PECL geoip >= 1.0.3) @@ -61,7 +66,8 @@ function geoip_country_name_by_name ($hostname) {} * @return string|false the two letter continent code on success, or FALSE if the * address cannot be found in the database. */ -function geoip_continent_code_by_name ($hostname) {} +#[Pure] +function geoip_continent_code_by_name($hostname) {} /** * (PECL geoip >= 0.2.0) @@ -73,7 +79,8 @@ function geoip_continent_code_by_name ($hostname) {} * @return string|false the organization name on success, or FALSE if the address * cannot be found in the database. */ -function geoip_org_by_name ($hostname) {} +#[Pure] +function geoip_org_by_name($hostname) {} /** * (PECL geoip >= 0.2.0) @@ -85,7 +92,8 @@ function geoip_org_by_name ($hostname) {} * @return array|false the associative array on success, or FALSE if the address * cannot be found in the database. */ -function geoip_record_by_name ($hostname) {} +#[Pure] +function geoip_record_by_name($hostname) {} /** * (PECL geoip >= 0.2.0) @@ -96,7 +104,8 @@ function geoip_record_by_name ($hostname) {} * * @return int the connection type. */ -function geoip_id_by_name ($hostname) {} +#[Pure] +function geoip_id_by_name($hostname) {} /** * (PECL geoip >= 0.2.0) @@ -108,7 +117,8 @@ function geoip_id_by_name ($hostname) {} * @return array|false the associative array on success, or FALSE if the address * cannot be found in the database. */ -function geoip_region_by_name ($hostname) {} +#[Pure] +function geoip_region_by_name($hostname) {} /** * (PECL geoip >= 1.0.2) @@ -120,7 +130,8 @@ function geoip_region_by_name ($hostname) {} * @return string|false the ISP name on success, or FALSE if the address * cannot be found in the database. */ -function geoip_isp_by_name ($hostname) {} +#[Pure] +function geoip_isp_by_name($hostname) {} /** * (PECL geoip >= 1.0.1) @@ -133,7 +144,8 @@ function geoip_isp_by_name ($hostname) {} * * @return bool|null TRUE is database exists, FALSE if not found, or NULL on error. */ -function geoip_db_avail ($database) {} +#[Pure] +function geoip_db_avail($database) {} /** * (PECL geoip >= 1.0.1) @@ -141,7 +153,8 @@ function geoip_db_avail ($database) {} * @link https://php.net/manual/en/function.geoip-db-get-all-info.php * @return array the associative array. */ -function geoip_db_get_all_info () {} +#[Pure] +function geoip_db_get_all_info() {} /** * (PECL geoip >= 1.0.1) @@ -152,9 +165,10 @@ function geoip_db_get_all_info () {} * various constants defined with * this extension (ie: GEOIP_*_EDITION). * - * @return string the filename of the corresponding database, or NULL on error. + * @return string|null the filename of the corresponding database, or NULL on error. */ -function geoip_db_filename ($database) {} +#[Pure] +function geoip_db_filename($database) {} /** * (PECL geoip >= 1.0.4) @@ -171,7 +185,8 @@ function geoip_db_filename ($database) {} * @return string|false the region name on success, or FALSE if the country and region code * combo cannot be found. */ -function geoip_region_name_by_code ($country_code, $region_code) {} +#[Pure] +function geoip_region_name_by_code($country_code, $region_code) {} /** * (PECL geoip >= 1.0.4) @@ -188,23 +203,24 @@ function geoip_region_name_by_code ($country_code, $region_code) {} * @return string|false the time zone on success, or FALSE if the country and region code * combo cannot be found. */ -function geoip_time_zone_by_country_and_region ($country_code, $region_code = null) {} +#[Pure] +function geoip_time_zone_by_country_and_region($country_code, $region_code = null) {} -define ('GEOIP_COUNTRY_EDITION', 1); -define ('GEOIP_REGION_EDITION_REV0', 7); -define ('GEOIP_CITY_EDITION_REV0', 6); -define ('GEOIP_ORG_EDITION', 5); -define ('GEOIP_ISP_EDITION', 4); -define ('GEOIP_CITY_EDITION_REV1', 2); -define ('GEOIP_REGION_EDITION_REV1', 3); -define ('GEOIP_PROXY_EDITION', 8); -define ('GEOIP_ASNUM_EDITION', 9); -define ('GEOIP_NETSPEED_EDITION', 10); -define ('GEOIP_DOMAIN_EDITION', 11); -define ('GEOIP_UNKNOWN_SPEED', 0); -define ('GEOIP_DIALUP_SPEED', 1); -define ('GEOIP_CABLEDSL_SPEED', 2); -define ('GEOIP_CORPORATE_SPEED', 3); +define('GEOIP_COUNTRY_EDITION', 1); +define('GEOIP_REGION_EDITION_REV0', 7); +define('GEOIP_CITY_EDITION_REV0', 6); +define('GEOIP_ORG_EDITION', 5); +define('GEOIP_ISP_EDITION', 4); +define('GEOIP_CITY_EDITION_REV1', 2); +define('GEOIP_REGION_EDITION_REV1', 3); +define('GEOIP_PROXY_EDITION', 8); +define('GEOIP_ASNUM_EDITION', 9); +define('GEOIP_NETSPEED_EDITION', 10); +define('GEOIP_DOMAIN_EDITION', 11); +define('GEOIP_UNKNOWN_SPEED', 0); +define('GEOIP_DIALUP_SPEED', 1); +define('GEOIP_CABLEDSL_SPEED', 2); +define('GEOIP_CORPORATE_SPEED', 3); /** * (PECL geoip >= 1.1.0) @@ -217,7 +233,7 @@ function geoip_time_zone_by_country_and_region ($country_code, $region_code = nu * @return string|false Returns the ASN on success, or FALSE if the address cannot be found in the database. * @since 1.1.0 */ -function geoip_asnum_by_name ($hostname) {} +function geoip_asnum_by_name($hostname) {} /** * (PECL geoip >= 1.1.0) @@ -226,7 +242,7 @@ function geoip_asnum_by_name ($hostname) {} * * This function is only available if using GeoIP Library version 1.4.8 or newer. * - * This function is currently only available to users who have bought a commercial GeoIP NetSpeedCell Edition. A warning will be issued if the proper database cannot be located. + * This function is currently only available to users who have bought a commercial GeoIP NetSpeedCell Edition. A warning will be issued if the proper database cannot be located. * * The return value is a string, common values are: * - Cable/DSL @@ -240,7 +256,7 @@ function geoip_asnum_by_name ($hostname) {} * @return string|false Returns the connection speed on success, or FALSE if the address cannot be found in the database. * @since 1.1.0 */ -function geoip_netspeedcell_by_name ($hostname) {} +function geoip_netspeedcell_by_name($hostname) {} /** * (PECL geoip >= 1.1.0) @@ -253,6 +269,6 @@ function geoip_netspeedcell_by_name ($hostname) {} * @return void * @since 1.1.0 */ -function geoip_setup_custom_directory ($path) {} +function geoip_setup_custom_directory($path) {} -// End of geoip v.1.1.0 \ No newline at end of file +// End of geoip v.1.1.0 diff --git a/geos/geos.php b/geos/geos.php index 657bd8f4b..8050ed89f 100644 --- a/geos/geos.php +++ b/geos/geos.php @@ -3,7 +3,6 @@ /** * @see https://github.com/libgeos/php-geos/blob/master/tests/000_General.phpt */ - define('GEOSBUF_CAP_ROUND', 1); define('GEOSBUF_CAP_FLAT', 2); @@ -101,7 +100,6 @@ function GEOSPolygonize(GEOSGeometry $geom): array {} */ class GEOSWKTReader { - /** * GEOSWKTReader constructor. */ @@ -113,7 +111,6 @@ public function __construct() {} * @throws Exception */ public function read(string $wkt): GEOSGeometry {} - } /** @@ -122,7 +119,6 @@ public function read(string $wkt): GEOSGeometry {} */ class GEOSWKTWriter { - /** * GEOSWKTWriter constructor. */ @@ -160,7 +156,6 @@ public function getOutputDimension(): int {} * @param bool $old3d */ public function setOld3D(bool $old3d): void {} - } /** @@ -169,7 +164,6 @@ public function setOld3D(bool $old3d): void {} */ class GEOSGeometry { - /** * GEOSGeometry constructor. */ @@ -652,7 +646,6 @@ public function voronoiDiagram(float $tolerance = 0.0, bool $onlyEdges = false, * @throws Exception */ public function clipByRect(float $xmin, float $ymin, float $xmax, float $ymax): GEOSGeometry {} - } /** @@ -661,7 +654,6 @@ public function clipByRect(float $xmin, float $ymin, float $xmax, float $ymax): */ class GEOSWKBWriter { - /** * GEOSWKBWriter constructor. */ @@ -713,7 +705,6 @@ public function write(GEOSGeometry $geom): string {} * @throws Exception */ public function writeHEX(GEOSGeometry $geom): string {} - } /** @@ -722,7 +713,6 @@ public function writeHEX(GEOSGeometry $geom): string {} */ class GEOSWKBReader { - /** * GEOSWKBReader constructor. */ @@ -741,5 +731,4 @@ public function read(string $wkb): GEOSGeometry {} * @throws Exception */ public function readHEX(string $wkb): GEOSGeometry {} - } diff --git a/gettext/gettext.php b/gettext/gettext.php index 6a68a46d8..8e79d3961 100644 --- a/gettext/gettext.php +++ b/gettext/gettext.php @@ -1,20 +1,20 @@ + * @param string|null $domain * The new message domain, or NULL to get the current setting without * changing it * * @return string If successful, this function returns the current message * domain, after possibly changing it. - * @since 4.0 - * @since 5.0 */ -function textdomain ($text_domain) {} +function textdomain(?string $domain): string {} /** * Lookup a message in the current domain @@ -24,10 +24,9 @@ function textdomain ($text_domain) {} * * @return string a translated string if one is found in the * translation table, or the submitted message if not found. - * @since 4.0 - * @since 5.0 */ -function gettext ($message) {} +#[Pure] +function _(string $message): string {} /** * Lookup a message in the current domain @@ -37,10 +36,9 @@ function gettext ($message) {} * * @return string a translated string if one is found in the * translation table, or the submitted message if not found. - * @since 4.0 - * @since 5.0 */ -function _ ($message) {} +#[Pure] +function gettext(string $message): string {} /** * Override the current domain @@ -52,10 +50,8 @@ function _ ($message) {} * The message * * @return string A string on success. - * @since 4.0 - * @since 5.0 */ -function dgettext ($domain, $message) {} +function dgettext(string $domain, string $message): string {} /** * Overrides the domain for a single lookup @@ -70,10 +66,8 @@ function dgettext ($domain, $message) {} * The category * * @return string A string on success. - * @since 4.0 - * @since 5.0 */ -function dcgettext ($domain, $message, $category) {} +function dcgettext(string $domain, string $message, int $category): string {} /** * Sets the path for a domain @@ -81,28 +75,25 @@ function dcgettext ($domain, $message, $category) {} * @param string $domain* The domain * - * @param string $directory- * The directory path + * @param string|null $directory + * The directory path. Since PHP 8.0.3 directory is nullable. If null is passed, the currently set directory is returned. * - * @return string The full pathname for the domain currently being set. - * @since 4.0 - * @since 5.0 + * @return string|false The full pathname for the domain currently being set. */ -function bindtextdomain ($domain, $directory) {} +function bindtextdomain(string $domain, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $directory): string|false {} /** * Plural version of gettext * @link https://php.net/manual/en/function.ngettext.php - * @param string $msgid1 - * @param string $msgid2 - * @param int $n + * @param string $singular + * @param string $plural + * @param int $count * @return string correct plural form of message identified by * msgid1 and msgid2 * for count n. - * @since 4.2 - * @since 5.0 */ -function ngettext ($msgid1, $msgid2, $n) {} +#[Pure] +function ngettext(string $singular, string $plural, int $count): string {} /** * Plural version of dgettext @@ -110,14 +101,13 @@ function ngettext ($msgid1, $msgid2, $n) {} * @param string $domain* The domain * - * @param string $msgid1 - * @param string $msgid2 - * @param int $n + * @param string $singular + * @param string $plural + * @param int $count * @return string A string on success. - * @since 4.2 - * @since 5.0 */ -function dngettext ($domain, $msgid1, $msgid2, $n) {} +#[Pure] +function dngettext(string $domain, string $singular, string $plural, int $count): string {} /** * Plural version of dcgettext @@ -125,15 +115,14 @@ function dngettext ($domain, $msgid1, $msgid2, $n) {} * @param string $domain* The domain * - * @param string $msgid1 - * @param string $msgid2 - * @param int $n + * @param string $singular + * @param string $plural + * @param int $count * @param int $category * @return string A string on success. - * @since 4.2 - * @since 5.0 */ -function dcngettext ($domain, $msgid1, $msgid2, $n, $category) {} +#[Pure] +function dcngettext(string $domain, string $singular, string $plural, int $count, int $category): string {} /** * Specify the character encoding in which the messages from the DOMAIN message catalog will be returned @@ -141,14 +130,11 @@ function dcngettext ($domain, $msgid1, $msgid2, $n, $category) {} * @param string $domain* The domain * - * @param string $codeset- * The code set + * @param string|null $codeset + * The code set. Since 8.0.3 is nullable. If null is passed, the currently set encoding is returned. * - * @return string A string on success. - * @since 4.2 - * @since 5.0 + * @return string|false A string on success. */ -function bind_textdomain_codeset ($domain, $codeset) {} +function bind_textdomain_codeset(string $domain, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $codeset): string|false {} // End of gettext v. -?> diff --git a/gmagick/gmagick.php b/gmagick/gmagick.php index b94b5ef4b..9431e34e6 100644 --- a/gmagick/gmagick.php +++ b/gmagick/gmagick.php @@ -1,329 +1,299 @@ + * @param mixed $num* An integer or a string. The string representation can be decimal, * hexadecimal or octal. * @@ -20,122 +23,116 @@ * octal is assumed, otherwise decimal is assumed. * * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_init ($number, $base = 0) {} +#[Pure] +function gmp_init(string|int $num, int $base = 0): GMP {} /** * Convert GMP number to integer * @link https://php.net/manual/en/function.gmp-intval.php - * @param resource|string|GMP $gmpnumber+ * @param resource|int|string|GMP $num * A GMP number. * * @return int An integer value of gmpnumber. - * @since 4.0.4 - * @since 5.0 */ -function gmp_intval ($gmpnumber) {} +#[Pure] +function gmp_intval(GMP|string|int $num): int {} /** * Sets the RNG seed - * @param resource|string|GMP $seed+ * @param resource|string|int|GMP $seed * The seed to be set for the {@see gmp_random()}, {@see gmp_random_bits()}, and {@see gmp_random_range()} functions. * * Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. - * @return mixed Returns NULL on success. + * @return void|null|false Returns NULL on success. * @since 7.0 */ -function gmp_random_seed ($seed ) {} +function gmp_random_seed(GMP|string|int $seed): void {} /** * Convert GMP number to string * @link https://php.net/manual/en/function.gmp-strval.php - * @param resource|string|GMP $gmpnumber+ * @param resource|int|string|GMP $num * The GMP number that will be converted to a string. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @param int $base [optional]* The base of the returned number. The default base is 10. * Allowed values for the base are from 2 to 62 and -2 to -36. * * @return string The number, as a string. - * @since 4.0.4 - * @since 5.0 */ -function gmp_strval ($gmpnumber, $base = 10) {} +#[Pure] +function gmp_strval(GMP|string|int $num, int $base = 10): string {} /** * Add numbers * @link https://php.net/manual/en/function.gmp-add.php - * @param resource|string|GMP $a+ * @param resource|int|string|GMP $num1 * A number that will be added. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b+ * @param resource|string|GMP $num2 * A number that will be added. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number representing the sum of the arguments. - * @since 4.0.4 - * @since 5.0 */ -function gmp_add ($a, $b) {} +#[Pure] +function gmp_add(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Subtract numbers * @link https://php.net/manual/en/function.gmp-sub.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num1 * The number being subtracted from. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b+ * @param resource|string|GMP $num2 * The number subtracted from a. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_sub ($a, $b) {} +#[Pure] +function gmp_sub(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Multiply numbers * @link https://php.net/manual/en/function.gmp-mul.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num1 * A number that will be multiplied by b. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b+ * @param resource|string|GMP $num2 * A number that will be multiplied by a. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_mul ($a, $b) {} +#[Pure] +function gmp_mul(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Divide numbers and get quotient and remainder * @link https://php.net/manual/en/function.gmp-div-qr.php - * @param resource|string|GMP $n+ * @param resource|string|GMP $num1 * The number being divided. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $d+ * @param resource|string|GMP $num2 * The number that n is being divided by. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param int $round [optional]+ * @param int $rounding_mode [optional] * See the gmp_div_q function for description * of the round argument. * @@ -143,264 +140,249 @@ function gmp_mul ($a, $b) {} * element being [n/d] (the integer result of the * division) and the second being (n - [n/d] * d) * (the remainder of the division). - * @since 4.0.4 - * @since 5.0 */ -function gmp_div_qr ($n, $d, $round = GMP_ROUND_ZERO) {} +#[Pure] +function gmp_div_qr(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): array {} /** * Divide numbers * @link https://php.net/manual/en/function.gmp-div-q.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num1 * The number being divided. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b+ * @param resource|string|GMP $num2 * The number that a is being divided by. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param int $round [optional]+ * @param int $rounding_mode [optional] * The result rounding is defined by the * round, which can have the following * values: * GMP_ROUND_ZERO: The result is truncated - * towards 0. + * towards 0. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_div_q ($a, $b, $round = GMP_ROUND_ZERO) {} +#[Pure] +function gmp_div_q(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {} /** * Remainder of the division of numbers * @link https://php.net/manual/en/function.gmp-div-r.php - * @param resource|string|GMP $n+ * @param resource|string|GMP $num1 * The number being divided. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $d+ * @param resource|string|GMP $num2 * The number that n is being divided by. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param int $round [optional]+ * @param int $rounding_mode [optional] * See the gmp_div_q function for description * of the round argument. * * @return resource|GMP The remainder, as a GMP number. - * @since 4.0.4 - * @since 5.0 */ -function gmp_div_r ($n, $d, $round = GMP_ROUND_ZERO) {} +#[Pure] +function gmp_div_r(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {} /** * Divide numbers * @link https://php.net/manual/en/function.gmp-div-q.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num1 * The number being divided. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b+ * @param resource|string|GMP $num2 * The number that a is being divided by. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param int $round [optional]+ * @param int $rounding_mode [optional] * The result rounding is defined by the * round, which can have the following * values: * GMP_ROUND_ZERO: The result is truncated - * towards 0. + * towards 0. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_div ($a, $b, $round = GMP_ROUND_ZERO) {} +#[Pure] +function gmp_div(GMP|string|int $num1, GMP|string|int $num2, int $rounding_mode = GMP_ROUND_ZERO): GMP {} /** * Modulo operation * @link https://php.net/manual/en/function.gmp-mod.php - * @param resource|string|GMP $n It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $d+ * @param resource|string|GMP $num2 * The modulo that is being evaluated. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_mod ($n, $d) {} +#[Pure] +function gmp_mod(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Exact division of numbers * @link https://php.net/manual/en/function.gmp-divexact.php - * @param resource|string|GMP $n+ * @param resource|string|GMP $num1 * The number being divided. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $d+ * @param resource|string|GMP $num2 * The number that a is being divided by. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_divexact ($n, $d) {} +#[Pure] +function gmp_divexact(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Negate number * @link https://php.net/manual/en/function.gmp-neg.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP -a, as a GMP number. - * @since 4.0.4 - * @since 5.0 */ -function gmp_neg ($a) {} +#[Pure] +function gmp_neg(GMP|string|int $num): GMP {} /** * Absolute value * @link https://php.net/manual/en/function.gmp-abs.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP the absolute value of a, as a GMP number. - * @since 4.0.4 - * @since 5.0 */ -function gmp_abs ($a) {} +#[Pure] +function gmp_abs(GMP|string|int $num): GMP {} /** * Factorial * @link https://php.net/manual/en/function.gmp-fact.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num * The factorial number. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_fact ($a) {} +#[Pure] +function gmp_fact(GMP|string|int $num): GMP {} /** * Calculate square root * @link https://php.net/manual/en/function.gmp-sqrt.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP The integer portion of the square root, as a GMP number. - * @since 4.0.4 - * @since 5.0 */ -function gmp_sqrt ($a) {} +#[Pure] +function gmp_sqrt(GMP|string|int $num): GMP {} /** * Square root with remainder * @link https://php.net/manual/en/function.gmp-sqrtrem.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num * The number being square rooted. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return array array where first element is the integer square root of * a and the second is the remainder * (i.e., the difference between a and the * first element squared). - * @since 4.0.4 - * @since 5.0 */ -function gmp_sqrtrem ($a) {} +#[Pure] +function gmp_sqrtrem(GMP|string|int $num): array {} /** * Raise number into power * @link https://php.net/manual/en/function.gmp-pow.php - * @param resource|string|GMP $base+ * @param resource|string|GMP $num * The base number. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param int $exp+ * @param positive-int $exponent * The positive power to raise the base. * * @return resource|GMP The new (raised) number, as a GMP number. The case of * 0^0 yields 1. - * @since 4.0.4 - * @since 5.0 */ -function gmp_pow ($base, $exp) {} +#[Pure] +function gmp_pow(GMP|string|int $num, int $exponent): GMP {} /** * Raise number into power with modulo * @link https://php.net/manual/en/function.gmp-powm.php - * @param resource|string|GMP $base+ * @param resource|string|GMP $num * The base number. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $exp+ * @param resource|string|GMP $exponent * The positive power to raise the base. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $mod+ * @param resource|string|GMP $modulus * The modulo. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP The new (raised) number, as a GMP number. - * @since 4.0.4 - * @since 5.0 */ -function gmp_powm ($base, $exp, $mod) {} +#[Pure] +function gmp_powm(GMP|string|int $num, GMP|string|int $exponent, GMP|string|int $modulus): GMP {} /** * Perfect square check * @link https://php.net/manual/en/function.gmp-perfect-square.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num * The number being checked as a perfect square. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return bool TRUE if a is a perfect square, * FALSE otherwise. - * @since 4.0.4 - * @since 5.0 */ -function gmp_perfect_square ($a) {} +#[Pure] +function gmp_perfect_square(GMP|string|int $num): bool {} /** * Check if number is "probably prime" * @link https://php.net/manual/en/function.gmp-prob-prime.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num * The number being checked as a prime. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param int $reps [optional]+ * @param int $repetitions [optional] * Reasonable values * of reps vary from 5 to 10 (default being * 10); a higher value lowers the probability for a non-prime to * pass as a "probable" prime. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return int If this function returns 0, a is * definitely not prime. If it returns 1, then * a is "probably" prime. If it returns 2, * then a is surely prime. - * @since 4.0.4 - * @since 5.0 */ -function gmp_prob_prime ($a, $reps = 10) {} +#[Pure] +function gmp_prob_prime(GMP|string|int $num, int $repetitions = 10): int {} /** * Random number @@ -410,116 +392,110 @@ function gmp_prob_prime ($a, $reps = 10) {} * or a numeric string provided that it is possible to convert the latter to a number. * @return GMP A random GMP number. */ -function gmp_random_bits($bits) {} +function gmp_random_bits(int $bits): GMP {} /** * Random number * @link https://php.net/manual/en/function.gmp-random-range.php - * @param GMP $minA GMP number representing the lower bound for the random number - * @param GMP $maxA GMP number representing the upper bound for the random number + * @param GMP|string|int $minA GMP number representing the lower bound for the random number + * @param GMP|string|int $maxA GMP number representing the upper bound for the random number * @return GMP A random GMP number. */ -function gmp_random_range(GMP $min, GMP $max) {} +function gmp_random_range(GMP|string|int $min, GMP|string|int $max): GMP {} /** * Calculate GCD * @link https://php.net/manual/en/function.gmp-gcd.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A positive GMP number that divides into both * a and b. - * @since 4.0.4 - * @since 5.0 */ -function gmp_gcd ($a, $b) {} +#[Pure] +function gmp_gcd(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Calculate GCD and multipliers * @link https://php.net/manual/en/function.gmp-gcdext.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return array An array of GMP numbers. - * @since 4.0.4 - * @since 5.0 */ -function gmp_gcdext ($a, $b) {} +#[Pure] +#[ArrayShape(["g" => "mixed", "s" => "mixed", "t" => "mixed"])] +function gmp_gcdext(GMP|string|int $num1, GMP|string|int $num2): array {} /** * Inverse by modulo * @link https://php.net/manual/en/function.gmp-invert.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @return resource|GMP A GMP number on success or FALSE if an inverse does not exist. - * @since 4.0.4 - * @since 5.0 + * @return resource|GMP|false A GMP number on success or FALSE if an inverse does not exist. */ -function gmp_invert ($a, $b) {} +#[Pure] +function gmp_invert(GMP|string|int $num1, GMP|string|int $num2): GMP|false {} /** * Jacobi symbol * @link https://php.net/manual/en/function.gmp-jacobi.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $p It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. ** Should be odd and must be positive. * * @return int A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_jacobi ($a, $p) {} +#[Pure] +function gmp_jacobi(GMP|string|int $num1, GMP|string|int $num2): int {} /** * Legendre symbol * @link https://php.net/manual/en/function.gmp-legendre.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $p It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. ** Should be odd and must be positive. * * @return int A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_legendre ($a, $p) {} +#[Pure] +function gmp_legendre(GMP|string|int $num1, GMP|string|int $num2): int {} /** * Compare numbers * @link https://php.net/manual/en/function.gmp-cmp.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return int a positive value if a > b, zero if * a = b and a negative value if a < * b. - * @since 4.0.4 - * @since 5.0 */ -function gmp_cmp ($a, $b) {} +#[Pure] +function gmp_cmp(GMP|string|int $num1, GMP|string|int $num2): int {} /** * Sign of number * @link https://php.net/manual/en/function.gmp-sign.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return int 1 if a is positive, * -1 if a is negative, * and 0 if a is zero. - * @since 4.0.4 - * @since 5.0 */ -function gmp_sign ($a) {} +#[Pure] +function gmp_sign(GMP|string|int $num): int {} /** * Random number @@ -527,271 +503,327 @@ function gmp_sign ($a) {} * @param int $limiter [optional]* The limiter. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A random GMP number. - * @since 4.0.4 - * @since 5.0 - * @deprecated 7.2 Use {@see gmp_random_bits()} or {@see gmp_random_range()} instead. + * @see gmp_random_bits() + * @see gmp_random_range() + * @removed 8.0 */ -function gmp_random ($limiter = 20) {} +#[Deprecated(reason: "Use see gmp_random_bits() or see gmp_random_range() instead", since: "7.2")] +function gmp_random($limiter = 20) {} /** * Bitwise AND * @link https://php.net/manual/en/function.gmp-and.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number representing the bitwise AND comparison. - * @since 4.0.4 - * @since 5.0 */ -function gmp_and ($a, $b) {} +#[Pure] +function gmp_and(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Bitwise OR * @link https://php.net/manual/en/function.gmp-or.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_or ($a, $b) {} +#[Pure] +function gmp_or(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Calculates one's complement * @link https://php.net/manual/en/function.gmp-com.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP the one's complement of a, as a GMP number. - * @since 4.0.4 - * @since 5.0 */ -function gmp_com ($a) {} +#[Pure] +function gmp_com(GMP|string|int $num): GMP {} /** * Bitwise XOR * @link https://php.net/manual/en/function.gmp-xor.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return resource|GMP A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_xor ($a, $b) {} +#[Pure] +function gmp_xor(GMP|string|int $num1, GMP|string|int $num2): GMP {} /** * Set bit * @link https://php.net/manual/en/function.gmp-setbit.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num * The number being set to. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @param int $index* The set bit. * - * @param bool $set_clear [optional]+ * @param bool $value [optional] * Defines if the bit is set to 0 or 1. By default the bit is set to * 1. Index starts at 0. * * @return void A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_setbit (&$a, $index, $set_clear = true) {} +function gmp_setbit(GMP $num, int $index, bool $value = true): void {} /** * Clear bit * @link https://php.net/manual/en/function.gmp-clrbit.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @param int $index It can be either a GMP number resource, or a + * @param int $indexIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return void A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_clrbit (&$a, $index) {} +function gmp_clrbit(GMP $num, int $index): void {} /** * Scan for 0 * @link https://php.net/manual/en/function.gmp-scan0.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num1 * The number to scan. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @param int $start* The starting bit. * * @return int the index of the found bit, as an integer. The * index starts from 0. - * @since 4.0.4 - * @since 5.0 */ -function gmp_scan0 ($a, $start) {} +#[Pure] +function gmp_scan0(GMP|string|int $num1, int $start): int {} /** * Scan for 1 * @link https://php.net/manual/en/function.gmp-scan1.php - * @param resource|string|GMP $a+ * @param resource|string|GMP $num1 * The number to scan. * - * It can be either a GMP number resource, or a + *It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @param int $start* The starting bit. * * @return int the index of the found bit, as an integer. * If no set bit is found, -1 is returned. - * @since 4.0.4 - * @since 5.0 */ -function gmp_scan1 ($a, $start) {} +#[Pure] +function gmp_scan1(GMP|string|int $num1, int $start): int {} /** * Tests if a bit is set * @link https://php.net/manual/en/function.gmp-testbit.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @param int $index* The bit to test * * @return bool TRUE on success or FALSE on failure. - * @since 5.3 */ -function gmp_testbit ($a, $index) {} +#[Pure] +function gmp_testbit(GMP|string|int $num, int $index): bool {} /** * Population count * @link https://php.net/manual/en/function.gmp-popcount.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. * @return int The population count of a, as an integer. - * @since 4.0.4 - * @since 5.0 */ -function gmp_popcount ($a) {} +#[Pure] +function gmp_popcount(GMP|string|int $num): int {} /** * Hamming distance * @link https://php.net/manual/en/function.gmp-hamdist.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param resource|string|GMP $num1It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. ** It should be positive. * - * @param resource|string|GMP $b It can be either a GMP number resource, or a + * @param resource|string|GMP $num2It can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. ** It should be positive. * * @return int A GMP number resource. - * @since 4.0.4 - * @since 5.0 */ -function gmp_hamdist ($a, $b) {} +#[Pure] +function gmp_hamdist(GMP|string|int $num1, GMP|string|int $num2): int {} /** * Import from a binary string * @link https://php.net/manual/en/function.gmp-import.php * @param string $data The binary string being imported - * @param integer $word_size Default value is 1. The number of bytes in each chunk of binary + * @param int $word_sizeDefault value is 1. The number of bytes in each chunk of binary * data. This is mainly used in conjunction with the options parameter. - * @param integer $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. + * @param int $flags Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. * @return GMP|false Returns a GMP number or FALSE on failure. * @since 5.6.1 */ -function gmp_import ($data, $word_size = 1, $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) {} +#[Pure] +function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): GMP {} /** * Export to a binary string * @link https://php.net/manual/en/function.gmp-export.php - * @param GMP $gmpnumber The GMP number being exported - * @param integer $word_size Default value is 1. The number of bytes in each chunk of binary + * @param GMP|string|int $num The GMP number being exported + * @param int $word_sizeDefault value is 1. The number of bytes in each chunk of binary * data. This is mainly used in conjunction with the options parameter. - * @param integer $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. + * @param int $flags Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. * @return string|false Returns a string or FALSE on failure. * @since 5.6.1 */ -function gmp_export (GMP $gmpnumber, $word_size = 1, $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN) {} +#[Pure] +function gmp_export(GMP|string|int $num, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): string {} /** * Takes the nth root of a and returns the integer component of the result. * @link https://php.net/manual/en/function.gmp-root.php - * @param GMP $a Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 + * @param GMP|string|int $numEither a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 * and later, or a numeric string provided that it is possible to convert the latter to a number. - * @param integer $nth The positive root to take of a. + * @param positive-int $nth The positive root to take of a num. * @return GMP The integer component of the resultant root, as a GMP number. * @since 5.6 */ -function gmp_root (GMP $a, $nth) {} +#[Pure] +function gmp_root(GMP|string|int $num, int $nth): GMP {} /** * Takes the nth root of a and returns the integer component and remainder of the result. * @link https://php.net/manual/en/function.gmp-rootrem.php - * @param GMP $a Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 + * @param GMP|string|int $numEither a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 * and later, or a numeric string provided that it is possible to convert the latter to a number. - * @param integer $nth The positive root to take of a. - * @return array|GMP[] A two element array, where the first element is the integer component of + * @param positive-int $nth The positive root to take of a num. + * @return array|GMP[]A two element array, where the first element is the integer component of * the root, and the second element is the remainder, both represented as GMP numbers. * @since 5.6 */ -function gmp_rootrem (GMP $a, $nth) {} +#[Pure] +function gmp_rootrem(GMP|string|int $num, int $nth): array {} /** * Find next prime number * @link https://php.net/manual/en/function.gmp-nextprime.php - * @param resource|string|GMP $a It can be either a GMP number resource, or a + * @param int|resource|string|GMP $numIt can be either a GMP number resource, or a * numeric string given that it is possible to convert the latter to a number. - * @return resource Return the next prime number greater than a, + * @return resource|GMP Return the next prime number greater than a, * as a GMP number. - * @since 5.2 */ -function gmp_nextprime ($a) {} - -define ('GMP_ROUND_ZERO', 0); -define ('GMP_ROUND_PLUSINF', 1); -define ('GMP_ROUND_MINUSINF', 2); -define ('GMP_MSW_FIRST', 1); -define ('GMP_LSW_FIRST', 2); -define ('GMP_LITTLE_ENDIAN', 4); -define ('GMP_BIG_ENDIAN', 8); -define ('GMP_NATIVE_ENDIAN', 16); +#[Pure] +function gmp_nextprime(GMP|string|int $num): GMP {} + +/** + * Calculates binomial coefficient + * + * @link https://www.php.net/manual/en/function.gmp-binomial.php + * + * @param GMP|string|float|int $n + * @param int $k + * @return GMP|false + * + * @since 7.3 + */ +#[Pure] +function gmp_binomial(GMP|string|int $n, int $k): GMP {} + +/** + * Computes the Kronecker symbol + * + * @link https://www.php.net/manual/en/function.gmp-kronecker.php + * + * @param GMP|string|float|int $num1 + * @param GMP|string|float|int $num2 + * @return int + * + * @since 7.3 + */ +#[Pure] +function gmp_kronecker(GMP|string|int $num1, GMP|string|int $num2): int {} + +/** + * Computes the least common multiple of A and B + * + * @link https://www.php.net/manual/en/function.gmp-lcm.php + * + * @param GMP|string|float|int $num1 + * @param GMP|string|float|int $num2 + * @return GMP + * + * @since 7.3 + */ +#[Pure] +function gmp_lcm(GMP|string|int $num1, GMP|string|int $num2): GMP {} + +/** + * Perfect power check + * + * @link https://www.php.net/manual/en/function.gmp-perfect-power.php + * + * @param GMP|string|float|int $num + * @return bool + * + * @since 7.3 + */ +#[Pure] +function gmp_perfect_power(GMP|string|int $num): bool {} + +define('GMP_ROUND_ZERO', 0); +define('GMP_ROUND_PLUSINF', 1); +define('GMP_ROUND_MINUSINF', 2); +define('GMP_MSW_FIRST', 1); +define('GMP_LSW_FIRST', 2); +define('GMP_LITTLE_ENDIAN', 4); +define('GMP_BIG_ENDIAN', 8); +define('GMP_NATIVE_ENDIAN', 16); /** * The GMP library version * @link https://php.net/manual/en/gmp.constants.php */ -define ('GMP_VERSION', ""); +define('GMP_VERSION', "6.2.1"); + +define('GMP_MPIR_VERSION', '3.0.0'); -class GMP implements Serializable { +class GMP implements Serializable +{ + /** + * @since 8.2 + */ + public function __construct(int|string $num = 0, int $base = 0) {} /** * String representation of object * @link https://php.net/manual/en/serializable.serialize.php * @return string the string representation of the object or null - * @since 5.1 */ public function serialize() {} + public function __serialize(): array {} + /** * Constructs the object * @link https://php.net/manual/en/serializable.unserialize.php - * @param string $serialized+ * @param string $data * The string representation of the object. * * @return void - * @since 5.1 */ - public function unserialize($serialized) {} + public function unserialize($data) {} + + public function __unserialize(array $data): void {} } // End of gmp v. -?> diff --git a/gnupg/gnupg.php b/gnupg/gnupg.php index e2d560d45..3c37da94f 100644 --- a/gnupg/gnupg.php +++ b/gnupg/gnupg.php @@ -1,4 +1,7 @@ @@ -12,7 +16,7 @@ * @param string $data* Message to be hashed. * - * @param bool $raw_output [optional]+ * @param bool $binary [optional] * When set to TRUE, outputs raw binary data. * FALSE outputs lowercase hexits. * @@ -20,7 +24,8 @@ * unless raw_output is set to true in which case the raw * binary representation of the message digest is returned. */ -function hash ($algo, $data, $raw_output = false) {} +#[Pure] +function hash(string $algo, string $data, bool $binary = false, #[PhpStormStubsElementAvailable('8.1')] array $options = []): string {} /** * Timing attack safe string comparison @@ -30,7 +35,8 @@ function hash ($algo, $data, $raw_output = false) {} * @return boolReturns TRUE when the two strings are equal, FALSE otherwise. * @since 5.6 */ -function hash_equals($known_string, $user_string) {} +#[Pure] +function hash_equals(string $known_string, string $user_string): bool {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)@@ -42,15 +48,16 @@ function hash_equals($known_string, $user_string) {} * @param string $filename * URL describing location of file to be hashed; Supports fopen wrappers. * - * @param bool $raw_output [optional]+ * @param bool $binary [optional] * When set to TRUE, outputs raw binary data. * FALSE outputs lowercase hexits. * - * @return string a string containing the calculated message digest as lowercase hexits + * @return string|false a string containing the calculated message digest as lowercase hexits * unless raw_output is set to true in which case the raw * binary representation of the message digest is returned. */ -function hash_file ($algo, $filename, $raw_output = false) {} +#[Pure] +function hash_file(string $algo, string $filename, bool $binary = false, #[PhpStormStubsElementAvailable('8.1')] array $options = []): string|false {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)@@ -66,7 +73,7 @@ function hash_file ($algo, $filename, $raw_output = false) {} * @param string $key * Shared secret key used for generating the HMAC variant of the message digest. * - * @param bool $raw_output [optional]+ * @param bool $binary [optional] * When set to TRUE, outputs raw binary data. * FALSE outputs lowercase hexits. * @@ -74,7 +81,8 @@ function hash_file ($algo, $filename, $raw_output = false) {} * unless raw_output is set to true in which case the raw * binary representation of the message digest is returned. */ -function hash_hmac ($algo, $data, $key, $raw_output = false) {} +#[Pure] +function hash_hmac(string $algo, string $data, string $key, bool $binary = false): string {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)@@ -90,15 +98,16 @@ function hash_hmac ($algo, $data, $key, $raw_output = false) {} * @param string $key * Shared secret key used for generating the HMAC variant of the message digest. * - * @param bool $raw_output [optional]+ * @param bool $binary [optional] * When set to TRUE, outputs raw binary data. * FALSE outputs lowercase hexits. * - * @return string a string containing the calculated message digest as lowercase hexits + * @return string|false a string containing the calculated message digest as lowercase hexits * unless raw_output is set to true in which case the raw * binary representation of the message digest is returned. */ -function hash_hmac_file ($algo, $filename, $key, $raw_output = false) {} +#[Pure] +function hash_hmac_file(string $algo, string $filename, string $key, bool $binary = false): string|false {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)@@ -108,44 +117,46 @@ function hash_hmac_file ($algo, $filename, $key, $raw_output = false) {} * Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..). For a list of supported algorithms see hash_algos. * Since 7.2.0 usage of non-cryptographic hash functions (adler32, crc32, crc32b, fnv132, fnv1a32, fnv164, fnv1a64, joaat) was disabled. * - * @param int $options [optional] + * @param int $flags [optional] * Optional settings for hash generation, currently supports only one option: * HASH_HMAC. When specified, the key * must be specified. * - * @param string $key [optional]+ * @param string $key * When HASH_HMAC is specified for options, * a shared secret key to be used with the HMAC hashing method must be supplied in this * parameter. * - * @return resource a Hashing Context resource for use with hash_update, + * @return HashContext|resource a Hashing Context resource for use with hash_update, * hash_update_stream, hash_update_file, * and hash_final. */ -function hash_init ($algo, $options = 0, $key = null) {} +#[Pure] +#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] +function hash_init(string $algo, int $flags = 0, string $key = "", #[PhpStormStubsElementAvailable('8.1')] array $options = []) {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)* Pump data into an active hashing context * @link https://php.net/manual/en/function.hash-update.php - * @param resource $context - * Hashing context returned by hash_init. + * @param HashContext|resource $context + * Hashing context returned by {@see hash_init}. * * @param string $data* Message to be included in the hash digest. * * @return bool TRUE. */ -function hash_update ($context, $data) {} +function hash_update(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, string $data): bool {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)* Pump data into an active hashing context from an open stream * @link https://php.net/manual/en/function.hash-update-stream.php - * @param resource $context - * Hashing context returned by hash_init. + * @param HashContext|resource $context + * Hashing context returned by {@see hash_init}. * - * @param resource $handle+ * @param resource $stream * Open file handle as returned by any stream creation function. * * @param int $length [optional]@@ -154,33 +165,33 @@ function hash_update ($context, $data) {} * * @return int Actual number of bytes added to the hashing context from handle. */ -function hash_update_stream ($context, $handle, $length = -1) {} +function hash_update_stream(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, $stream, int $length = -1): int {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)* Pump data into an active hashing context from a file * @link https://php.net/manual/en/function.hash-update-file.php - * @param resource $hcontext + * @param HashContext|resource $context * Hashing context returned by hash_init. * * @param string $filename* URL describing location of file to be hashed; Supports fopen wrappers. * - * @param resource $scontext [optional]+ * @param resource $stream_context [optional] * Stream context as returned by stream_context_create. * * @return bool TRUE on success or FALSE on failure. */ -function hash_update_file ($hcontext, $filename, $scontext = null) {} +function hash_update_file(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, string $filename, $stream_context): bool {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)* Finalize an incremental hash and return resulting digest * @link https://php.net/manual/en/function.hash-final.php - * @param resource $context - * Hashing context returned by hash_init. + * @param HashContext|resource $context + * Hashing context returned by {@see hash_init}. * - * @param bool $raw_output [optional]+ * @param bool $binary [optional] * When set to TRUE, outputs raw binary data. * FALSE outputs lowercase hexits. * @@ -188,18 +199,19 @@ function hash_update_file ($hcontext, $filename, $scontext = null) {} * unless raw_output is set to true in which case the raw * binary representation of the message digest is returned. */ -function hash_final ($context, $raw_output = false) {} +function hash_final(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context, bool $binary = false): string {} /** * Copy hashing context * @link https://php.net/manual/en/function.hash-copy.php - * @param resource $context- * Hashing context returned by hash_init. + * @param HashContext|resource $context + * Hashing context returned by {@see hash_init}. * - * @return resource a copy of Hashing Context resource. - * @since 5.3 + * @return HashContext|resource a copy of Hashing Context resource. */ -function hash_copy ($context) {} +#[Pure] +#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] +function hash_copy(#[LanguageLevelTypeAware(["7.2" => "HashContext"], default: "resource")] $context) {} /** * (PHP 5 >= 5.1.2, PECL hash >= 1.1)@@ -208,13 +220,11 @@ function hash_copy ($context) {} * @return array a numerically indexed array containing the list of supported * hashing algorithms. */ -function hash_algos () {} - +#[Pure] +function hash_algos(): array {} /** - * @since 7.1.2 - * Generate a HKDF key derivation of a supplied key input - * @link https://php.net/manual/en/function.hash-hkdf.php + * Generate a hkdf key derivation of a supplied key input * @param string $algo Name of selected hashing algorithm (i.e. "sha256", "sha512", "haval160,4", etc..) * See {@see hash_algos()} for a list of supported algorithms. * @@ -223,21 +233,28 @@ function hash_algos () {} * Non-cryptographic hash functions are not allowed. * *- * @param string $ikm Input keying material (raw binary). Cannot be empty. + * @param string $keyInput keying material (raw binary). Cannot be empty. * @param int $length [optional]Desired output length in bytes. Cannot be greater than 255 times the chosen hash function size. - * If length is 0, the output length will default to the chosen hash function size. + * If length is 0, the output length will default to the chosen hash function size. * @param string $info [optional]Application/context-specific info string. * @param string $salt [optional]Salt to use during derivation. While optional, adding random salt significantly improves the strength of HKDF. * @return string|falseReturns a string containing a raw binary representation of the derived key (also known as output keying material - OKM); or FALSE on failure. + * @since 7.1.2 + * Generate a HKDF key derivation of a supplied key input + * @link https://php.net/manual/en/function.hash-hkdf.php */ -function hash_hkdf(string $algo , string $ikm, int $length = 0, string $info = '', string $salt = '') {} +#[Pure] +#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")] +function hash_hkdf(string $algo, string $key, int $length = 0, string $info = '', string $salt = '') {} /** + * Return a list of registered hashing algorithms suitable for hash_hmac * @since 7.2 * Return a list of registered hashing algorithms suitable for hash_hmac * @return string[] Returns a numerically indexed array containing the list of supported hashing algorithms suitable for {@see hash_hmac()}. */ -function hash_hmac_algos() {} +#[Pure] +function hash_hmac_algos(): array {} /** * Generate a PBKDF2 key derivation of a supplied password @@ -260,20 +277,21 @@ function hash_hmac_algos() {} * if raw_output is FALSE this corresponds to twice the byte-length of the derived key (as every byte of the key is returned as two hexits).* If 0 is passed, the entire output of the supplied algorithm is used. * - * @param bool $raw_output [optional] + * @param bool $binary [optional] * When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. * - * @return mixed a string containing the derived key as lowercase hexits unless + * @return string a string containing the derived key as lowercase hexits unless * raw_output is set to TRUE in which case the raw * binary representation of the derived key is returned. * @since 5.5 */ -function hash_pbkdf2 ($algo, $password, $salt, $iterations, $length = 0, $raw_output = FALSE) {} +#[Pure] +function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string {} /** * Generates a key * @link https://php.net/manual/en/function.mhash-keygen-s2k.php - * @param int $hash+ * @param int $algo * The hash ID used to create the key. * One of the MHASH_hashname constants. * @@ -287,72 +305,76 @@ function hash_pbkdf2 ($algo, $password, $salt, $iterations, $length = 0, $raw_ou * the key to it. Salt has a fixed length of 8 bytes and will be padded * with zeros if you supply less bytes. * - * @param int $bytes+ * @param int $length * The key length, in bytes. * * @return string|false the generated key as a string, or FALSE on error. - * @since 4.0.4 - * @since 5.0 + * @deprecated 8.1 */ -function mhash_keygen_s2k ($hash, $password, $salt, $bytes) {} +#[Pure] +#[Deprecated(since: '8.1')] +function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {} /** * Gets the block size of the specified hash * @link https://php.net/manual/en/function.mhash-get-block-size.php - * @param int $hash+ * @param int $algo * The hash ID. One of the MHASH_hashname constants. * * @return int|false the size in bytes or FALSE, if the hash * does not exist. - * @since 4.0 - * @since 5.0 + * @deprecated 8.1 */ -function mhash_get_block_size ($hash) {} +#[Pure] +#[Deprecated(since: '8.1')] +function mhash_get_block_size(int $algo): int|false {} /** * Gets the name of the specified hash * @link https://php.net/manual/en/function.mhash-get-hash-name.php - * @param int $hash+ * @param int $algo * The hash ID. One of the MHASH_hashname constants. * * @return string|false the name of the hash or FALSE, if the hash does not exist. - * @since 4.0 - * @since 5.0 + * @deprecated 8.1 */ -function mhash_get_hash_name ($hash) {} +#[Pure] +#[Deprecated(since: '8.1')] +function mhash_get_hash_name(int $algo): string|false {} /** * Gets the highest available hash ID * @link https://php.net/manual/en/function.mhash-count.php - * @return int the highest available hash ID. Hashes are numbered from 0 to this + * @return int<0, max> the highest available hash ID. Hashes are numbered from 0 to this * hash ID. - * @since 4.0 - * @since 5.0 + * @deprecated 8.1 */ -function mhash_count () {} +#[Pure] +#[Deprecated(since: '8.1')] +function mhash_count(): int {} /** * Computes hash * @link https://php.net/manual/en/function.mhash.php - * @param int $hash+ * @param int $algo * The hash ID. One of the MHASH_hashname constants. * * @param string $data* The user input, as a string. * - * @param string $key [optional]+ * @param string|null $key [optional] * If specified, the function will return the resulting HMAC instead. * HMAC is keyed hashing for message authentication, or simply a message * digest that depends on the specified key. Not all algorithms * supported in mhash can be used in HMAC mode. * - * @return string the resulting hash (also called digest) or HMAC as a string, or + * @return string|false the resulting hash (also called digest) or HMAC as a string, or * FALSE on error. - * @since 4.0 - * @since 5.0 + * @deprecated 8.1 */ -function mhash ($hash, $data, $key = null) {} - +#[Pure] +#[Deprecated(since: '8.1')] +function mhash(int $algo, string $data, ?string $key): string|false {} /** * Optional flag for hash_init. @@ -360,48 +382,83 @@ function mhash ($hash, $data, $key = null) {} * applied to the current hashing context. * @link https://php.net/manual/en/hash.constants.php */ -define ('HASH_HMAC', 1); -define ('MHASH_CRC32', 0); +define('HASH_HMAC', 1); +define('MHASH_CRC32', 0); /** * @since 7.4 */ -define ('MHASH_CRC32C', 34); -define ('MHASH_MD5', 1); -define ('MHASH_SHA1', 2); -define ('MHASH_HAVAL256', 3); -define ('MHASH_RIPEMD160', 5); -define ('MHASH_TIGER', 7); -define ('MHASH_GOST', 8); -define ('MHASH_CRC32B', 9); -define ('MHASH_HAVAL224', 10); -define ('MHASH_HAVAL192', 11); -define ('MHASH_HAVAL160', 12); -define ('MHASH_HAVAL128', 13); -define ('MHASH_TIGER128', 14); -define ('MHASH_TIGER160', 15); -define ('MHASH_MD4', 16); -define ('MHASH_SHA256', 17); -define ('MHASH_ADLER32', 18); -define ('MHASH_SHA224', 19); -define ('MHASH_SHA512', 20); -define ('MHASH_SHA384', 21); -define ('MHASH_WHIRLPOOL', 22); -define ('MHASH_RIPEMD128', 23); -define ('MHASH_RIPEMD256', 24); -define ('MHASH_RIPEMD320', 25); -define ('MHASH_SNEFRU256', 27); -define ('MHASH_MD2', 28); -define ('MHASH_FNV132', 29); -define ('MHASH_FNV1A32', 30); -define ('MHASH_FNV164', 31); -define ('MHASH_FNV1A64', 32); -define ('MHASH_JOAAT', 33); +define('MHASH_CRC32C', 34); +define('MHASH_MD5', 1); +define('MHASH_SHA1', 2); +define('MHASH_HAVAL256', 3); +define('MHASH_RIPEMD160', 5); +define('MHASH_TIGER', 7); +define('MHASH_GOST', 8); +define('MHASH_CRC32B', 9); +define('MHASH_HAVAL224', 10); +define('MHASH_HAVAL192', 11); +define('MHASH_HAVAL160', 12); +define('MHASH_HAVAL128', 13); +define('MHASH_TIGER128', 14); +define('MHASH_TIGER160', 15); +define('MHASH_MD4', 16); +define('MHASH_SHA256', 17); +define('MHASH_ADLER32', 18); +define('MHASH_SHA224', 19); +define('MHASH_SHA512', 20); +define('MHASH_SHA384', 21); +define('MHASH_WHIRLPOOL', 22); +define('MHASH_RIPEMD128', 23); +define('MHASH_RIPEMD256', 24); +define('MHASH_RIPEMD320', 25); +define('MHASH_SNEFRU256', 27); +define('MHASH_MD2', 28); +define('MHASH_FNV132', 29); +define('MHASH_FNV1A32', 30); +define('MHASH_FNV164', 31); +define('MHASH_FNV1A64', 32); +define('MHASH_JOAAT', 33); +/** + * @since 8.1 + */ +define('MHASH_MURMUR3A', 35); +/** + * @since 8.1 + */ +define('MHASH_MURMUR3C', 36); +/** + * @since 8.1 + */ +define('MHASH_MURMUR3F', 37); +/** + * @since 8.1 + */ +define('MHASH_XXH32', 38); +/** + * @since 8.1 + */ +define('MHASH_XXH64', 39); +/** + * @since 8.1 + */ +define('MHASH_XXH3', 40); +/** + * @since 8.1 + */ +define('MHASH_XXH128', 41); -class HashContext +/** + * @since 7.2 + */ +final class HashContext { - private function __construct() - { - } + private function __construct() {} + + public function __serialize(): array {} + + /** + * @param array $data + */ + public function __unserialize(#[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $data): void {} } // End of hash v.1.0 -?> diff --git a/http/http.php b/http/http.php index ca241f2a5..2d6539176 100644 --- a/http/http.php +++ b/http/http.php @@ -2,2125 +2,2143 @@ // Start of http v.1.6.6 -class HttpException extends Exception { - public $innerException; -} -class HttpRuntimeException extends HttpException { -} -class HttpInvalidParamException extends HttpException { -} -class HttpHeaderException extends HttpException { -} -class HttpMalformedHeadersException extends HttpException { -} -class HttpRequestMethodException extends HttpException { -} -class HttpMessageTypeException extends HttpException { -} -class HttpEncodingException extends HttpException { -} -class HttpRequestException extends HttpException { -} -class HttpRequestPoolException extends HttpException { -} -class HttpSocketException extends HttpException { -} -class HttpResponseException extends HttpException { -} -class HttpUrlException extends HttpException { -} -class HttpQueryStringException extends HttpException { +use JetBrains\PhpStorm\Pure; + +class HttpException extends Exception +{ + public $innerException; } +class HttpRuntimeException extends HttpException {} +class HttpInvalidParamException extends HttpException {} +class HttpHeaderException extends HttpException {} +class HttpMalformedHeadersException extends HttpException {} +class HttpRequestMethodException extends HttpException {} +class HttpMessageTypeException extends HttpException {} +class HttpEncodingException extends HttpException {} +class HttpRequestException extends HttpException {} +class HttpRequestPoolException extends HttpException {} +class HttpSocketException extends HttpException {} +class HttpResponseException extends HttpException {} +class HttpUrlException extends HttpException {} +class HttpQueryStringException extends HttpException {} /** * @link https://php.net/manual/en/class.httpdeflatestream.php */ -class HttpDeflateStream { - const TYPE_GZIP = 16; - const TYPE_ZLIB = 0; - const TYPE_RAW = 32; - const LEVEL_DEF = 0; - const LEVEL_MIN = 1; - const LEVEL_MAX = 9; - const STRATEGY_DEF = 0; - const STRATEGY_FILT = 256; - const STRATEGY_HUFF = 512; - const STRATEGY_RLE = 768; - const STRATEGY_FIXED = 1024; - const FLUSH_NONE = 0; - const FLUSH_SYNC = 1048576; - const FLUSH_FULL = 2097152; - - - /** - * (PECL pecl_http >= 0.21.0)- * HttpDeflateStream class constructor - * @link https://php.net/manual/en/function.httpdeflatestream-construct.php - * @param int $flags [optional] - * initialization flags - * - */ - public function __construct ($flags = null) {} - - /** - * (PECL pecl_http >= 0.21.0)- * Update deflate stream - * @link https://php.net/manual/en/function.httpdeflatestream-update.php - * @param string $data - * data to deflate - * - * @return string|false deflated data on success or false on failure. - */ - public function update ($data) {} - - /** - * (PECL pecl_http >= 0.21.0)- * Flush deflate stream - * @link https://php.net/manual/en/function.httpdeflatestream-flush.php - * @param string $data [optional] - * more data to deflate - * - * @return string|false some deflated data as string on success or false on failure. - */ - public function flush ($data = null) {} - - /** - * (PECL pecl_http >= 0.21.0)- * Finalize deflate stream - * @link https://php.net/manual/en/function.httpdeflatestream-finish.php - * @param string $data [optional] - * data to deflate - * - * @return string the final part of deflated data. - */ - public function finish ($data = null) {} - - /** - * (PECL pecl_http >= 1.4.0)- * HttpDeflateStream class factory - * @link https://php.net/manual/en/function.httpdeflatestream-factory.php - * @param int $flags [optional] - * initialization flags - * - * @param string $class_name [optional]- * name of a subclass of HttpDeflateStream - * - * @return HttpDeflateStream - */ - public static function factory ($flags = null, $class_name = null) {} - +class HttpDeflateStream +{ + public const TYPE_GZIP = 16; + public const TYPE_ZLIB = 0; + public const TYPE_RAW = 32; + public const LEVEL_DEF = 0; + public const LEVEL_MIN = 1; + public const LEVEL_MAX = 9; + public const STRATEGY_DEF = 0; + public const STRATEGY_FILT = 256; + public const STRATEGY_HUFF = 512; + public const STRATEGY_RLE = 768; + public const STRATEGY_FIXED = 1024; + public const FLUSH_NONE = 0; + public const FLUSH_SYNC = 1048576; + public const FLUSH_FULL = 2097152; + + /** + * (PECL pecl_http >= 0.21.0)+ * HttpDeflateStream class constructor + * @link https://php.net/manual/en/function.httpdeflatestream-construct.php + * @param int $flags [optional] + * initialization flags + * + */ + public function __construct($flags = null) {} + + /** + * (PECL pecl_http >= 0.21.0)+ * Update deflate stream + * @link https://php.net/manual/en/function.httpdeflatestream-update.php + * @param string $data + * data to deflate + * + * @return string|false deflated data on success or false on failure. + */ + public function update($data) {} + + /** + * (PECL pecl_http >= 0.21.0)+ * Flush deflate stream + * @link https://php.net/manual/en/function.httpdeflatestream-flush.php + * @param string $data [optional] + * more data to deflate + * + * @return string|false some deflated data as string on success or false on failure. + */ + public function flush($data = null) {} + + /** + * (PECL pecl_http >= 0.21.0)+ * Finalize deflate stream + * @link https://php.net/manual/en/function.httpdeflatestream-finish.php + * @param string $data [optional] + * data to deflate + * + * @return string the final part of deflated data. + */ + public function finish($data = null) {} + + /** + * (PECL pecl_http >= 1.4.0)+ * HttpDeflateStream class factory + * @link https://php.net/manual/en/function.httpdeflatestream-factory.php + * @param int $flags [optional] + * initialization flags + * + * @param string $class_name [optional]+ * name of a subclass of HttpDeflateStream + * + * @return HttpDeflateStream + */ + public static function factory($flags = null, $class_name = null) {} } /** * @link https://php.net/manual/en/class.httpinflatestream.php */ -class HttpInflateStream { - const FLUSH_NONE = 0; - const FLUSH_SYNC = 1048576; - const FLUSH_FULL = 2097152; - - - /** - * (PECL pecl_http >= 1.0.0)- * HttpInflateStream class constructor - * @link https://php.net/manual/en/function.httpinflatestream-construct.php - * @param int $flags [optional] - * initialization flags - * - */ - public function __construct ($flags = null) {} - - /** - * (PECL pecl_http >= 0.21.0)- * Update inflate stream - * @link https://php.net/manual/en/function.httpinflatestream-update.php - * @param string $data - * data to inflate - * - * @return string|false inflated data on success or false on failure. - */ - public function update ($data) {} - - /** - * (PECL pecl_http >= 0.21.0)- * Flush inflate stream - * @link https://php.net/manual/en/function.httpinflatestream-flush.php - * @param string $data [optional] - * more data to inflate - * - * @return string|false some inflated data as string on success or false on failure. - */ - public function flush ($data = null) {} - - /** - * (PECL pecl_http >= 0.21.0)- * Finalize inflate stream - * @link https://php.net/manual/en/function.httpinflatestream-finish.php - * @param string $data [optional] - * data to inflate - * - * @return string the final part of inflated data. - */ - public function finish ($data = null) {} - - /** - * (PECL pecl_http >= 1.4.0)- * HttpInflateStream class factory - * @link https://php.net/manual/en/function.httpinflatestream-factory.php - * @param int $flags [optional] - * initialization flags - * - * @param string $class_name [optional]- * name of a subclass of HttpInflateStream - * - * @return HttpInflateStream - */ - public static function factory ($flags = null, $class_name = null) {} - +class HttpInflateStream +{ + public const FLUSH_NONE = 0; + public const FLUSH_SYNC = 1048576; + public const FLUSH_FULL = 2097152; + + /** + * (PECL pecl_http >= 1.0.0)+ * HttpInflateStream class constructor + * @link https://php.net/manual/en/function.httpinflatestream-construct.php + * @param int $flags [optional] + * initialization flags + * + */ + public function __construct($flags = null) {} + + /** + * (PECL pecl_http >= 0.21.0)+ * Update inflate stream + * @link https://php.net/manual/en/function.httpinflatestream-update.php + * @param string $data + * data to inflate + * + * @return string|false inflated data on success or false on failure. + */ + public function update($data) {} + + /** + * (PECL pecl_http >= 0.21.0)+ * Flush inflate stream + * @link https://php.net/manual/en/function.httpinflatestream-flush.php + * @param string $data [optional] + * more data to inflate + * + * @return string|false some inflated data as string on success or false on failure. + */ + public function flush($data = null) {} + + /** + * (PECL pecl_http >= 0.21.0)+ * Finalize inflate stream + * @link https://php.net/manual/en/function.httpinflatestream-finish.php + * @param string $data [optional] + * data to inflate + * + * @return string the final part of inflated data. + */ + public function finish($data = null) {} + + /** + * (PECL pecl_http >= 1.4.0)+ * HttpInflateStream class factory + * @link https://php.net/manual/en/function.httpinflatestream-factory.php + * @param int $flags [optional] + * initialization flags + * + * @param string $class_name [optional]+ * name of a subclass of HttpInflateStream + * + * @return HttpInflateStream + */ + public static function factory($flags = null, $class_name = null) {} } /** * @link https://php.net/manual/en/class.httpmessage.php */ -class HttpMessage implements Countable, Serializable, Iterator { - const TYPE_NONE = 0; - const TYPE_REQUEST = 1; - const TYPE_RESPONSE = 2; - - protected $type; - protected $body; - protected $requestMethod; - protected $requestUrl; - protected $responseStatus; - protected $responseCode; - protected $httpVersion; - protected $headers; - protected $parentMessage; - - - /** - * (PECL pecl_http >= 0.10.0)- * HttpMessage constructor - * @link https://php.net/manual/en/function.httpmessage-construct.php - * @param string $message [optional] - * a single or several consecutive HTTP messages - * - */ - public function __construct ($message = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get message body - * @link https://php.net/manual/en/function.httpmessage-getbody.php - * @return string the message body as string. - */ - public function getBody () {} - - /** - * (PECL pecl_http >= 0.14.0) - * Set message body - * @link https://php.net/manual/en/function.httpmessage-setbody.php - * @param string $body - * the new body of the message - * - * @return void - */ - public function setBody ($body) {} - - /** - * (PECL pecl_http >= 1.1.0)- * Get header - * @link https://php.net/manual/en/function.httpmessage-getheader.php - * @param string $header - * header name - * - * @return string|null the header value on success or NULL if the header does not exist. - */ - public function getHeader ($header) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get message headers - * @link https://php.net/manual/en/function.httpmessage-getheaders.php - * @return array an associative array containing the messages HTTP headers. - */ - public function getHeaders () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set headers - * @link https://php.net/manual/en/function.httpmessage-setheaders.php - * @param array $headers - * associative array containing the new HTTP headers, which will replace all previous HTTP headers of the message - * - * @return void - */ - public function setHeaders (sarray $header) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Add headers - * @link https://php.net/manual/en/function.httpmessage-addheaders.php - * @param array $headers - * associative array containing the additional HTTP headers to add to the messages existing headers - * - * @param bool $append [optional]- * if true, and a header with the same name of one to add exists already, this respective - * header will be converted to an array containing both header values, otherwise - * it will be overwritten with the new header value - * - * @return void - */ - public function addHeaders (array $headers, $append = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get message type - * @link https://php.net/manual/en/function.httpmessage-gettype.php - * @return int the HttpMessage::TYPE. - */ - public function getType () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set message type - * @link https://php.net/manual/en/function.httpmessage-settype.php - * @param int $type - * the HttpMessage::TYPE - * - * @return void - */ - public function setType ($type) {} - - public function getInfo () {} - - /** - * @param $http_info - */ - public function setInfo ($http_info) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get response code - * @link https://php.net/manual/en/function.httpmessage-getresponsecode.php - * @return int the HTTP response code if the message is of type HttpMessage::TYPE_RESPONSE, else FALSE. - */ - public function getResponseCode () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set response code - * @link https://php.net/manual/en/function.httpmessage-setresponsecode.php - * @param int $code - * HTTP response code - * - * @return bool TRUE on success, or FALSE if the message is not of type - * HttpMessage::TYPE_RESPONSE or the response code is out of range (100-510). - */ - public function setResponseCode ($code) {} - - /** - * (PECL pecl_http >= 0.23.0)- * Get response status - * @link https://php.net/manual/en/function.httpmessage-getresponsestatus.php - * @return string the HTTP response status string if the message is of type - * HttpMessage::TYPE_RESPONSE, else FALSE. - */ - public function getResponseStatus () {} - - /** - * (PECL pecl_http >= 0.23.0) - * Set response status - * @link https://php.net/manual/en/function.httpmessage-setresponsestatus.php - * @param string $status - * the response status text - * - * @return bool TRUE on success or FALSE if the message is not of type - * HttpMessage::TYPE_RESPONSE. - */ - public function setResponseStatus ($status) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get request method - * @link https://php.net/manual/en/function.httpmessage-getrequestmethod.php - * @return string|false the request method name on success, or FALSE if the message is - * not of type HttpMessage::TYPE_REQUEST. - */ - public function getRequestMethod () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set request method - * @link https://php.net/manual/en/function.httpmessage-setrequestmethod.php - * @param string $method - * the request method name - * - * @return bool TRUE on success, or FALSE if the message is not of type - * HttpMessage::TYPE_REQUEST or an invalid request method was supplied. - */ - public function setRequestMethod ($method) {} - - /** - * (PECL pecl_http >= 0.21.0)- * Get request URL - * @link https://php.net/manual/en/function.httpmessage-getrequesturl.php - * @return string|false the request URL as string on success, or FALSE if the message - * is not of type HttpMessage::TYPE_REQUEST. - */ - public function getRequestUrl () {} - - /** - * (PECL pecl_http >= 0.21.0) - * Set request URL - * @link https://php.net/manual/en/function.httpmessage-setrequesturl.php - * @param string $url - * the request URL - * - * @return bool TRUE on success, or FALSE if the message is not of type - * HttpMessage::TYPE_REQUEST or supplied URL was empty. - */ - public function setRequestUrl ($url) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get HTTP version - * @link https://php.net/manual/en/function.httpmessage-gethttpversion.php - * @return string the HTTP protocol version as string. - */ - public function getHttpVersion () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set HTTP version - * @link https://php.net/manual/en/function.httpmessage-sethttpversion.php - * @param string $version - * the HTTP protocol version - * - * @return bool TRUE on success, or FALSE if supplied version is out of range (1.0/1.1). - */ - public function setHttpVersion ($version) {} - - /** - * (PECL pecl_http >= 1.0.0)- * Guess content type - * @link https://php.net/manual/en/function.httpmessage-guesscontenttype.php - * @param string $magic_file - * the magic.mime database to use - * - * @param int $magic_mode [optional]- * flags for libmagic - * - * @return string|false the guessed content type on success or false on failure. - */ - public function guessContentType ($magic_file, $magic_mode = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get parent message - * @link https://php.net/manual/en/function.httpmessage-getparentmessage.php - * @return HttpMessage the parent HttpMessage object. - */ - public function getParentMessage () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Send message - * @link https://php.net/manual/en/function.httpmessage-send.php - * @return bool true on success or false on failure. - */ - public function send () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get string representation - * @link https://php.net/manual/en/function.httpmessage-tostring.php - * @param bool $include_parent [optional] - * specifies whether the returned string should also contain any parent messages - * - * @return string the message as string. - */ - public function toString ($include_parent = null) {} - - /** - * (PECL pecl_http >= 0.22.0)- * Create HTTP object regarding message type - * @link https://php.net/manual/en/function.httpmessage-tomessagetypeobject.php - * @return HttpRequest|HttpResponse|null either an HttpRequest or HttpResponse object on success, or NULL on failure. - */ - public function toMessageTypeObject () {} - - public function count () {} - - public function serialize () {} - - /** - * @param $serialized - */ - public function unserialize ($serialized) {} - - public function rewind () {} - - public function valid () {} - - public function current () {} - - public function key () {} - - public function next () {} - - /** - * @return string - */ - public function __toString () {} - - /** - * (PECL pecl_http >= 1.4.0) - * Create HttpMessage from string - * @link https://php.net/manual/en/function.httpmessage-factory.php - * @param string $raw_message [optional] - * a single or several consecutive HTTP messages - * - * @param string $class_name [optional]- * a class extending HttpMessage - * - * @return HttpMessage|null an HttpMessage object on success or NULL on failure. - */ - public static function factory ($raw_message = null, $class_name = null) {} - - /** - * (PECL pecl_http 0.10.0-1.3.3)- * Create HttpMessage from string - * @link https://php.net/manual/en/function.httpmessage-fromstring.php - * @param string $raw_message [optional] - * a single or several consecutive HTTP messages - * - * @param string $class_name [optional]- * a class extending HttpMessage - * - * @return HttpMessage|null an HttpMessage object on success or NULL on failure. - */ - public static function fromString ($raw_message = null, $class_name = null) {} - - /** - * (PECL pecl_http >= 1.5.0)- * Create HttpMessage from environment - * @link https://php.net/manual/en/function.httpmessage-fromenv.php - * @param int $message_type - * The message type. See HttpMessage type constants. - * - * @param string $class_name [optional]- * a class extending HttpMessage - * - * @return HttpMessage|null an HttpMessage object on success or NULL on failure. - */ - public static function fromEnv ($message_type, $class_name = null) {} - - /** - * (PECL pecl_http >= 0.22.0)- * Detach HttpMessage - * @link https://php.net/manual/en/function.httpmessage-detach.php - * @return HttpMessage detached HttpMessage object copy. - */ - public function detach () {} - - /** - * (PECL pecl_http >= 0.22.0) - * Prepend message(s) - * @link https://php.net/manual/en/function.httpmessage-prepend.php - * @param HttpMessage $message - * HttpMessage object to prepend - * - * @param bool $top [optional]- * whether to prepend to the top most or right this message - * - * @return void - */ - public function prepend (HttpMessage $message, $top = null) {} - - /** - * (PECL pecl_http >= 0.23.0)- * Reverse message chain - * @link https://php.net/manual/en/function.httpmessage-reverse.php - * @return HttpMessage the most parent HttpMessage object. - */ - public function reverse () {} - +class HttpMessage implements Countable, Serializable, Iterator +{ + public const TYPE_NONE = 0; + public const TYPE_REQUEST = 1; + public const TYPE_RESPONSE = 2; + protected $type; + protected $body; + protected $requestMethod; + protected $requestUrl; + protected $responseStatus; + protected $responseCode; + protected $httpVersion; + protected $headers; + protected $parentMessage; + + /** + * (PECL pecl_http >= 0.10.0) + * HttpMessage constructor + * @link https://php.net/manual/en/function.httpmessage-construct.php + * @param string $message [optional] + * a single or several consecutive HTTP messages + * + */ + public function __construct($message = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get message body + * @link https://php.net/manual/en/function.httpmessage-getbody.php + * @return string the message body as string. + */ + #[Pure] + public function getBody() {} + + /** + * (PECL pecl_http >= 0.14.0) + * Set message body + * @link https://php.net/manual/en/function.httpmessage-setbody.php + * @param string $body + * the new body of the message + * + * @return void + */ + public function setBody($body) {} + + /** + * (PECL pecl_http >= 1.1.0)+ * Get header + * @link https://php.net/manual/en/function.httpmessage-getheader.php + * @param string $header + * header name + * + * @return string|null the header value on success or NULL if the header does not exist. + */ + #[Pure] + public function getHeader($header) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get message headers + * @link https://php.net/manual/en/function.httpmessage-getheaders.php + * @return array an associative array containing the messages HTTP headers. + */ + #[Pure] + public function getHeaders() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set headers + * @link https://php.net/manual/en/function.httpmessage-setheaders.php + * @param array $header + * associative array containing the new HTTP headers, which will replace all previous HTTP headers of the message + * + * @return void + */ + public function setHeaders(array $header) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Add headers + * @link https://php.net/manual/en/function.httpmessage-addheaders.php + * @param array $headers + * associative array containing the additional HTTP headers to add to the messages existing headers + * + * @param bool $append [optional]+ * if true, and a header with the same name of one to add exists already, this respective + * header will be converted to an array containing both header values, otherwise + * it will be overwritten with the new header value + * + * @return void + */ + public function addHeaders(array $headers, $append = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get message type + * @link https://php.net/manual/en/function.httpmessage-gettype.php + * @return int the HttpMessage::TYPE. + */ + #[Pure] + public function getType() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set message type + * @link https://php.net/manual/en/function.httpmessage-settype.php + * @param int $type + * the HttpMessage::TYPE + * + * @return void + */ + public function setType($type) {} + + #[Pure] + public function getInfo() {} + + /** + * @param $http_info + */ + public function setInfo($http_info) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get response code + * @link https://php.net/manual/en/function.httpmessage-getresponsecode.php + * @return int|false the HTTP response code if the message is of type HttpMessage::TYPE_RESPONSE, else FALSE. + */ + #[Pure] + public function getResponseCode() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set response code + * @link https://php.net/manual/en/function.httpmessage-setresponsecode.php + * @param int $code + * HTTP response code + * + * @return bool TRUE on success, or FALSE if the message is not of type + * HttpMessage::TYPE_RESPONSE or the response code is out of range (100-510). + */ + public function setResponseCode($code) {} + + /** + * (PECL pecl_http >= 0.23.0)+ * Get response status + * @link https://php.net/manual/en/function.httpmessage-getresponsestatus.php + * @return string the HTTP response status string if the message is of type + * HttpMessage::TYPE_RESPONSE, else FALSE. + */ + #[Pure] + public function getResponseStatus() {} + + /** + * (PECL pecl_http >= 0.23.0) + * Set response status + * @link https://php.net/manual/en/function.httpmessage-setresponsestatus.php + * @param string $status + * the response status text + * + * @return bool TRUE on success or FALSE if the message is not of type + * HttpMessage::TYPE_RESPONSE. + */ + public function setResponseStatus($status) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get request method + * @link https://php.net/manual/en/function.httpmessage-getrequestmethod.php + * @return string|false the request method name on success, or FALSE if the message is + * not of type HttpMessage::TYPE_REQUEST. + */ + #[Pure] + public function getRequestMethod() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set request method + * @link https://php.net/manual/en/function.httpmessage-setrequestmethod.php + * @param string $method + * the request method name + * + * @return bool TRUE on success, or FALSE if the message is not of type + * HttpMessage::TYPE_REQUEST or an invalid request method was supplied. + */ + public function setRequestMethod($method) {} + + /** + * (PECL pecl_http >= 0.21.0)+ * Get request URL + * @link https://php.net/manual/en/function.httpmessage-getrequesturl.php + * @return string|false the request URL as string on success, or FALSE if the message + * is not of type HttpMessage::TYPE_REQUEST. + */ + #[Pure] + public function getRequestUrl() {} + + /** + * (PECL pecl_http >= 0.21.0) + * Set request URL + * @link https://php.net/manual/en/function.httpmessage-setrequesturl.php + * @param string $url + * the request URL + * + * @return bool TRUE on success, or FALSE if the message is not of type + * HttpMessage::TYPE_REQUEST or supplied URL was empty. + */ + public function setRequestUrl($url) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get HTTP version + * @link https://php.net/manual/en/function.httpmessage-gethttpversion.php + * @return string the HTTP protocol version as string. + */ + #[Pure] + public function getHttpVersion() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set HTTP version + * @link https://php.net/manual/en/function.httpmessage-sethttpversion.php + * @param string $version + * the HTTP protocol version + * + * @return bool TRUE on success, or FALSE if supplied version is out of range (1.0/1.1). + */ + public function setHttpVersion($version) {} + + /** + * (PECL pecl_http >= 1.0.0)+ * Guess content type + * @link https://php.net/manual/en/function.httpmessage-guesscontenttype.php + * @param string $magic_file + * the magic.mime database to use + * + * @param int $magic_mode [optional]+ * flags for libmagic + * + * @return string|false the guessed content type on success or false on failure. + */ + public function guessContentType($magic_file, $magic_mode = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get parent message + * @link https://php.net/manual/en/function.httpmessage-getparentmessage.php + * @return HttpMessage the parent HttpMessage object. + */ + #[Pure] + public function getParentMessage() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Send message + * @link https://php.net/manual/en/function.httpmessage-send.php + * @return bool true on success or false on failure. + */ + public function send() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get string representation + * @link https://php.net/manual/en/function.httpmessage-tostring.php + * @param bool $include_parent [optional] + * specifies whether the returned string should also contain any parent messages + * + * @return string the message as string. + */ + public function toString($include_parent = null) {} + + /** + * (PECL pecl_http >= 0.22.0)+ * Create HTTP object regarding message type + * @link https://php.net/manual/en/function.httpmessage-tomessagetypeobject.php + * @return HttpRequest|HttpResponse|null either an HttpRequest or HttpResponse object on success, or NULL on failure. + */ + public function toMessageTypeObject() {} + + public function count() {} + + public function serialize() {} + + /** + * @param $serialized + */ + public function unserialize($serialized) {} + + public function rewind() {} + + public function valid() {} + + public function current() {} + + public function key() {} + + public function next() {} + + /** + * @return string + */ + public function __toString() {} + + /** + * (PECL pecl_http >= 1.4.0) + * Create HttpMessage from string + * @link https://php.net/manual/en/function.httpmessage-factory.php + * @param string $raw_message [optional] + * a single or several consecutive HTTP messages + * + * @param string $class_name [optional]+ * a class extending HttpMessage + * + * @return HttpMessage|null an HttpMessage object on success or NULL on failure. + */ + public static function factory($raw_message = null, $class_name = null) {} + + /** + * (PECL pecl_http 0.10.0-1.3.3)+ * Create HttpMessage from string + * @link https://php.net/manual/en/function.httpmessage-fromstring.php + * @param string $raw_message [optional] + * a single or several consecutive HTTP messages + * + * @param string $class_name [optional]+ * a class extending HttpMessage + * + * @return HttpMessage|null an HttpMessage object on success or NULL on failure. + */ + public static function fromString($raw_message = null, $class_name = null) {} + + /** + * (PECL pecl_http >= 1.5.0)+ * Create HttpMessage from environment + * @link https://php.net/manual/en/function.httpmessage-fromenv.php + * @param int $message_type + * The message type. See HttpMessage type constants. + * + * @param string $class_name [optional]+ * a class extending HttpMessage + * + * @return HttpMessage|null an HttpMessage object on success or NULL on failure. + */ + public static function fromEnv($message_type, $class_name = null) {} + + /** + * (PECL pecl_http >= 0.22.0)+ * Detach HttpMessage + * @link https://php.net/manual/en/function.httpmessage-detach.php + * @return HttpMessage detached HttpMessage object copy. + */ + public function detach() {} + + /** + * (PECL pecl_http >= 0.22.0) + * Prepend message(s) + * @link https://php.net/manual/en/function.httpmessage-prepend.php + * @param HttpMessage $message + * HttpMessage object to prepend + * + * @param bool $top [optional]+ * whether to prepend to the top most or right this message + * + * @return void + */ + public function prepend(HttpMessage $message, $top = null) {} + + /** + * (PECL pecl_http >= 0.23.0)+ * Reverse message chain + * @link https://php.net/manual/en/function.httpmessage-reverse.php + * @return HttpMessage the most parent HttpMessage object. + */ + public function reverse() {} } /** * @link https://php.net/manual/en/class.httpquerystring.php */ -class HttpQueryString implements Serializable, ArrayAccess { - const TYPE_BOOL = 3; - const TYPE_INT = 1; - const TYPE_FLOAT = 2; - const TYPE_STRING = 6; - const TYPE_ARRAY = 4; - const TYPE_OBJECT = 5; - - private static $instance; - private $queryArray; - private $queryString; - - - /** - * (PECL pecl_http >= 0.22.0) - * HttpQueryString constructor - * @link https://php.net/manual/en/function.httpquerystring-construct.php - * @param bool $global [optional] - * whether to operate on $_GET and - * $_SERVER['QUERY_STRING'] - * - * @param mixed $add [optional]- * additional/initial query string parameters - * - */ - final public function __construct ($global = null, $add = null) {} - - /** - * (PECL pecl_http >= 0.22.0)- * Get query string as array - * @link https://php.net/manual/en/function.httpquerystring-toarray.php - * @return array the array representation of the query string. - */ - public function toArray () {} - - /** - * (PECL pecl_http >= 0.22.0) - * Get query string - * @link https://php.net/manual/en/function.httpquerystring-tostring.php - * @return string the string representation of the query string. - */ - public function toString () {} - - /** - * @return string - */ - public function __toString () {} - - /** - * (PECL pecl_http >= 0.22.0) - * Get (part of) query string - * @link https://php.net/manual/en/function.httpquerystring-get.php - * @param string $key [optional] - * key of the query string param to retrieve - * - * @param mixed $type [optional]- * which variable type to enforce - * - * @param mixed $defval [optional]- * default value if key does not exist - * - * @param bool $delete [optional]- * whether to remove the key/value pair from the query string - * - * @return mixed the value of the query string param or the whole query string if no key was specified on success or defval if key does not exist. - */ - public function get ($key = null, $type = null, $defval = null, $delete = null) {} - - /** - * (PECL pecl_http >= 0.22.0)- * Set query string params - * @link https://php.net/manual/en/function.httpquerystring-set.php - * @param mixed $params - * query string params to add - * - * @return string the current query string. - */ - public function set ($params) {} - - /** - * (PECL pecl_http >= 1.1.0)- * Modifiy query string copy - * @link https://php.net/manual/en/function.httpquerystring-mod.php - * @param mixed $params - * query string params to add - * - * @return HttpQueryString a new HttpQueryString object - */ - public function mod ($params) {} - - /** - * @param $name - * @param $defval [optional] - * @param $delete [optional] - */ - public function getBool ($name, $defval, $delete) {} - - /** - * @param $name - * @param $defval [optional] - * @param $delete [optional] - */ - public function getInt ($name, $defval, $delete) {} - - /** - * @param $name - * @param $defval [optional] - * @param $delete [optional] - */ - public function getFloat ($name, $defval, $delete) {} - - /** - * @param $name - * @param $defval [optional] - * @param $delete [optional] - */ - public function getString ($name, $defval, $delete) {} - - /** - * @param $name - * @param $defval [optional] - * @param $delete [optional] - */ - public function getArray ($name, $defval, $delete) {} - - /** - * @param $name - * @param $defval [optional] - * @param $delete [optional] - */ - public function getObject ($name, $defval, $delete) {} - - /** - * @param $global [optional] - * @param $params [optional] - * @param $class_name [optional] - */ - public static function factory ($global, $params, $class_name) {} - - /** - * (PECL pecl_http >= 0.25.0)- * HttpQueryString singleton - * @link https://php.net/manual/en/function.httpquerystring-singleton.php - * @param bool $global [optional] - * whether to operate on $_GET and - * $_SERVER['QUERY_STRING'] - * - * @return HttpQueryString always the same HttpQueryString instance regarding the global setting. - */ - public static function singleton ($global = null) {} - - /** - * (PECL pecl_http >= 0.25.0)- * Change query strings charset - * @link https://php.net/manual/en/function.httpquerystring-xlate.php - * @param string $ie - * input encoding - * - * @param string $oe- * output encoding - * - * @return bool true on success or false on failure. - */ - public function xlate ($ie, $oe) {} - - /** - * String representation of object - * @link https://php.net/manual/en/serializable.serialize.php - * @return string the string representation of the object or null - * @since 5.1.0 - */ - public function serialize() - {} - - /** - * Offset to retrieve - * @link https://php.net/manual/en/arrayaccess.offsetget.php - * @param mixed $offset- * The offset to retrieve. - * - * @return mixed Can return all value types. - * @since 5.0.0 - */ - public function offsetGet($offset) - {} - - /** - * Constructs the object - * @link https://php.net/manual/en/serializable.unserialize.php - * @param string $serialized- * The string representation of the object. - * - * @return void - * @since 5.1.0 - */ - public function unserialize($serialized) - {} - - /** - * Whether a offset exists - * @link https://php.net/manual/en/arrayaccess.offsetexists.php - * @param mixed $offset- * An offset to check for. - * - * @return bool true on success or false on failure. - * - *- * The return value will be casted to boolean if non-boolean was returned. - * @since 5.0.0 - */ - public function offsetExists($offset) - {} - - /** - * Offset to set - * @link https://php.net/manual/en/arrayaccess.offsetset.php - * @param mixed $offset - * The offset to assign the value to. - * - * @param mixed $value- * The value to set. - * - * @return void - * @since 5.0.0 - */ - public function offsetSet($offset, $value) - {} - - /** - * Offset to unset - * @link https://php.net/manual/en/arrayaccess.offsetunset.php - * @param mixed $offset- * The offset to unset. - * - * @return void - * @since 5.0.0 - */ - public function offsetUnset($offset) - {} +class HttpQueryString implements Serializable, ArrayAccess +{ + public const TYPE_BOOL = 3; + public const TYPE_INT = 1; + public const TYPE_FLOAT = 2; + public const TYPE_STRING = 6; + public const TYPE_ARRAY = 4; + public const TYPE_OBJECT = 5; + private static $instance; + private $queryArray; + private $queryString; + + /** + * (PECL pecl_http >= 0.22.0)+ * HttpQueryString constructor + * @link https://php.net/manual/en/function.httpquerystring-construct.php + * @param bool $global [optional] + * whether to operate on $_GET and + * $_SERVER['QUERY_STRING'] + * + * @param mixed $add [optional]+ * additional/initial query string parameters + * + */ + final public function __construct($global = null, $add = null) {} + + /** + * (PECL pecl_http >= 0.22.0)+ * Get query string as array + * @link https://php.net/manual/en/function.httpquerystring-toarray.php + * @return array the array representation of the query string. + */ + public function toArray() {} + + /** + * (PECL pecl_http >= 0.22.0) + * Get query string + * @link https://php.net/manual/en/function.httpquerystring-tostring.php + * @return string the string representation of the query string. + */ + public function toString() {} + + /** + * @return string + */ + public function __toString() {} + + /** + * (PECL pecl_http >= 0.22.0) + * Get (part of) query string + * @link https://php.net/manual/en/function.httpquerystring-get.php + * @param string $key [optional] + * key of the query string param to retrieve + * + * @param mixed $type [optional]+ * which variable type to enforce + * + * @param mixed $defval [optional]+ * default value if key does not exist + * + * @param bool $delete [optional]+ * whether to remove the key/value pair from the query string + * + * @return mixed the value of the query string param or the whole query string if no key was specified on success or defval if key does not exist. + */ + #[Pure] + public function get($key = null, $type = null, $defval = null, $delete = null) {} + + /** + * (PECL pecl_http >= 0.22.0)+ * Set query string params + * @link https://php.net/manual/en/function.httpquerystring-set.php + * @param mixed $params + * query string params to add + * + * @return string the current query string. + */ + public function set($params) {} + + /** + * (PECL pecl_http >= 1.1.0)+ * Modifiy query string copy + * @link https://php.net/manual/en/function.httpquerystring-mod.php + * @param mixed $params + * query string params to add + * + * @return HttpQueryString a new HttpQueryString object + */ + public function mod($params) {} + + /** + * @param $name + * @param $defval [optional] + * @param $delete [optional] + */ + #[Pure] + public function getBool($name, $defval, $delete) {} + + /** + * @param $name + * @param $defval [optional] + * @param $delete [optional] + */ + #[Pure] + public function getInt($name, $defval, $delete) {} + + /** + * @param $name + * @param $defval [optional] + * @param $delete [optional] + */ + #[Pure] + public function getFloat($name, $defval, $delete) {} + + /** + * @param $name + * @param $defval [optional] + * @param $delete [optional] + */ + #[Pure] + public function getString($name, $defval, $delete) {} + + /** + * @param $name + * @param $defval [optional] + * @param $delete [optional] + */ + #[Pure] + public function getArray($name, $defval, $delete) {} + + /** + * @param $name + * @param $defval [optional] + * @param $delete [optional] + */ + #[Pure] + public function getObject($name, $defval, $delete) {} + + /** + * @param $global [optional] + * @param $params [optional] + * @param $class_name [optional] + */ + public static function factory($global, $params, $class_name) {} + + /** + * (PECL pecl_http >= 0.25.0)+ * HttpQueryString singleton + * @link https://php.net/manual/en/function.httpquerystring-singleton.php + * @param bool $global [optional] + * whether to operate on $_GET and + * $_SERVER['QUERY_STRING'] + * + * @return HttpQueryString always the same HttpQueryString instance regarding the global setting. + */ + public static function singleton($global = null) {} + + /** + * (PECL pecl_http >= 0.25.0)+ * Change query strings charset + * @link https://php.net/manual/en/function.httpquerystring-xlate.php + * @param string $ie + * input encoding + * + * @param string $oe+ * output encoding + * + * @return bool true on success or false on failure. + */ + public function xlate($ie, $oe) {} + + /** + * String representation of object + * @link https://php.net/manual/en/serializable.serialize.php + * @return string the string representation of the object or null + * @since 5.1.0 + */ + public function serialize() {} + + /** + * Offset to retrieve + * @link https://php.net/manual/en/arrayaccess.offsetget.php + * @param mixed $offset+ * The offset to retrieve. + * + * @return mixed Can return all value types. + * @since 5.0.0 + */ + public function offsetGet($offset) {} + + /** + * Constructs the object + * @link https://php.net/manual/en/serializable.unserialize.php + * @param string $serialized+ * The string representation of the object. + * + * @return void + * @since 5.1.0 + */ + public function unserialize($serialized) {} + + /** + * Whether a offset exists + * @link https://php.net/manual/en/arrayaccess.offsetexists.php + * @param mixed $offset+ * An offset to check for. + * + * @return bool true on success or false on failure. + * + *+ * The return value will be casted to boolean if non-boolean was returned. + * @since 5.0.0 + */ + public function offsetExists($offset) {} + + /** + * Offset to set + * @link https://php.net/manual/en/arrayaccess.offsetset.php + * @param mixed $offset + * The offset to assign the value to. + * + * @param mixed $value+ * The value to set. + * + * @return void + * @since 5.0.0 + */ + public function offsetSet($offset, $value) {} + + /** + * Offset to unset + * @link https://php.net/manual/en/arrayaccess.offsetunset.php + * @param mixed $offset+ * The offset to unset. + * + * @return void + * @since 5.0.0 + */ + public function offsetUnset($offset) {} } /** * @link https://php.net/manual/en/class.httprequest.php */ -class HttpRequest { - const METH_GET = 1; - const METH_HEAD = 2; - const METH_POST = 3; - const METH_PUT = 4; - const METH_DELETE = 5; - const METH_OPTIONS = 6; - const METH_TRACE = 7; - const METH_CONNECT = 8; - const METH_PROPFIND = 9; - const METH_PROPPATCH = 10; - const METH_MKCOL = 11; - const METH_COPY = 12; - const METH_MOVE = 13; - const METH_LOCK = 14; - const METH_UNLOCK = 15; - const METH_VERSION_CONTROL = 16; - const METH_REPORT = 17; - const METH_CHECKOUT = 18; - const METH_CHECKIN = 19; - const METH_UNCHECKOUT = 20; - const METH_MKWORKSPACE = 21; - const METH_UPDATE = 22; - const METH_LABEL = 23; - const METH_MERGE = 24; - const METH_BASELINE_CONTROL = 25; - const METH_MKACTIVITY = 26; - const METH_ACL = 27; - const VERSION_1_0 = 1; - const VERSION_1_1 = 2; - const VERSION_NONE = 0; - const VERSION_ANY = 0; - const SSL_VERSION_TLSv1 = 1; - const SSL_VERSION_SSLv2 = 2; - const SSL_VERSION_SSLv3 = 3; - const SSL_VERSION_ANY = 0; - const IPRESOLVE_V4 = 1; - const IPRESOLVE_V6 = 2; - const IPRESOLVE_ANY = 0; - const AUTH_BASIC = 1; - const AUTH_DIGEST = 2; - const AUTH_NTLM = 8; - const AUTH_GSSNEG = 4; - const AUTH_ANY = -1; - const PROXY_SOCKS4 = 4; - const PROXY_SOCKS5 = 5; - const PROXY_HTTP = 0; - - private $options; - private $postFields; - private $postFiles; - private $responseInfo; - private $responseMessage; - private $responseCode; - private $responseStatus; - private $method; - private $url; - private $contentType; - private $requestBody; - private $queryData; - private $putFile; - private $putData; - private $history; - public $recordHistory; - - - /** - * (PECL pecl_http >= 0.10.0)- * HttpRequest constructor - * @link https://php.net/manual/en/function.httprequest-construct.php - * @param string $url [optional] - * the target request url - * - * @param int $request_method [optional]- * the request method to use - * - * @param array $options [optional]- * an associative array with request options - * - */ - public function __construct ($url = null, $request_method = null, array $options = null ) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Set options - * @link https://php.net/manual/en/function.httprequest-setoptions.php - * @param array $options [optional] - * an associative array, which values will overwrite the - * currently set request options; - * if empty or omitted, the options of the HttpRequest object will be reset - * - * @return bool true on success or false on failure. - */ - public function setOptions (array $options = null ) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get options - * @link https://php.net/manual/en/function.httprequest-getoptions.php - * @return array an associative array containing currently set options. - */ - public function getOptions () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set ssl options - * @link https://php.net/manual/en/function.httprequest-setssloptions.php - * @param array $options [optional] - * an associative array containing any SSL specific options; - * if empty or omitted, the SSL options will be reset - * - * @return bool true on success or false on failure. - */ - public function setSslOptions (array $options = null ) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get ssl options - * @link https://php.net/manual/en/function.httprequest-getssloptions.php - * @return array an associative array containing any previously set SSL options. - */ - public function getSslOptions () {} - - /** - * (PECL pecl_http >= 0.12.0) - * Add ssl options - * @link https://php.net/manual/en/function.httprequest-addssloptions.php - * @param array $options - * an associative array as parameter containing additional SSL specific options - * - * @return bool true on success or false on failure. - */ - public function addSslOptions (sarray $option) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Add headers - * @link https://php.net/manual/en/function.httprequest-addheaders.php - * @param array $headers - * an associative array as parameter containing additional header name/value pairs - * - * @return bool true on success or false on failure. - */ - public function addHeaders (array $headers) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get headers - * @link https://php.net/manual/en/function.httprequest-getheaders.php - * @return array an associative array containing all currently set headers. - */ - public function getHeaders () {} - - /** - * (PECL pecl_http >= 0.12.0) - * Set headers - * @link https://php.net/manual/en/function.httprequest-setheaders.php - * @param array $headers [optional] - * an associative array as parameter containing header name/value pairs; - * if empty or omitted, all previously set headers will be unset - * - * @return bool true on success or false on failure. - */ - public function setHeaders ( array $headers = null ) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Add cookies - * @link https://php.net/manual/en/function.httprequest-addcookies.php - * @param array $cookies - * an associative array containing any cookie name/value pairs to add - * - * @return bool true on success or false on failure. - */ - public function addCookies (array $cookies) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get cookies - * @link https://php.net/manual/en/function.httprequest-getcookies.php - * @return array an associative array containing any previously set cookies. - */ - public function getCookies () {} - - /** - * (PECL pecl_http >= 0.12.0) - * Set cookies - * @link https://php.net/manual/en/function.httprequest-setcookies.php - * @param array $cookies [optional] - * an associative array as parameter containing cookie name/value pairs; - * if empty or omitted, all previously set cookies will be unset - * - * @return bool true on success or false on failure. - */ - public function setCookies ( array $cookies = null ) {} - - /** - * (PECL pecl_http >= 1.0.0)- * Enable cookies - * @link https://php.net/manual/en/function.httprequest-enablecookies.php - * @return bool true on success or false on failure. - */ - public function enableCookies () {} - - /** - * (PECL pecl_http >= 1.0.0) - * Reset cookies - * @link https://php.net/manual/en/function.httprequest-resetcookies.php - * @param bool $session_only [optional] - * whether only session cookies should be reset (needs libcurl >= v7.15.4, else libcurl >= v7.14.1) - * - * @return bool true on success or false on failure. - */ - public function resetCookies ($session_only = null) {} - - public function flushCookies () {} - - /** - * (PECL pecl_http >= 0.10.0)- * Set method - * @link https://php.net/manual/en/function.httprequest-setmethod.php - * @param int $request_method - * the request method to use - * - * @return bool true on success or false on failure. - */ - public function setMethod ($request_method) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get method - * @link https://php.net/manual/en/function.httprequest-getmethod.php - * @return int the currently set request method. - */ - public function getMethod () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set URL - * @link https://php.net/manual/en/function.httprequest-seturl.php - * @param string $url - * the request url - * - * @return bool true on success or false on failure. - */ - public function setUrl ($url) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get url - * @link https://php.net/manual/en/function.httprequest-geturl.php - * @return string the currently set request url as string. - */ - public function getUrl () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set content type - * @link https://php.net/manual/en/function.httprequest-setcontenttype.php - * @param string $content_type - * the content type of the request (primary/secondary) - * - * @return bool TRUE on success, or FALSE if the content type does not seem to - * contain a primary and a secondary part. - */ - public function setContentType ($content_type) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get content type - * @link https://php.net/manual/en/function.httprequest-getcontenttype.php - * @return string the previously set content type as string. - */ - public function getContentType () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set query data - * @link https://php.net/manual/en/function.httprequest-setquerydata.php - * @param mixed $query_data - * a string or associative array parameter containing the pre-encoded - * query string or to be encoded query fields; - * if empty, the query data will be unset - * - * @return bool true on success or false on failure. - */ - public function setQueryData ($query_data) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get query data - * @link https://php.net/manual/en/function.httprequest-getquerydata.php - * @return string a string containing the urlencoded query. - */ - public function getQueryData () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Add query data - * @link https://php.net/manual/en/function.httprequest-addquerydata.php - * @param array $query_params - * an associative array as parameter containing the query fields to add - * - * @return bool true on success or false on failure. - */ - public function addQueryData (array $query_params) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Set post fields - * @link https://php.net/manual/en/function.httprequest-setpostfields.php - * @param array $post_data - * an associative array containing the post fields; - * if empty, the post data will be unset - * - * @return bool true on success or false on failure. - */ - public function setPostFields (array $post_data) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get post fields - * @link https://php.net/manual/en/function.httprequest-getpostfields.php - * @return array the currently set post fields as associative array. - */ - public function getPostFields () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Add post fields - * @link https://php.net/manual/en/function.httprequest-addpostfields.php - * @param array $post_data - * an associative array as parameter containing the post fields - * - * @return bool true on success or false on failure. - */ - public function addPostFields (array $post_data) {} - - /** - * @param $request_body_data [optional] - */ - public function setBody ($request_body_data) {} - - public function getBody () {} - - /** - * @param $request_body_data - */ - public function addBody ($request_body_data) {} - - /** - * (PECL pecl_http 0.14.0-1.4.1)- * Set raw post data - * @link https://php.net/manual/en/function.httprequest-setrawpostdata.php - * @param string $raw_post_data [optional] - * raw post data - * - * @return bool true on success or false on failure. - */ - public function setRawPostData ($raw_post_data = null) {} - - /** - * (PECL pecl_http 0.14.0-1.4.1)- * Get raw post data - * @link https://php.net/manual/en/function.httprequest-getrawpostdata.php - * @return string a string containing the currently set raw post data. - */ - public function getRawPostData () {} - - /** - * (PECL pecl_http 0.14.0-1.4.1) - * Add raw post data - * @link https://php.net/manual/en/function.httprequest-addrawpostdata.php - * @param string $raw_post_data - * the raw post data to concatenate - * - * @return bool true on success or false on failure. - */ - public function addRawPostData ($raw_post_data) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Set post files - * @link https://php.net/manual/en/function.httprequest-setpostfiles.php - * @param array $post_files - * an array containing the files to post; - * if empty, the post files will be unset - * - * @return bool true on success or false on failure. - */ - public function setPostFiles (array $post_files) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Add post file - * @link https://php.net/manual/en/function.httprequest-addpostfile.php - * @param string $name - * the form element name - * - * @param string $file- * the path to the file - * - * @param string $content_type [optional]- * the content type of the file - * - * @return bool TRUE on success, or FALSE if the content type seems not to contain a - * primary and a secondary content type part. - */ - public function addPostFile ($name, $file, $content_type = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get post files - * @link https://php.net/manual/en/function.httprequest-getpostfiles.php - * @return array an array containing currently set post files. - */ - public function getPostFiles () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set put file - * @link https://php.net/manual/en/function.httprequest-setputfile.php - * @param string $file [optional] - * the path to the file to send; - * if empty or omitted the put file will be unset - * - * @return bool true on success or false on failure. - */ - public function setPutFile ($file = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get put file - * @link https://php.net/manual/en/function.httprequest-getputfile.php - * @return string a string containing the path to the currently set put file. - */ - public function getPutFile () {} - - /** - * (PECL pecl_http >= 0.25.0) - * Set put data - * @link https://php.net/manual/en/function.httprequest-setputdata.php - * @param string $put_data [optional] - * the data to upload - * - * @return bool true on success or false on failure. - */ - public function setPutData ($put_data = null) {} - - /** - * (PECL pecl_http >= 0.25.0)- * Get put data - * @link https://php.net/manual/en/function.httprequest-getputdata.php - * @return string a string containing the currently set PUT data. - */ - public function getPutData () {} - - /** - * (PECL pecl_http >= 0.25.0) - * Add put data - * @link https://php.net/manual/en/function.httprequest-addputdata.php - * @param string $put_data - * the data to concatenate - * - * @return bool true on success or false on failure. - */ - public function addPutData ($put_data) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Send request - * @link https://php.net/manual/en/function.httprequest-send.php - * @return HttpMessage the received response as HttpMessage object. - */ - public function send () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get response data - * @link https://php.net/manual/en/function.httprequest-getresponsedata.php - * @return array an associative array with the key "headers" containing an associative - * array holding all response headers, as well as the key "body" containing a - * string with the response body. - */ - public function getResponseData () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get response header(s) - * @link https://php.net/manual/en/function.httprequest-getresponseheader.php - * @param string $name [optional] - * header to read; if empty, all response headers will be returned - * - * @return mixed either a string with the value of the header matching name if requested, - * FALSE on failure, or an associative array containing all response headers. - */ - public function getResponseHeader ($name = null) {} - - /** - * (PECL pecl_http >= 0.23.0)- * Get response cookie(s) - * @link https://php.net/manual/en/function.httprequest-getresponsecookies.php - * @param int $flags [optional] - * http_parse_cookie flags - * - * @param array $allowed_extras [optional]- * allowed keys treated as extra information instead of cookie names - * - * @return stdClass[] an array of stdClass objects like http_parse_cookie would return. - */ - public function getResponseCookies ($flags = null, array $allowed_extras = null ) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get response code - * @link https://php.net/manual/en/function.httprequest-getresponsecode.php - * @return int an int representing the response code. - */ - public function getResponseCode () {} - - /** - * (PECL pecl_http >= 0.23.0) - * Get response status - * @link https://php.net/manual/en/function.httprequest-getresponsestatus.php - * @return string a string containing the response status text. - */ - public function getResponseStatus () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get response body - * @link https://php.net/manual/en/function.httprequest-getresponsebody.php - * @return string a string containing the response body. - */ - public function getResponseBody () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get response info - * @link https://php.net/manual/en/function.httprequest-getresponseinfo.php - * @param string $name [optional] - * the info to read; if empty or omitted, an associative array containing - * all available info will be returned - * - * @return mixed either a scalar containing the value of the info matching name if - * requested, FALSE on failure, or an associative array containing all - * available info. - */ - public function getResponseInfo ($name = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get response message - * @link https://php.net/manual/en/function.httprequest-getresponsemessage.php - * @return HttpMessage an HttpMessage object of the response. - */ - public function getResponseMessage () {} - - /** - * (PECL pecl_http >= 0.21.0) - * Get raw response message - * @link https://php.net/manual/en/function.httprequest-getrawresponsemessage.php - * @return string the complete web server response, including the headers in a form of a string. - */ - public function getRawResponseMessage () {} - - /** - * (PECL pecl_http >= 0.11.0) - * Get request message - * @link https://php.net/manual/en/function.httprequest-getrequestmessage.php - * @return HttpMessage an HttpMessage object representing the sent request. - */ - public function getRequestMessage () {} - - /** - * (PECL pecl_http >= 0.21.0) - * Get raw request message - * @link https://php.net/manual/en/function.httprequest-getrawrequestmessage.php - * @return string an HttpMessage in a form of a string. - */ - public function getRawRequestMessage () {} - - /** - * (PECL pecl_http >= 0.15.0) - * Get history - * @link https://php.net/manual/en/function.httprequest-gethistory.php - * @return HttpMessage an HttpMessage object representing the complete request/response history. - */ - public function getHistory () {} - - /** - * (PECL pecl_http >= 0.15.0) - * Clear history - * @link https://php.net/manual/en/function.httprequest-clearhistory.php - * @return void - */ - public function clearHistory () {} - - /** - * @param $url [optional] - * @param $method [optional] - * @param $options [optional] - * @param $class_name [optional] - */ - public static function factory ($url, $method, $options, $class_name) {} - - /** - * @param $url - * @param $options [optional] - * @param $info [optional] - */ - public static function get ($url, $options, &$info) {} - - /** - * @param $url - * @param $options [optional] - * @param $info [optional] - */ - public static function head ($url, $options, &$info) {} - - /** - * @param $url - * @param $data - * @param $options [optional] - * @param $info [optional] - */ - public static function postData ($url, $data, $options, &$info) {} - - /** - * @param $url - * @param $data - * @param $options [optional] - * @param $info [optional] - */ - public static function postFields ($url, $data, $options, &$info) {} - - /** - * @param $url - * @param $data - * @param $options [optional] - * @param $info [optional] - */ - public static function putData ($url, $data, $options, &$info) {} - - /** - * @param $url - * @param $file - * @param $options [optional] - * @param $info [optional] - */ - public static function putFile ($url, $file, $options, &$info) {} - - /** - * @param $url - * @param $stream - * @param $options [optional] - * @param $info [optional] - */ - public static function putStream ($url, $stream, $options, &$info) {} - - /** - * @param $method_name - */ - public static function methodRegister ($method_name) {} - - /** - * @param $method - */ - public static function methodUnregister ($method) {} - - /** - * @param $method_id - */ - public static function methodName ($method_id) {} - - /** - * @param $method - */ - public static function methodExists ($method) {} - - /** - * @param $fields - * @param $files - */ - public static function encodeBody ($fields, $files) {} - +class HttpRequest +{ + public const METH_GET = 1; + public const METH_HEAD = 2; + public const METH_POST = 3; + public const METH_PUT = 4; + public const METH_DELETE = 5; + public const METH_OPTIONS = 6; + public const METH_TRACE = 7; + public const METH_CONNECT = 8; + public const METH_PROPFIND = 9; + public const METH_PROPPATCH = 10; + public const METH_MKCOL = 11; + public const METH_COPY = 12; + public const METH_MOVE = 13; + public const METH_LOCK = 14; + public const METH_UNLOCK = 15; + public const METH_VERSION_CONTROL = 16; + public const METH_REPORT = 17; + public const METH_CHECKOUT = 18; + public const METH_CHECKIN = 19; + public const METH_UNCHECKOUT = 20; + public const METH_MKWORKSPACE = 21; + public const METH_UPDATE = 22; + public const METH_LABEL = 23; + public const METH_MERGE = 24; + public const METH_BASELINE_CONTROL = 25; + public const METH_MKACTIVITY = 26; + public const METH_ACL = 27; + public const VERSION_1_0 = 1; + public const VERSION_1_1 = 2; + public const VERSION_NONE = 0; + public const VERSION_ANY = 0; + public const SSL_VERSION_TLSv1 = 1; + public const SSL_VERSION_SSLv2 = 2; + public const SSL_VERSION_SSLv3 = 3; + public const SSL_VERSION_ANY = 0; + public const IPRESOLVE_V4 = 1; + public const IPRESOLVE_V6 = 2; + public const IPRESOLVE_ANY = 0; + public const AUTH_BASIC = 1; + public const AUTH_DIGEST = 2; + public const AUTH_NTLM = 8; + public const AUTH_GSSNEG = 4; + public const AUTH_ANY = -1; + public const PROXY_SOCKS4 = 4; + public const PROXY_SOCKS5 = 5; + public const PROXY_HTTP = 0; + private $options; + private $postFields; + private $postFiles; + private $responseInfo; + private $responseMessage; + private $responseCode; + private $responseStatus; + private $method; + private $url; + private $contentType; + private $requestBody; + private $queryData; + private $putFile; + private $putData; + private $history; + public $recordHistory; + + /** + * (PECL pecl_http >= 0.10.0) + * HttpRequest constructor + * @link https://php.net/manual/en/function.httprequest-construct.php + * @param string $url [optional] + * the target request url + * + * @param int $request_method [optional]+ * the request method to use + * + * @param null|array $options [optional]+ * an associative array with request options + * + */ + public function __construct($url = null, $request_method = null, ?array $options = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Set options + * @link https://php.net/manual/en/function.httprequest-setoptions.php + * @param null|array $options [optional] + * an associative array, which values will overwrite the + * currently set request options; + * if empty or omitted, the options of the HttpRequest object will be reset + * + * @return bool true on success or false on failure. + */ + public function setOptions(?array $options = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get options + * @link https://php.net/manual/en/function.httprequest-getoptions.php + * @return array an associative array containing currently set options. + */ + #[Pure] + public function getOptions() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set ssl options + * @link https://php.net/manual/en/function.httprequest-setssloptions.php + * @param null|array $options [optional] + * an associative array containing any SSL specific options; + * if empty or omitted, the SSL options will be reset + * + * @return bool true on success or false on failure. + */ + public function setSslOptions(?array $options = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get ssl options + * @link https://php.net/manual/en/function.httprequest-getssloptions.php + * @return array an associative array containing any previously set SSL options. + */ + #[Pure] + public function getSslOptions() {} + + /** + * (PECL pecl_http >= 0.12.0) + * Add ssl options + * @link https://php.net/manual/en/function.httprequest-addssloptions.php + * @param array $option + * an associative array as parameter containing additional SSL specific options + * + * @return bool true on success or false on failure. + */ + public function addSslOptions(array $option) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Add headers + * @link https://php.net/manual/en/function.httprequest-addheaders.php + * @param array $headers + * an associative array as parameter containing additional header name/value pairs + * + * @return bool true on success or false on failure. + */ + public function addHeaders(array $headers) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get headers + * @link https://php.net/manual/en/function.httprequest-getheaders.php + * @return array an associative array containing all currently set headers. + */ + #[Pure] + public function getHeaders() {} + + /** + * (PECL pecl_http >= 0.12.0) + * Set headers + * @link https://php.net/manual/en/function.httprequest-setheaders.php + * @param null|array $headers [optional] + * an associative array as parameter containing header name/value pairs; + * if empty or omitted, all previously set headers will be unset + * + * @return bool true on success or false on failure. + */ + public function setHeaders(?array $headers = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Add cookies + * @link https://php.net/manual/en/function.httprequest-addcookies.php + * @param array $cookies + * an associative array containing any cookie name/value pairs to add + * + * @return bool true on success or false on failure. + */ + public function addCookies(array $cookies) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get cookies + * @link https://php.net/manual/en/function.httprequest-getcookies.php + * @return array an associative array containing any previously set cookies. + */ + #[Pure] + public function getCookies() {} + + /** + * (PECL pecl_http >= 0.12.0) + * Set cookies + * @link https://php.net/manual/en/function.httprequest-setcookies.php + * @param null|array $cookies [optional] + * an associative array as parameter containing cookie name/value pairs; + * if empty or omitted, all previously set cookies will be unset + * + * @return bool true on success or false on failure. + */ + public function setCookies(?array $cookies = null) {} + + /** + * (PECL pecl_http >= 1.0.0)+ * Enable cookies + * @link https://php.net/manual/en/function.httprequest-enablecookies.php + * @return bool true on success or false on failure. + */ + public function enableCookies() {} + + /** + * (PECL pecl_http >= 1.0.0) + * Reset cookies + * @link https://php.net/manual/en/function.httprequest-resetcookies.php + * @param bool $session_only [optional] + * whether only session cookies should be reset (needs libcurl >= v7.15.4, else libcurl >= v7.14.1) + * + * @return bool true on success or false on failure. + */ + public function resetCookies($session_only = null) {} + + public function flushCookies() {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Set method + * @link https://php.net/manual/en/function.httprequest-setmethod.php + * @param int $request_method + * the request method to use + * + * @return bool true on success or false on failure. + */ + public function setMethod($request_method) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get method + * @link https://php.net/manual/en/function.httprequest-getmethod.php + * @return int the currently set request method. + */ + #[Pure] + public function getMethod() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set URL + * @link https://php.net/manual/en/function.httprequest-seturl.php + * @param string $url + * the request url + * + * @return bool true on success or false on failure. + */ + public function setUrl($url) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get url + * @link https://php.net/manual/en/function.httprequest-geturl.php + * @return string the currently set request url as string. + */ + #[Pure] + public function getUrl() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set content type + * @link https://php.net/manual/en/function.httprequest-setcontenttype.php + * @param string $content_type + * the content type of the request (primary/secondary) + * + * @return bool TRUE on success, or FALSE if the content type does not seem to + * contain a primary and a secondary part. + */ + public function setContentType($content_type) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get content type + * @link https://php.net/manual/en/function.httprequest-getcontenttype.php + * @return string the previously set content type as string. + */ + #[Pure] + public function getContentType() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set query data + * @link https://php.net/manual/en/function.httprequest-setquerydata.php + * @param mixed $query_data + * a string or associative array parameter containing the pre-encoded + * query string or to be encoded query fields; + * if empty, the query data will be unset + * + * @return bool true on success or false on failure. + */ + public function setQueryData($query_data) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get query data + * @link https://php.net/manual/en/function.httprequest-getquerydata.php + * @return string a string containing the urlencoded query. + */ + #[Pure] + public function getQueryData() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Add query data + * @link https://php.net/manual/en/function.httprequest-addquerydata.php + * @param array $query_params + * an associative array as parameter containing the query fields to add + * + * @return bool true on success or false on failure. + */ + public function addQueryData(array $query_params) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Set post fields + * @link https://php.net/manual/en/function.httprequest-setpostfields.php + * @param array $post_data + * an associative array containing the post fields; + * if empty, the post data will be unset + * + * @return bool true on success or false on failure. + */ + public function setPostFields(array $post_data) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get post fields + * @link https://php.net/manual/en/function.httprequest-getpostfields.php + * @return array the currently set post fields as associative array. + */ + #[Pure] + public function getPostFields() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Add post fields + * @link https://php.net/manual/en/function.httprequest-addpostfields.php + * @param array $post_data + * an associative array as parameter containing the post fields + * + * @return bool true on success or false on failure. + */ + public function addPostFields(array $post_data) {} + + /** + * @param $request_body_data [optional] + */ + public function setBody($request_body_data) {} + + #[Pure] + public function getBody() {} + + /** + * @param $request_body_data + */ + public function addBody($request_body_data) {} + + /** + * (PECL pecl_http 0.14.0-1.4.1)+ * Set raw post data + * @link https://php.net/manual/en/function.httprequest-setrawpostdata.php + * @param string $raw_post_data [optional] + * raw post data + * + * @return bool true on success or false on failure. + */ + public function setRawPostData($raw_post_data = null) {} + + /** + * (PECL pecl_http 0.14.0-1.4.1)+ * Get raw post data + * @link https://php.net/manual/en/function.httprequest-getrawpostdata.php + * @return string a string containing the currently set raw post data. + */ + #[Pure] + public function getRawPostData() {} + + /** + * (PECL pecl_http 0.14.0-1.4.1) + * Add raw post data + * @link https://php.net/manual/en/function.httprequest-addrawpostdata.php + * @param string $raw_post_data + * the raw post data to concatenate + * + * @return bool true on success or false on failure. + */ + public function addRawPostData($raw_post_data) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Set post files + * @link https://php.net/manual/en/function.httprequest-setpostfiles.php + * @param array $post_files + * an array containing the files to post; + * if empty, the post files will be unset + * + * @return bool true on success or false on failure. + */ + public function setPostFiles(array $post_files) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Add post file + * @link https://php.net/manual/en/function.httprequest-addpostfile.php + * @param string $name + * the form element name + * + * @param string $file+ * the path to the file + * + * @param string $content_type [optional]+ * the content type of the file + * + * @return bool TRUE on success, or FALSE if the content type seems not to contain a + * primary and a secondary content type part. + */ + public function addPostFile($name, $file, $content_type = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get post files + * @link https://php.net/manual/en/function.httprequest-getpostfiles.php + * @return array an array containing currently set post files. + */ + #[Pure] + public function getPostFiles() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set put file + * @link https://php.net/manual/en/function.httprequest-setputfile.php + * @param string $file [optional] + * the path to the file to send; + * if empty or omitted the put file will be unset + * + * @return bool true on success or false on failure. + */ + public function setPutFile($file = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get put file + * @link https://php.net/manual/en/function.httprequest-getputfile.php + * @return string a string containing the path to the currently set put file. + */ + #[Pure] + public function getPutFile() {} + + /** + * (PECL pecl_http >= 0.25.0) + * Set put data + * @link https://php.net/manual/en/function.httprequest-setputdata.php + * @param string $put_data [optional] + * the data to upload + * + * @return bool true on success or false on failure. + */ + public function setPutData($put_data = null) {} + + /** + * (PECL pecl_http >= 0.25.0)+ * Get put data + * @link https://php.net/manual/en/function.httprequest-getputdata.php + * @return string a string containing the currently set PUT data. + */ + #[Pure] + public function getPutData() {} + + /** + * (PECL pecl_http >= 0.25.0) + * Add put data + * @link https://php.net/manual/en/function.httprequest-addputdata.php + * @param string $put_data + * the data to concatenate + * + * @return bool true on success or false on failure. + */ + public function addPutData($put_data) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Send request + * @link https://php.net/manual/en/function.httprequest-send.php + * @return HttpMessage the received response as HttpMessage object. + */ + public function send() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get response data + * @link https://php.net/manual/en/function.httprequest-getresponsedata.php + * @return array an associative array with the key "headers" containing an associative + * array holding all response headers, as well as the key "body" containing a + * string with the response body. + */ + #[Pure] + public function getResponseData() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get response header(s) + * @link https://php.net/manual/en/function.httprequest-getresponseheader.php + * @param string $name [optional] + * header to read; if empty, all response headers will be returned + * + * @return mixed either a string with the value of the header matching name if requested, + * FALSE on failure, or an associative array containing all response headers. + */ + #[Pure] + public function getResponseHeader($name = null) {} + + /** + * (PECL pecl_http >= 0.23.0)+ * Get response cookie(s) + * @link https://php.net/manual/en/function.httprequest-getresponsecookies.php + * @param int $flags [optional] + * http_parse_cookie flags + * + * @param null|array $allowed_extras [optional]+ * allowed keys treated as extra information instead of cookie names + * + * @return stdClass[] an array of stdClass objects like http_parse_cookie would return. + */ + #[Pure] + public function getResponseCookies($flags = null, ?array $allowed_extras = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get response code + * @link https://php.net/manual/en/function.httprequest-getresponsecode.php + * @return int an int representing the response code. + */ + #[Pure] + public function getResponseCode() {} + + /** + * (PECL pecl_http >= 0.23.0) + * Get response status + * @link https://php.net/manual/en/function.httprequest-getresponsestatus.php + * @return string a string containing the response status text. + */ + #[Pure] + public function getResponseStatus() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get response body + * @link https://php.net/manual/en/function.httprequest-getresponsebody.php + * @return string a string containing the response body. + */ + #[Pure] + public function getResponseBody() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get response info + * @link https://php.net/manual/en/function.httprequest-getresponseinfo.php + * @param string $name [optional] + * the info to read; if empty or omitted, an associative array containing + * all available info will be returned + * + * @return mixed either a scalar containing the value of the info matching name if + * requested, FALSE on failure, or an associative array containing all + * available info. + */ + #[Pure] + public function getResponseInfo($name = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get response message + * @link https://php.net/manual/en/function.httprequest-getresponsemessage.php + * @return HttpMessage an HttpMessage object of the response. + */ + #[Pure] + public function getResponseMessage() {} + + /** + * (PECL pecl_http >= 0.21.0) + * Get raw response message + * @link https://php.net/manual/en/function.httprequest-getrawresponsemessage.php + * @return string the complete web server response, including the headers in a form of a string. + */ + #[Pure] + public function getRawResponseMessage() {} + + /** + * (PECL pecl_http >= 0.11.0) + * Get request message + * @link https://php.net/manual/en/function.httprequest-getrequestmessage.php + * @return HttpMessage an HttpMessage object representing the sent request. + */ + #[Pure] + public function getRequestMessage() {} + + /** + * (PECL pecl_http >= 0.21.0) + * Get raw request message + * @link https://php.net/manual/en/function.httprequest-getrawrequestmessage.php + * @return string an HttpMessage in a form of a string. + */ + #[Pure] + public function getRawRequestMessage() {} + + /** + * (PECL pecl_http >= 0.15.0) + * Get history + * @link https://php.net/manual/en/function.httprequest-gethistory.php + * @return HttpMessage an HttpMessage object representing the complete request/response history. + */ + #[Pure] + public function getHistory() {} + + /** + * (PECL pecl_http >= 0.15.0) + * Clear history + * @link https://php.net/manual/en/function.httprequest-clearhistory.php + * @return void + */ + public function clearHistory() {} + + /** + * @param $url [optional] + * @param $method [optional] + * @param $options [optional] + * @param $class_name [optional] + */ + public static function factory($url, $method, $options, $class_name) {} + + /** + * @param $url + * @param $options [optional] + * @param &$info [optional] + */ + public static function get($url, $options, &$info) {} + + /** + * @param $url + * @param $options [optional] + * @param &$info [optional] + */ + public static function head($url, $options, &$info) {} + + /** + * @param $url + * @param $data + * @param $options [optional] + * @param &$info [optional] + */ + public static function postData($url, $data, $options, &$info) {} + + /** + * @param $url + * @param $data + * @param $options [optional] + * @param &$info [optional] + */ + public static function postFields($url, $data, $options, &$info) {} + + /** + * @param $url + * @param $data + * @param $options [optional] + * @param &$info [optional] + */ + public static function putData($url, $data, $options, &$info) {} + + /** + * @param $url + * @param $file + * @param $options [optional] + * @param &$info [optional] + */ + public static function putFile($url, $file, $options, &$info) {} + + /** + * @param $url + * @param $stream + * @param $options [optional] + * @param &$info [optional] + */ + public static function putStream($url, $stream, $options, &$info) {} + + /** + * @param $method_name + */ + public static function methodRegister($method_name) {} + + /** + * @param $method + */ + public static function methodUnregister($method) {} + + /** + * @param $method_id + */ + public static function methodName($method_id) {} + + /** + * @param $method + */ + public static function methodExists($method) {} + + /** + * @param $fields + * @param $files + */ + public static function encodeBody($fields, $files) {} } -class HttpRequestDataShare implements Countable { - private static $instance; - public $cookie; - public $dns; - public $ssl; - public $connect; +class HttpRequestDataShare implements Countable +{ + private static $instance; + public $cookie; + public $dns; + public $ssl; + public $connect; + public function __destruct() {} - public function __destruct () {} + public function count() {} - public function count () {} + /** + * @param HttpRequest $request + */ + public function attach(HttpRequest $request) {} - /** - * @param HttpRequest $request - */ - public function attach (HttpRequest $request) {} + /** + * @param HttpRequest $request + */ + public function detach(HttpRequest $request) {} - /** - * @param HttpRequest $request - */ - public function detach (HttpRequest $request) {} + public function reset() {} - public function reset () {} - - /** - * @param $global [optional] - * @param $class_name [optional] - */ - public static function factory ($global, $class_name) {} - - /** - * @param $global [optional] - */ - public static function singleton ($global) {} + /** + * @param $global [optional] + * @param $class_name [optional] + */ + public static function factory($global, $class_name) {} + /** + * @param $global [optional] + */ + public static function singleton($global) {} } /** * @link https://php.net/manual/en/class.httprequestpool.php */ -class HttpRequestPool implements Countable, Iterator { - - /** - * (PECL pecl_http >= 0.10.0) - * HttpRequestPool constructor - * @link https://php.net/manual/en/function.httprequestpool-construct.php - * @param HttpRequest $request [optional] - * HttpRequest object to attach - * - */ - public function __construct ( HttpRequest $request = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * HttpRequestPool destructor - * @link https://php.net/manual/en/function.httprequestpool-destruct.php - * @return void - */ - public function __destruct () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Attach HttpRequest - * @link https://php.net/manual/en/function.httprequestpool-attach.php - * @param HttpRequest $request - * an HttpRequest object not already attached to any HttpRequestPool object - * - * @return bool true on success or false on failure. - */ - public function attach ( HttpRequest $request) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Detach HttpRequest - * @link https://php.net/manual/en/function.httprequestpool-detach.php - * @param HttpRequest $request - * an HttpRequest object attached to this HttpRequestPool object - * - * @return bool true on success or false on failure. - */ - public function detach ( HttpRequest $request ) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Send all requests - * @link https://php.net/manual/en/function.httprequestpool-send.php - * @return bool true on success or false on failure. - */ - public function send () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Reset request pool - * @link https://php.net/manual/en/function.httprequestpool-reset.php - * @return void - */ - public function reset () {} - - /** - * (PECL pecl_http >= 0.15.0) - * Perform socket actions - * @link https://php.net/manual/en/function.httprequestpool-socketperform.php - * @return bool TRUE until each request has finished its transaction. - */ - protected function socketPerform () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Perform socket select - * @link https://php.net/manual/en/function.httprequestpool-socketselect.php - * @return bool true on success or false on failure. - */ - protected function socketSelect () {} - - public function valid () {} - - public function current () {} - - public function key () {} - - public function next () {} - - public function rewind () {} - - public function count () {} - - /** - * (PECL pecl_http >= 0.16.0) - * Get attached requests - * @link https://php.net/manual/en/function.httprequestpool-getattachedrequests.php - * @return array an array containing all currently attached HttpRequest objects. - */ - public function getAttachedRequests () {} - - /** - * (PECL pecl_http >= 0.16.0) - * Get finished requests - * @link https://php.net/manual/en/function.httprequestpool-getfinishedrequests.php - * @return array an array containing all attached HttpRequest objects that already have finished their work. - */ - public function getFinishedRequests () {} - - /** - * @param $enable [optional] - */ - public function enablePipelining ($enable) {} - - /** - * @param $enable [optional] - */ - public function enableEvents ($enable) {} - +class HttpRequestPool implements Countable, Iterator +{ + /** + * (PECL pecl_http >= 0.10.0) + * HttpRequestPool constructor + * @link https://php.net/manual/en/function.httprequestpool-construct.php + * @param null|HttpRequest $request [optional] + * HttpRequest object to attach + * + */ + public function __construct(?HttpRequest $request = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * HttpRequestPool destructor + * @link https://php.net/manual/en/function.httprequestpool-destruct.php + * @return void + */ + public function __destruct() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Attach HttpRequest + * @link https://php.net/manual/en/function.httprequestpool-attach.php + * @param HttpRequest $request + * an HttpRequest object not already attached to any HttpRequestPool object + * + * @return bool true on success or false on failure. + */ + public function attach(HttpRequest $request) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Detach HttpRequest + * @link https://php.net/manual/en/function.httprequestpool-detach.php + * @param HttpRequest $request + * an HttpRequest object attached to this HttpRequestPool object + * + * @return bool true on success or false on failure. + */ + public function detach(HttpRequest $request) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Send all requests + * @link https://php.net/manual/en/function.httprequestpool-send.php + * @return bool true on success or false on failure. + */ + public function send() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Reset request pool + * @link https://php.net/manual/en/function.httprequestpool-reset.php + * @return void + */ + public function reset() {} + + /** + * (PECL pecl_http >= 0.15.0) + * Perform socket actions + * @link https://php.net/manual/en/function.httprequestpool-socketperform.php + * @return bool TRUE until each request has finished its transaction. + */ + protected function socketPerform() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Perform socket select + * @link https://php.net/manual/en/function.httprequestpool-socketselect.php + * @return bool true on success or false on failure. + */ + protected function socketSelect() {} + + public function valid() {} + + public function current() {} + + public function key() {} + + public function next() {} + + public function rewind() {} + + public function count() {} + + /** + * (PECL pecl_http >= 0.16.0) + * Get attached requests + * @link https://php.net/manual/en/function.httprequestpool-getattachedrequests.php + * @return array an array containing all currently attached HttpRequest objects. + */ + #[Pure] + public function getAttachedRequests() {} + + /** + * (PECL pecl_http >= 0.16.0) + * Get finished requests + * @link https://php.net/manual/en/function.httprequestpool-getfinishedrequests.php + * @return array an array containing all attached HttpRequest objects that already have finished their work. + */ + #[Pure] + public function getFinishedRequests() {} + + /** + * @param $enable [optional] + */ + public function enablePipelining($enable) {} + + /** + * @param $enable [optional] + */ + public function enableEvents($enable) {} } /** * @link https://php.net/manual/en/class.httpresponse.php */ -class HttpResponse { - const REDIRECT = 0; - const REDIRECT_PERM = 301; - const REDIRECT_FOUND = 302; - const REDIRECT_POST = 303; - const REDIRECT_PROXY = 305; - const REDIRECT_TEMP = 307; - - private static $sent; - private static $catch; - private static $mode; - private static $stream; - private static $file; - private static $data; - protected static $cache; - protected static $gzip; - protected static $eTag; - protected static $lastModified; - protected static $cacheControl; - protected static $contentType; - protected static $contentDisposition; - protected static $bufferSize; - protected static $throttleDelay; - - - /** - * (PECL pecl_http >= 0.12.0) - * Set header - * @link https://php.net/manual/en/function.httpresponse-setheader.php - * @param string $name - * the name of the header - * - * @param mixed $value [optional]- * the value of the header; - * if not set, no header with this name will be sent - * - * @param bool $replace [optional]- * whether an existing header should be replaced - * - * @return bool true on success or false on failure. - */ - public static function setHeader ($name, $value = null, $replace = null) {} - - /** - * (PECL pecl_http >= 0.12.0)- * Get header - * @link https://php.net/manual/en/function.httpresponse-getheader.php - * @param string $name [optional] - * specifies the name of the header to read; - * if empty or omitted, an associative array with all headers will be returned - * - * @return mixed either a string containing the value of the header matching name, - * false on failure, or an associative array with all headers. - */ - public static function getHeader ($name = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Set ETag - * @link https://php.net/manual/en/function.httpresponse-setetag.php - * @param string $etag - * unquoted string as parameter containing the ETag - * - * @return bool true on success or false on failure. - */ - public static function setETag ($etag) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get ETag - * @link https://php.net/manual/en/function.httpresponse-getetag.php - * @return string the calculated or previously set ETag as unquoted string. - */ - public static function getETag () {} - - /** - * (PECL pecl_http >= 0.12.0) - * Set last modified - * @link https://php.net/manual/en/function.httpresponse-setlastmodified.php - * @param int $timestamp - * Unix timestamp representing the last modification time of the sent entity - * - * @return bool true on success or false on failure. - */ - public static function setLastModified ($timestamp) {} - - /** - * (PECL pecl_http >= 0.12.0)- * Get last modified - * @link https://php.net/manual/en/function.httpresponse-getlastmodified.php - * @return int the calculated or previously set Unix timestamp. - */ - public static function getLastModified () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set content disposition - * @link https://php.net/manual/en/function.httpresponse-setcontentdisposition.php - * @param string $filename - * the file name the "Save as..." dialog should display - * - * @param bool $inline [optional]- * if set to true and the user agent knows how to handle the content type, - * it will probably not cause the popup window to be shown - * - * @return bool true on success or false on failure. - */ - public static function setContentDisposition ($filename, $inline = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get content disposition - * @link https://php.net/manual/en/function.httpresponse-getcontentdisposition.php - * @return string the current content disposition as string like sent in a header. - */ - public static function getContentDisposition () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set content type - * @link https://php.net/manual/en/function.httpresponse-setcontenttype.php - * @param string $content_type - * the content type of the sent entity (primary/secondary) - * - * @return bool true on success, or false if the content type does not seem to - * contain a primary and secondary content type part. - */ - public static function setContentType ($content_type) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get content type - * @link https://php.net/manual/en/function.httpresponse-getcontenttype.php - * @return string the currently set content type as string. - */ - public static function getContentType () {} - - /** - * (PECL pecl_http >= 0.13.0) - * Guess content type - * @link https://php.net/manual/en/function.httpresponse-guesscontenttype.php - * @param string $magic_file - * specifies the magic.mime database to use - * - * @param int $magic_mode [optional]- * flags for libmagic - * - * @return string|false the guessed content type on success or false on failure. - */ - public static function guessContentType ($magic_file, $magic_mode = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Set cache - * @link https://php.net/manual/en/function.httpresponse-setcache.php - * @param bool $cache - * whether caching should be attempted - * - * @return bool true on success or false on failure. - */ - public static function setCache ($cache) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get cache - * @link https://php.net/manual/en/function.httpresponse-getcache.php - * @return bool true if caching should be attempted, else false. - */ - public static function getCache () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set cache control - * @link https://php.net/manual/en/function.httpresponse-setcachecontrol.php - * @param string $control - * the primary cache control setting - * - * @param int $max_age [optional]- * the max-age in seconds, suggesting how long the cache entry is valid on the client side - * - * @param bool $must_revalidate [optional]- * whether the cached entity should be revalidated by the client for every request - * - * @return bool true on success, or false if control does not match one of public, private or no-cache. - */ - public static function setCacheControl ($control, $max_age = null, $must_revalidate = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get cache control - * @link https://php.net/manual/en/function.httpresponse-getcachecontrol.php - * @return string the current cache control setting as a string like sent in a header. - */ - public static function getCacheControl () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set gzip - * @link https://php.net/manual/en/function.httpresponse-setgzip.php - * @param bool $gzip - * whether GZip compression should be enabled - * - * @return bool true on success or false on failure. - */ - public static function setGzip ($gzip) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get gzip - * @link https://php.net/manual/en/function.httpresponse-getgzip.php - * @return bool true if GZip compression is enabled, else false. - */ - public static function getGzip () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set throttle delay - * @link https://php.net/manual/en/function.httpresponse-setthrottledelay.php - * @param float $seconds - * seconds to sleep after each chunk sent - * - * @return bool true on success or false on failure. - */ - public static function setThrottleDelay ($seconds) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get throttle delay - * @link https://php.net/manual/en/function.httpresponse-getthrottledelay.php - * @return double a double representing the throttle delay in seconds. - */ - public static function getThrottleDelay () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set buffer size - * @link https://php.net/manual/en/function.httpresponse-setbuffersize.php - * @param int $bytes - * the chunk size in bytes - * - * @return bool true on success or false on failure. - */ - public static function setBufferSize ($bytes) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get buffer size - * @link https://php.net/manual/en/function.httpresponse-getbuffersize.php - * @return int an int representing the current buffer size in bytes. - */ - public static function getBufferSize () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set data - * @link https://php.net/manual/en/function.httpresponse-setdata.php - * @param mixed $data - * data to send - * - * @return bool true on success or false on failure. - */ - public static function setData ($data) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get data - * @link https://php.net/manual/en/function.httpresponse-getdata.php - * @return string a string containing the previously set data to send. - */ - public static function getData () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set file - * @link https://php.net/manual/en/function.httpresponse-setfile.php - * @param string $file - * the path to the file to send - * - * @return bool true on success or false on failure. - */ - public static function setFile ($file) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get file - * @link https://php.net/manual/en/function.httpresponse-getfile.php - * @return string the previously set path to the file to send as string. - */ - public static function getFile () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Set stream - * @link https://php.net/manual/en/function.httpresponse-setstream.php - * @param resource $stream - * already opened stream from which the data to send will be read - * - * @return bool true on success or false on failure. - */ - public static function setStream ($stream) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Get Stream - * @link https://php.net/manual/en/function.httpresponse-getstream.php - * @return resource the previously set resource. - */ - public static function getStream () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Send response - * @link https://php.net/manual/en/function.httpresponse-send.php - * @param bool $clean_ob [optional] - * whether to destroy all previously started output handlers and their buffers - * - * @return bool true on success or false on failure. - */ - public static function send ($clean_ob = null) {} - - /** - * (PECL pecl_http >= 0.10.0)- * Capture script output - * @link https://php.net/manual/en/function.httpresponse-capture.php - * @return void - */ - public static function capture () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Redirect - * @link https://php.net/manual/en/function.httpresponse-redirect.php - * @param string $url [optional] - * @param array $params [optional] - * @param bool $session [optional] - * @param int $status [optional] - * @return void - */ - public static function redirect ($url = null, array $params = null , $session = null, $status = null) {} - - /** - * (PECL pecl_http >= 0.12.0) - * Send HTTP response status - * @link https://php.net/manual/en/function.httpresponse-status.php - * @param int $status - * @return bool - */ - public static function status ($status) {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get request headers - * @link https://php.net/manual/en/function.httpresponse-getrequestheaders.php - * @return array - */ - public static function getRequestHeaders () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get request body - * @link https://php.net/manual/en/function.httpresponse-getrequestbody.php - * @return string - */ - public static function getRequestBody () {} - - /** - * (PECL pecl_http >= 0.10.0) - * Get request body stream - * @link https://php.net/manual/en/function.httpresponse-getrequestbodystream.php - * @return resource - */ - public static function getRequestBodyStream () {} - +class HttpResponse +{ + public const REDIRECT = 0; + public const REDIRECT_PERM = 301; + public const REDIRECT_FOUND = 302; + public const REDIRECT_POST = 303; + public const REDIRECT_PROXY = 305; + public const REDIRECT_TEMP = 307; + private static $sent; + private static $catch; + private static $mode; + private static $stream; + private static $file; + private static $data; + protected static $cache; + protected static $gzip; + protected static $eTag; + protected static $lastModified; + protected static $cacheControl; + protected static $contentType; + protected static $contentDisposition; + protected static $bufferSize; + protected static $throttleDelay; + + /** + * (PECL pecl_http >= 0.12.0) + * Set header + * @link https://php.net/manual/en/function.httpresponse-setheader.php + * @param string $name + * the name of the header + * + * @param mixed $value [optional]+ * the value of the header; + * if not set, no header with this name will be sent + * + * @param bool $replace [optional]+ * whether an existing header should be replaced + * + * @return bool true on success or false on failure. + */ + public static function setHeader($name, $value = null, $replace = null) {} + + /** + * (PECL pecl_http >= 0.12.0)+ * Get header + * @link https://php.net/manual/en/function.httpresponse-getheader.php + * @param string $name [optional] + * specifies the name of the header to read; + * if empty or omitted, an associative array with all headers will be returned + * + * @return mixed either a string containing the value of the header matching name, + * false on failure, or an associative array with all headers. + */ + public static function getHeader($name = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Set ETag + * @link https://php.net/manual/en/function.httpresponse-setetag.php + * @param string $etag + * unquoted string as parameter containing the ETag + * + * @return bool true on success or false on failure. + */ + public static function setETag($etag) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get ETag + * @link https://php.net/manual/en/function.httpresponse-getetag.php + * @return string the calculated or previously set ETag as unquoted string. + */ + public static function getETag() {} + + /** + * (PECL pecl_http >= 0.12.0) + * Set last modified + * @link https://php.net/manual/en/function.httpresponse-setlastmodified.php + * @param int $timestamp + * Unix timestamp representing the last modification time of the sent entity + * + * @return bool true on success or false on failure. + */ + public static function setLastModified($timestamp) {} + + /** + * (PECL pecl_http >= 0.12.0)+ * Get last modified + * @link https://php.net/manual/en/function.httpresponse-getlastmodified.php + * @return int the calculated or previously set Unix timestamp. + */ + public static function getLastModified() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set content disposition + * @link https://php.net/manual/en/function.httpresponse-setcontentdisposition.php + * @param string $filename + * the file name the "Save as..." dialog should display + * + * @param bool $inline [optional]+ * if set to true and the user agent knows how to handle the content type, + * it will probably not cause the popup window to be shown + * + * @return bool true on success or false on failure. + */ + public static function setContentDisposition($filename, $inline = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get content disposition + * @link https://php.net/manual/en/function.httpresponse-getcontentdisposition.php + * @return string the current content disposition as string like sent in a header. + */ + public static function getContentDisposition() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set content type + * @link https://php.net/manual/en/function.httpresponse-setcontenttype.php + * @param string $content_type + * the content type of the sent entity (primary/secondary) + * + * @return bool true on success, or false if the content type does not seem to + * contain a primary and secondary content type part. + */ + public static function setContentType($content_type) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get content type + * @link https://php.net/manual/en/function.httpresponse-getcontenttype.php + * @return string the currently set content type as string. + */ + public static function getContentType() {} + + /** + * (PECL pecl_http >= 0.13.0) + * Guess content type + * @link https://php.net/manual/en/function.httpresponse-guesscontenttype.php + * @param string $magic_file + * specifies the magic.mime database to use + * + * @param int $magic_mode [optional]+ * flags for libmagic + * + * @return string|false the guessed content type on success or false on failure. + */ + public static function guessContentType($magic_file, $magic_mode = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Set cache + * @link https://php.net/manual/en/function.httpresponse-setcache.php + * @param bool $cache + * whether caching should be attempted + * + * @return bool true on success or false on failure. + */ + public static function setCache($cache) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get cache + * @link https://php.net/manual/en/function.httpresponse-getcache.php + * @return bool true if caching should be attempted, else false. + */ + public static function getCache() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set cache control + * @link https://php.net/manual/en/function.httpresponse-setcachecontrol.php + * @param string $control + * the primary cache control setting + * + * @param int $max_age [optional]+ * the max-age in seconds, suggesting how long the cache entry is valid on the client side + * + * @param bool $must_revalidate [optional]+ * whether the cached entity should be revalidated by the client for every request + * + * @return bool true on success, or false if control does not match one of public, private or no-cache. + */ + public static function setCacheControl($control, $max_age = null, $must_revalidate = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get cache control + * @link https://php.net/manual/en/function.httpresponse-getcachecontrol.php + * @return string the current cache control setting as a string like sent in a header. + */ + public static function getCacheControl() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set gzip + * @link https://php.net/manual/en/function.httpresponse-setgzip.php + * @param bool $gzip + * whether GZip compression should be enabled + * + * @return bool true on success or false on failure. + */ + public static function setGzip($gzip) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get gzip + * @link https://php.net/manual/en/function.httpresponse-getgzip.php + * @return bool true if GZip compression is enabled, else false. + */ + public static function getGzip() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set throttle delay + * @link https://php.net/manual/en/function.httpresponse-setthrottledelay.php + * @param float $seconds + * seconds to sleep after each chunk sent + * + * @return bool true on success or false on failure. + */ + public static function setThrottleDelay($seconds) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get throttle delay + * @link https://php.net/manual/en/function.httpresponse-getthrottledelay.php + * @return float a float representing the throttle delay in seconds. + */ + public static function getThrottleDelay() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set buffer size + * @link https://php.net/manual/en/function.httpresponse-setbuffersize.php + * @param int $bytes + * the chunk size in bytes + * + * @return bool true on success or false on failure. + */ + public static function setBufferSize($bytes) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get buffer size + * @link https://php.net/manual/en/function.httpresponse-getbuffersize.php + * @return int an int representing the current buffer size in bytes. + */ + public static function getBufferSize() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set data + * @link https://php.net/manual/en/function.httpresponse-setdata.php + * @param mixed $data + * data to send + * + * @return bool true on success or false on failure. + */ + public static function setData($data) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get data + * @link https://php.net/manual/en/function.httpresponse-getdata.php + * @return string a string containing the previously set data to send. + */ + public static function getData() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set file + * @link https://php.net/manual/en/function.httpresponse-setfile.php + * @param string $file + * the path to the file to send + * + * @return bool true on success or false on failure. + */ + public static function setFile($file) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get file + * @link https://php.net/manual/en/function.httpresponse-getfile.php + * @return string the previously set path to the file to send as string. + */ + public static function getFile() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Set stream + * @link https://php.net/manual/en/function.httpresponse-setstream.php + * @param resource $stream + * already opened stream from which the data to send will be read + * + * @return bool true on success or false on failure. + */ + public static function setStream($stream) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Get Stream + * @link https://php.net/manual/en/function.httpresponse-getstream.php + * @return resource the previously set resource. + */ + public static function getStream() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Send response + * @link https://php.net/manual/en/function.httpresponse-send.php + * @param bool $clean_ob [optional] + * whether to destroy all previously started output handlers and their buffers + * + * @return bool true on success or false on failure. + */ + public static function send($clean_ob = null) {} + + /** + * (PECL pecl_http >= 0.10.0)+ * Capture script output + * @link https://php.net/manual/en/function.httpresponse-capture.php + * @return void + */ + public static function capture() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Redirect + * @link https://php.net/manual/en/function.httpresponse-redirect.php + * @param null|string $url [optional] + * @param null|array $params [optional] + * @param null|bool $session [optional] + * @param null|int $status [optional] + * @return void + */ + public static function redirect($url = null, ?array $params = null, $session = null, $status = null) {} + + /** + * (PECL pecl_http >= 0.12.0) + * Send HTTP response status + * @link https://php.net/manual/en/function.httpresponse-status.php + * @param int $status + * @return bool + */ + public static function status($status) {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get request headers + * @link https://php.net/manual/en/function.httpresponse-getrequestheaders.php + * @return array + */ + public static function getRequestHeaders() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get request body + * @link https://php.net/manual/en/function.httpresponse-getrequestbody.php + * @return string + */ + public static function getRequestBody() {} + + /** + * (PECL pecl_http >= 0.10.0) + * Get request body stream + * @link https://php.net/manual/en/function.httpresponse-getrequestbodystream.php + * @return resource + */ + public static function getRequestBodyStream() {} } -class HttpUtil { - - /** - * @param $timestamp [optional] - */ - public static function date ($timestamp) {} - - /** - * @param $url - * @param $parts [optional] - * @param $flags [optional] - * @param $composed [optional] - */ - public static function buildUrl ($url, $parts, $flags, &$composed) {} - - /** - * @param $query - * @param $prefix [optional] - * @param $arg_sep [optional] - */ - public static function buildStr ($query, $prefix, $arg_sep) {} - - /** - * @param $supported - * @param $result [optional] - */ - public static function negotiateLanguage ($supported, &$result) {} - - /** - * @param $supported - * @param $result [optional] - */ - public static function negotiateCharset ($supported, &$result) {} - - /** - * @param $supported - * @param $result [optional] - */ - public static function negotiateContentType ($supported, &$result) {} - - /** - * @param $last_modified - * @param $for_range [optional] - */ - public static function matchModified ($last_modified, $for_range) {} - - /** - * @param $plain_etag - * @param $for_range [optional] - */ - public static function matchEtag ($plain_etag, $for_range) {} - - /** - * @param $header_name - * @param $header_value - * @param $case_sensitive [optional] - */ - public static function matchRequestHeader ($header_name, $header_value, $case_sensitive) {} - - /** - * @param $message_string - */ - public static function parseMessage ($message_string) {} - - /** - * @param $headers_string - */ - public static function parseHeaders ($headers_string) {} - - /** - * @param $cookie_string - */ - public static function parseCookie ($cookie_string) {} - - /** - * @param $cookie_array - */ - public static function buildCookie ($cookie_array) {} - - /** - * @param $param_string - * @param $flags [optional] - */ - public static function parseParams ($param_string, $flags) {} - - /** - * @param $encoded_string - */ - public static function chunkedDecode ($encoded_string) {} - - /** - * @param $plain - * @param $flags [optional] - */ - public static function deflate ($plain, $flags) {} - - /** - * @param $encoded - */ - public static function inflate ($encoded) {} - - /** - * @param $feature [optional] - */ - public static function support ($feature) {} - +class HttpUtil +{ + /** + * @param $timestamp [optional] + */ + public static function date($timestamp) {} + + /** + * @param $url + * @param $parts [optional] + * @param $flags [optional] + * @param &$composed [optional] + */ + public static function buildUrl($url, $parts, $flags, &$composed) {} + + /** + * @param $query + * @param $prefix [optional] + * @param $arg_sep [optional] + */ + public static function buildStr($query, $prefix, $arg_sep) {} + + /** + * @param $supported + * @param &$result [optional] + */ + public static function negotiateLanguage($supported, &$result) {} + + /** + * @param $supported + * @param &$result [optional] + */ + public static function negotiateCharset($supported, &$result) {} + + /** + * @param $supported + * @param &$result [optional] + */ + public static function negotiateContentType($supported, &$result) {} + + /** + * @param $last_modified + * @param $for_range [optional] + */ + public static function matchModified($last_modified, $for_range) {} + + /** + * @param $plain_etag + * @param $for_range [optional] + */ + public static function matchEtag($plain_etag, $for_range) {} + + /** + * @param $header_name + * @param $header_value + * @param $case_sensitive [optional] + */ + public static function matchRequestHeader($header_name, $header_value, $case_sensitive) {} + + /** + * @param $message_string + */ + public static function parseMessage($message_string) {} + + /** + * @param $headers_string + */ + public static function parseHeaders($headers_string) {} + + /** + * @param $cookie_string + */ + public static function parseCookie($cookie_string) {} + + /** + * @param $cookie_array + */ + public static function buildCookie($cookie_array) {} + + /** + * @param $param_string + * @param $flags [optional] + */ + public static function parseParams($param_string, $flags) {} + + /** + * @param $encoded_string + */ + public static function chunkedDecode($encoded_string) {} + + /** + * @param $plain + * @param $flags [optional] + */ + public static function deflate($plain, $flags) {} + + /** + * @param $encoded + */ + public static function inflate($encoded) {} + + /** + * @param $feature [optional] + */ + public static function support($feature) {} } /** @@ -2132,7 +2150,8 @@ public static function support ($feature) {} * * @return string the HTTP date as string. */ -function http_date ($timestamp = null) {} +#[Pure] +function http_date($timestamp = null) {} /** * (PECL pecl_http >= 0.21.0) @@ -2144,16 +2163,16 @@ function http_date ($timestamp = null) {} * @param mixed $parts [optional] * same as the first argument * - * @param int $flags [optional]+ * @param null|int $flags [optional] * a bitmask of binary or'ed HTTP_URL constants; * HTTP_URL_REPLACE is the default * - * @param array $new_url [optional]+ * @param null|array &$new_url [optional] * if set, it will be filled with the parts of the composed url like parse_url would return * - * @return string the new URL as string on success or false on failure. + * @return string|false the new URL as string on success or false on failure. */ -function http_build_url ($url = null, $parts = null, $flags = null, array &$new_url = null ) {} +function http_build_url($url = null, $parts = null, $flags = null, ?array &$new_url = null) {} /** * (PECL pecl_http >= 0.23.0)@@ -2168,9 +2187,10 @@ function http_build_url ($url = null, $parts = null, $flags = null, array &$new * @param string $arg_separator [optional] * argument separator to use (by default the INI setting arg_separator.output will be used, or "&" if neither is set * - * @return string the built query as string on success or false on failure. + * @return string|false the built query as string on success or false on failure. */ -function http_build_str (array $query, $prefix = null, $arg_separator = null) {} +#[Pure] +function http_build_str(array $query, $prefix = null, $arg_separator = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2179,12 +2199,12 @@ function http_build_str (array $query, $prefix = null, $arg_separator = null) {} * @param array $supported * array containing the supported languages as values * - * @param array $result [optional]+ * @param null|array &$result [optional] * will be filled with an array containing the negotiation results * * @return string the negotiated language or the default language (i.e. first array entry) if none match. */ -function http_negotiate_language (array $supported, array &$result = null ) {} +function http_negotiate_language(array $supported, ?array &$result = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2193,12 +2213,12 @@ function http_negotiate_language (array $supported, array &$result = null ) {} * @param array $supported * array containing the supported charsets as values * - * @param array $result [optional]+ * @param null|array &$result [optional] * will be filled with an array containing the negotiation results * * @return string the negotiated charset or the default charset (i.e. first array entry) if none match. */ -function http_negotiate_charset (array $supported, array &$result = null ) {} +function http_negotiate_charset(array $supported, ?array &$result = null) {} /** * (PECL pecl_http >= 0.19.0)@@ -2207,12 +2227,12 @@ function http_negotiate_charset (array $supported, array &$result = null ) {} * @param array $supported * array containing the supported content types as values * - * @param array $result [optional]+ * @param null|array &$result [optional] * will be filled with an array containing the negotiation results * * @return string the negotiated content type or the default content type (i.e. first array entry) if none match. */ -function http_negotiate_content_type (array $supported, array &$result = null ) {} +function http_negotiate_content_type(array $supported, ?array &$result = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2221,18 +2241,18 @@ function http_negotiate_content_type (array $supported, array &$result = null ) * @param string $url [optional] * the URL to redirect to * - * @param array $params [optional]+ * @param null|array $params [optional] * associative array of query parameters * - * @param bool $session [optional]+ * @param null|bool $session [optional] * whether to append session information * - * @param int $status [optional]+ * @param null|int $status [optional] * custom response status code * - * @return void returns false or exits with the specified redirection status code + * @return void|false returns false or exits with the specified redirection status code */ -function http_redirect ($url = null, array $params = null , $session = null, $status = null) {} +function http_redirect($url = null, ?array $params = null, $session = null, $status = null) {} /** * (PECL pecl_http >= 0.10.0)@@ -2244,9 +2264,9 @@ function http_redirect ($url = null, array $params = null , $session = null, $s * @param int $bytes [optional] * the chunk size in bytes * - * @return void + * @return void */ -function http_throttle ($sec = null, $bytes = null) {} +function http_throttle($sec = null, $bytes = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2257,7 +2277,7 @@ function http_throttle ($sec = null, $bytes = null) {} * * @return bool true on success or false on failure. */ -function http_send_status ($status) {} +function http_send_status($status) {} /** * (PECL pecl_http >= 0.1.0) @@ -2269,7 +2289,7 @@ function http_send_status ($status) {} * * @return bool true on success or false on failure. */ -function http_send_last_modified ($timestamp = null) {} +function http_send_last_modified($timestamp = null) {} /** * (PECL pecl_http >= 0.10.0) @@ -2280,7 +2300,7 @@ function http_send_last_modified ($timestamp = null) {} * * @return bool true on success or false on failure. */ -function http_send_content_type ($content_type = null) {} +function http_send_content_type($content_type = null) {} /** * (PECL pecl_http >= 0.10.0) @@ -2295,7 +2315,7 @@ function http_send_content_type ($content_type = null) {} * * @return bool true on success or false on failure. */ -function http_send_content_disposition ($filename, $inline = null) {} +function http_send_content_disposition($filename, $inline = null) {} /** * (PECL pecl_http >= 0.1.0) @@ -2309,7 +2329,8 @@ function http_send_content_disposition ($filename, $inline = null) {} * * @return bool true if timestamp represents an earlier date than the header, else false. */ -function http_match_modified ($timestamp = null, $for_range = null) {} +#[Pure] +function http_match_modified($timestamp = null, $for_range = null) {} /** * (PECL pecl_http >= 0.1.0) @@ -2323,7 +2344,8 @@ function http_match_modified ($timestamp = null, $for_range = null) {} * * @return bool true if ETag matches or the header contained the asterisk ("*"), else false. */ -function http_match_etag ($etag, $for_range = null) {} +#[Pure] +function http_match_etag($etag, $for_range = null) {} /** * (PECL pecl_http >= 0.1.0) @@ -2332,10 +2354,11 @@ function http_match_etag ($etag, $for_range = null) {} * @param int $timestamp_or_expires [optional] * Unix timestamp * - * @return bool &returns.http.false.orexits; with 304 Not Modified if the entity is cached. + * @return bool with 304 Not Modified if the entity is cached. * &see.http.configuration.force_exit; */ -function http_cache_last_modified ($timestamp_or_expires = null) {} +#[Pure] +function http_cache_last_modified($timestamp_or_expires = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2344,10 +2367,11 @@ function http_cache_last_modified ($timestamp_or_expires = null) {} * @param string $etag [optional] * custom ETag * - * @return bool &returns.http.false.orexits; with 304 Not Modified if the entity is cached. + * @return bool with 304 Not Modified if the entity is cached. * &see.http.configuration.force_exit; */ -function http_cache_etag ($etag = null) {} +#[Pure] +function http_cache_etag($etag = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2358,7 +2382,7 @@ function http_cache_etag ($etag = null) {} * * @return bool true on success or false on failure. */ -function http_send_data ($data) {} +function http_send_data($data) {} /** * (PECL pecl_http >= 0.1.0) @@ -2369,7 +2393,7 @@ function http_send_data ($data) {} * * @return bool true on success or false on failure. */ -function http_send_file ($file) {} +function http_send_file($file) {} /** * (PECL pecl_http >= 0.1.0) @@ -2380,7 +2404,7 @@ function http_send_file ($file) {} * * @return bool true on success or false on failure. */ -function http_send_stream ($stream) {} +function http_send_stream($stream) {} /** * (PECL pecl_http >= 0.1.0) @@ -2391,7 +2415,8 @@ function http_send_stream ($stream) {} * * @return string|false the decoded string on success or false on failure. */ -function http_chunked_decode ($encoded) {} +#[Pure] +function http_chunked_decode($encoded) {} /** * (PECL pecl_http >= 0.12.0) @@ -2402,7 +2427,8 @@ function http_chunked_decode ($encoded) {} * * @return object a hierarchical object structure of the parsed messages. */ -function http_parse_message ($message) {} +#[Pure] +function http_parse_message($message) {} /** * (PECL pecl_http >= 0.10.0) @@ -2413,7 +2439,8 @@ function http_parse_message ($message) {} * * @return array|false an array on success or false on failure. */ -function http_parse_headers ($header) {} +#[Pure] +function http_parse_headers($header) {} /** * (PECL pecl_http >= 0.20.0) @@ -2425,13 +2452,14 @@ function http_parse_headers ($header) {} * @param int $flags [optional] * parse flags (HTTP_COOKIE_PARSE_RAW) * - * @param array $allowed_extras [optional]+ * @param null|array $allowed_extras [optional] * array containing recognized extra keys; * by default all unknown keys will be treated as cookie names * * @return stdClass|false a stdClass object on success or false on failure. */ -function http_parse_cookie ($cookie, $flags = null, array $allowed_extras = null ) {} +#[Pure] +function http_parse_cookie($cookie, $flags = null, ?array $allowed_extras = null) {} /** * (PECL pecl_http >= 1.2.0)@@ -2442,7 +2470,8 @@ function http_parse_cookie ($cookie, $flags = null, array $allowed_extras = nul * * @return string the cookie(s) as string. */ -function http_build_cookie (array $cookie) {} +#[Pure] +function http_build_cookie(array $cookie) {} /** * (PECL pecl_http >= 1.0.0) @@ -2456,7 +2485,8 @@ function http_build_cookie (array $cookie) {} * * @return stdClass parameter list as stdClass object. */ -function http_parse_params ($param, $flags = null) {} +#[Pure] +function http_parse_params($param, $flags = null) {} /** * (PECL pecl_http >= 0.10.0) @@ -2464,7 +2494,8 @@ function http_parse_params ($param, $flags = null) {} * @link https://php.net/manual/en/function.http-get-request-headers.php * @return array an associative array of incoming request headers. */ -function http_get_request_headers () {} +#[Pure] +function http_get_request_headers() {} /** * (PECL pecl_http >= 0.10.0) @@ -2472,7 +2503,8 @@ function http_get_request_headers () {} * @link https://php.net/manual/en/function.http-get-request-body.php * @return string|null the raw request body as string on success or NULL on failure. */ -function http_get_request_body () {} +#[Pure] +function http_get_request_body() {} /** * (PECL pecl_http >= 0.22.0) @@ -2480,7 +2512,8 @@ function http_get_request_body () {} * @link https://php.net/manual/en/function.http-get-request-body-stream.php * @return resource|null the raw request body as stream on success or NULL on failure. */ -function http_get_request_body_stream () {} +#[Pure] +function http_get_request_body_stream() {} /** * (PECL pecl_http >= 0.10.0) @@ -2497,7 +2530,8 @@ function http_get_request_body_stream () {} * * @return bool true if header value matches, else false. */ -function http_match_request_header ($header, $value, $match_case = null) {} +#[Pure] +function http_match_request_header($header, $value, $match_case = null) {} /** * (PECL pecl_http >= 1.5.0) @@ -2505,16 +2539,16 @@ function http_match_request_header ($header, $value, $match_case = null) {} * @link https://php.net/manual/en/function.http-persistent-handles-count.php * @return stdClass|false persistent handles statistics as stdClass object on success or false on failure. */ -function http_persistent_handles_count () {} +function http_persistent_handles_count() {} /** * (PECL pecl_http >= 1.5.0) * Clean up persistent handles * @link https://php.net/manual/en/function.http-persistent-handles-clean.php - * @param string $ident [optional] - * @return string + * @param string $ident [optional] + * @return string */ -function http_persistent_handles_clean ($ident = null) {} +function http_persistent_handles_clean($ident = null) {} /** * (PECL pecl_http >= 1.5.0) @@ -2525,7 +2559,7 @@ function http_persistent_handles_clean ($ident = null) {} * * @return string|false the prior ident as string on success or false on failure. */ -function http_persistent_handles_ident ($ident) {} +function http_persistent_handles_ident($ident) {} /** * (PECL pecl_http >= 0.1.0) @@ -2534,15 +2568,14 @@ function http_persistent_handles_ident ($ident) {} * @param string $url * URL * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]+ * @param null|array &$info [optional] * Will be filled with request/response information * - * @return string &returns.http.response; + * @return string */ -function http_get ($url, array $options = null , array &$info = null ) {} +function http_get($url, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2551,15 +2584,13 @@ function http_get ($url, array $options = null , array &$info = null ) {} * @param string $url [optional] * URL * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]- * &link.http.request.info; + * @param null|array &$info [optional] * - * @return string &returns.http.response; + * @return string */ -function http_head ($url = null, array $options = null , array &$info = null ) {} +function http_head($url = null, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 0.1.0)@@ -2571,15 +2602,13 @@ function http_head ($url = null, array $options = null , array &$info = null ) * @param string $data [optional] * String containing the pre-encoded post data * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]- * &link.http.request.info; + * @param null|array &$info [optional] * - * @return string &returns.http.response; + * @return string */ -function http_post_data ($url, $data = null, array $options = null , array &$info = null ) {} +function http_post_data($url, $data = null, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 0.10.0)@@ -2588,21 +2617,19 @@ function http_post_data ($url, $data = null, array $options = null , array &$in * @param string $url * URL * - * @param array $data [optional]+ * @param null|array $data [optional] * Associative array of POST values * - * @param array $files [optional]+ * @param null|array $files [optional] * Array of files to post * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]- * &link.http.request.info; + * @param null|array &$info [optional] * - * @return string &returns.http.response; + * @return string */ -function http_post_fields ($url, array $data = null , array $files = null , array $options = null , array &$info = null ) {} +function http_post_fields($url, ?array $data = null, ?array $files = null, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 0.25.0)@@ -2611,18 +2638,16 @@ function http_post_fields ($url, array $data = null , array $files = null , ar * @param string $url * URL * - * @param string $data [optional]+ * @param null|string $data [optional] * PUT request body * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]- * &link.http.request.info; + * @param null|array &$info [optional] * - * @return string &returns.http.response; + * @return string */ -function http_put_data ($url, $data = null, array $options = null , array &$info = null ) {} +function http_put_data($url, $data = null, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 0.10.0)@@ -2631,18 +2656,16 @@ function http_put_data ($url, $data = null, array $options = null , array &$inf * @param string $url * URL * - * @param string $file [optional]+ * @param null|string $file [optional] * The file to put * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]- * &link.http.request.info; + * @param null|array &$info [optional] * - * @return string &returns.http.response; + * @return string */ -function http_put_file ($url, $file = null, array $options = null , array &$info = null ) {} +function http_put_file($url, $file = null, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 0.10.0)@@ -2651,18 +2674,16 @@ function http_put_file ($url, $file = null, array $options = null , array &$inf * @param string $url * URL * - * @param resource $stream [optional]+ * @param null|resource $stream [optional] * The stream to read the PUT request body from * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]- * &link.http.request.info; + * @param null|array &$info [optional] * - * @return string &returns.http.response; + * @return string */ -function http_put_stream ($url, $stream = null, array $options = null , array &$info = null ) {} +function http_put_stream($url, $stream = null, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 1.0.0)@@ -2671,21 +2692,19 @@ function http_put_stream ($url, $stream = null, array $options = null , array & * @param int $method * Request method * - * @param string $url [optional]+ * @param null|string $url [optional] * URL * - * @param string $body [optional]+ * @param null|string $body [optional] * Request body * - * @param array $options [optional]- * &link.http.request.options; + * @param null|array $options [optional] * - * @param array $info [optional]- * &link.http.request.info; + * @param null|array &$info [optional] * - * @return string &returns.http.response; + * @return string */ -function http_request ($method, $url = null, $body = null, array $options = null , array &$info = null ) {} +function http_request($method, $url = null, $body = null, ?array $options = null, ?array &$info = null) {} /** * (PECL pecl_http >= 1.0.0)@@ -2699,7 +2718,8 @@ function http_request ($method, $url = null, $body = null, array $options = null * * @return string|false encoded string on success or false on failure. */ -function http_request_body_encode (array $fields, array $files) {} +#[Pure] +function http_request_body_encode(array $fields, array $files) {} /** * (PECL pecl_http >= 0.10.0) @@ -2710,7 +2730,7 @@ function http_request_body_encode (array $fields, array $files) {} * * @return int|false the ID of the request method on success or false on failure. */ -function http_request_method_register ($method) {} +function http_request_method_register($method) {} /** * (PECL pecl_http >= 0.10.0) @@ -2721,7 +2741,7 @@ function http_request_method_register ($method) {} * * @return bool true on success or false on failure. */ -function http_request_method_unregister ($method) {} +function http_request_method_unregister($method) {} /** * (PECL pecl_http >= 0.10.0) @@ -2732,7 +2752,8 @@ function http_request_method_unregister ($method) {} * * @return bool true if the request method is known, else false. */ -function http_request_method_exists ($method) {} +#[Pure] +function http_request_method_exists($method) {} /** * (PECL pecl_http >= 0.10.0) @@ -2743,17 +2764,19 @@ function http_request_method_exists ($method) {} * * @return string|false the request method name as string on success or false on failure. */ -function http_request_method_name ($method) {} +#[Pure] +function http_request_method_name($method) {} /** * (PECL pecl_http >= 0.10.0) * ETag output handler * @link https://php.net/manual/en/function.ob-etaghandler.php - * @param string $data - * @param int $mode - * @return string + * @param string $data + * @param int $mode + * @return string */ -function ob_etaghandler ($data, $mode) {} +#[Pure] +function ob_etaghandler($data, $mode) {} /** * (PECL pecl_http >= 0.15.0) @@ -2767,7 +2790,8 @@ function ob_etaghandler ($data, $mode) {} * * @return string|null the encoded string on success, or NULL on failure. */ -function http_deflate ($data, $flags = null) {} +#[Pure] +function http_deflate($data, $flags = null) {} /** * (PECL pecl_http >= 0.15.0) @@ -2778,27 +2802,28 @@ function http_deflate ($data, $flags = null) {} * * @return string|null the decoded string on success, or NULL on failure. */ -function http_inflate ($data) {} +#[Pure] +function http_inflate($data) {} /** * (PECL pecl_http >= 0.21.0) * Deflate output handler * @link https://php.net/manual/en/function.ob-deflatehandler.php - * @param string $data - * @param int $mode - * @return string + * @param string $data + * @param int $mode + * @return string */ -function ob_deflatehandler ($data, $mode) {} +function ob_deflatehandler($data, $mode) {} /** * (PECL pecl_http >= 0.21.0) * Inflate output handler * @link https://php.net/manual/en/function.ob-inflatehandler.php - * @param string $data - * @param int $mode - * @return string + * @param string $data + * @param int $mode + * @return string */ -function ob_inflatehandler ($data, $mode) {} +function ob_inflatehandler($data, $mode) {} /** * (PECL pecl_http >= 0.15.0) @@ -2810,203 +2835,203 @@ function ob_inflatehandler ($data, $mode) {} * @return int integer, whether requested feature is supported, * or a bitmask with all supported features if feature was omitted. */ -function http_support ($feature = null) {} - +#[Pure] +function http_support($feature = null) {} /** * don't urldecode values * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_COOKIE_PARSE_RAW', 1); +define('HTTP_COOKIE_PARSE_RAW', 1); /** * whether "secure" was found in the cookie's parameters list * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_COOKIE_SECURE', 16); +define('HTTP_COOKIE_SECURE', 16); /** * whether "httpOnly" was found in the cookie's parameter list * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_COOKIE_HTTPONLY', 32); -define ('HTTP_DEFLATE_LEVEL_DEF', 0); -define ('HTTP_DEFLATE_LEVEL_MIN', 1); -define ('HTTP_DEFLATE_LEVEL_MAX', 9); -define ('HTTP_DEFLATE_TYPE_ZLIB', 0); -define ('HTTP_DEFLATE_TYPE_GZIP', 16); -define ('HTTP_DEFLATE_TYPE_RAW', 32); -define ('HTTP_DEFLATE_STRATEGY_DEF', 0); -define ('HTTP_DEFLATE_STRATEGY_FILT', 256); -define ('HTTP_DEFLATE_STRATEGY_HUFF', 512); -define ('HTTP_DEFLATE_STRATEGY_RLE', 768); -define ('HTTP_DEFLATE_STRATEGY_FIXED', 1024); +define('HTTP_COOKIE_HTTPONLY', 32); +define('HTTP_DEFLATE_LEVEL_DEF', 0); +define('HTTP_DEFLATE_LEVEL_MIN', 1); +define('HTTP_DEFLATE_LEVEL_MAX', 9); +define('HTTP_DEFLATE_TYPE_ZLIB', 0); +define('HTTP_DEFLATE_TYPE_GZIP', 16); +define('HTTP_DEFLATE_TYPE_RAW', 32); +define('HTTP_DEFLATE_STRATEGY_DEF', 0); +define('HTTP_DEFLATE_STRATEGY_FILT', 256); +define('HTTP_DEFLATE_STRATEGY_HUFF', 512); +define('HTTP_DEFLATE_STRATEGY_RLE', 768); +define('HTTP_DEFLATE_STRATEGY_FIXED', 1024); /** * don't flush * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_ENCODING_STREAM_FLUSH_NONE', 0); +define('HTTP_ENCODING_STREAM_FLUSH_NONE', 0); /** * synchronized flush only * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_ENCODING_STREAM_FLUSH_SYNC', 1048576); +define('HTTP_ENCODING_STREAM_FLUSH_SYNC', 1048576); /** * full data flush * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_ENCODING_STREAM_FLUSH_FULL', 2097152); +define('HTTP_ENCODING_STREAM_FLUSH_FULL', 2097152); /** * use "basic" authentication * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_AUTH_BASIC', 1); +define('HTTP_AUTH_BASIC', 1); /** * use "digest" authentication * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_AUTH_DIGEST', 2); +define('HTTP_AUTH_DIGEST', 2); /** * use "NTLM" authentication * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_AUTH_NTLM', 8); +define('HTTP_AUTH_NTLM', 8); /** * use "GSS-NEGOTIATE" authentication * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_AUTH_GSSNEG', 4); +define('HTTP_AUTH_GSSNEG', 4); /** * try any authentication scheme * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_AUTH_ANY', -1); -define ('HTTP_VERSION_NONE', 0); +define('HTTP_AUTH_ANY', -1); +define('HTTP_VERSION_NONE', 0); /** * HTTP version 1.0 * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_VERSION_1_0', 1); +define('HTTP_VERSION_1_0', 1); /** * HTTP version 1.1 * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_VERSION_1_1', 2); +define('HTTP_VERSION_1_1', 2); /** * no specific HTTP protocol version * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_VERSION_ANY', 0); +define('HTTP_VERSION_ANY', 0); /** * use TLSv1 only * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SSL_VERSION_TLSv1', 1); +define('HTTP_SSL_VERSION_TLSv1', 1); /** * use SSLv2 only * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SSL_VERSION_SSLv2', 2); +define('HTTP_SSL_VERSION_SSLv2', 2); /** * use SSLv3 only * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SSL_VERSION_SSLv3', 3); +define('HTTP_SSL_VERSION_SSLv3', 3); /** * no specific SSL protocol version * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SSL_VERSION_ANY', 0); +define('HTTP_SSL_VERSION_ANY', 0); /** * use IPv4 only for name lookups * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_IPRESOLVE_V4', 1); +define('HTTP_IPRESOLVE_V4', 1); /** * use IPv6 only for name lookups * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_IPRESOLVE_V6', 2); +define('HTTP_IPRESOLVE_V6', 2); /** * use any IP mechanism only for name lookups * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_IPRESOLVE_ANY', 0); +define('HTTP_IPRESOLVE_ANY', 0); /** * the proxy is a SOCKS4 type proxy * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_PROXY_SOCKS4', 4); +define('HTTP_PROXY_SOCKS4', 4); /** * the proxy is a SOCKS5 type proxy * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_PROXY_SOCKS5', 5); +define('HTTP_PROXY_SOCKS5', 5); /** * standard HTTP proxy * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_PROXY_HTTP', 0); -define ('HTTP_METH_GET', 1); -define ('HTTP_METH_HEAD', 2); -define ('HTTP_METH_POST', 3); -define ('HTTP_METH_PUT', 4); -define ('HTTP_METH_DELETE', 5); -define ('HTTP_METH_OPTIONS', 6); -define ('HTTP_METH_TRACE', 7); -define ('HTTP_METH_CONNECT', 8); -define ('HTTP_METH_PROPFIND', 9); -define ('HTTP_METH_PROPPATCH', 10); -define ('HTTP_METH_MKCOL', 11); -define ('HTTP_METH_COPY', 12); -define ('HTTP_METH_MOVE', 13); -define ('HTTP_METH_LOCK', 14); -define ('HTTP_METH_UNLOCK', 15); -define ('HTTP_METH_VERSION_CONTROL', 16); -define ('HTTP_METH_REPORT', 17); -define ('HTTP_METH_CHECKOUT', 18); -define ('HTTP_METH_CHECKIN', 19); -define ('HTTP_METH_UNCHECKOUT', 20); -define ('HTTP_METH_MKWORKSPACE', 21); -define ('HTTP_METH_UPDATE', 22); -define ('HTTP_METH_LABEL', 23); -define ('HTTP_METH_MERGE', 24); -define ('HTTP_METH_BASELINE_CONTROL', 25); -define ('HTTP_METH_MKACTIVITY', 26); -define ('HTTP_METH_ACL', 27); +define('HTTP_PROXY_HTTP', 0); +define('HTTP_METH_GET', 1); +define('HTTP_METH_HEAD', 2); +define('HTTP_METH_POST', 3); +define('HTTP_METH_PUT', 4); +define('HTTP_METH_DELETE', 5); +define('HTTP_METH_OPTIONS', 6); +define('HTTP_METH_TRACE', 7); +define('HTTP_METH_CONNECT', 8); +define('HTTP_METH_PROPFIND', 9); +define('HTTP_METH_PROPPATCH', 10); +define('HTTP_METH_MKCOL', 11); +define('HTTP_METH_COPY', 12); +define('HTTP_METH_MOVE', 13); +define('HTTP_METH_LOCK', 14); +define('HTTP_METH_UNLOCK', 15); +define('HTTP_METH_VERSION_CONTROL', 16); +define('HTTP_METH_REPORT', 17); +define('HTTP_METH_CHECKOUT', 18); +define('HTTP_METH_CHECKIN', 19); +define('HTTP_METH_UNCHECKOUT', 20); +define('HTTP_METH_MKWORKSPACE', 21); +define('HTTP_METH_UPDATE', 22); +define('HTTP_METH_LABEL', 23); +define('HTTP_METH_MERGE', 24); +define('HTTP_METH_BASELINE_CONTROL', 25); +define('HTTP_METH_MKACTIVITY', 26); +define('HTTP_METH_ACL', 27); /** * guess applicable redirect method * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_REDIRECT', 0); +define('HTTP_REDIRECT', 0); /** * permanent redirect (301 Moved permanently) * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_REDIRECT_PERM', 301); +define('HTTP_REDIRECT_PERM', 301); /** * standard redirect (302 Found) @@ -3019,246 +3044,246 @@ function http_support ($feature = null) {} * kind of reaction is expected of the client. * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_REDIRECT_FOUND', 302); +define('HTTP_REDIRECT_FOUND', 302); /** * redirect applicable to POST requests (303 See other) * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_REDIRECT_POST', 303); +define('HTTP_REDIRECT_POST', 303); /** * proxy redirect (305 Use proxy) * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_REDIRECT_PROXY', 305); +define('HTTP_REDIRECT_PROXY', 305); /** * temporary redirect (307 Temporary Redirect) * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_REDIRECT_TEMP', 307); +define('HTTP_REDIRECT_TEMP', 307); /** * querying for this constant will always return true * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SUPPORT', 1); +define('HTTP_SUPPORT', 1); /** * whether support to issue HTTP requests is given, ie. libcurl support was compiled in * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SUPPORT_REQUESTS', 2); +define('HTTP_SUPPORT_REQUESTS', 2); /** * whether support to guess the Content-Type of HTTP messages is given, ie. libmagic support was compiled in * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SUPPORT_MAGICMIME', 4); +define('HTTP_SUPPORT_MAGICMIME', 4); /** * whether support for zlib encodings is given, ie. libz support was compiled in * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SUPPORT_ENCODINGS', 8); +define('HTTP_SUPPORT_ENCODINGS', 8); /** * whether support to issue HTTP requests over SSL is given, ie. linked libcurl was built with SSL support * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_SUPPORT_SSLREQUESTS', 32); -define ('HTTP_SUPPORT_EVENTS', 128); +define('HTTP_SUPPORT_SSLREQUESTS', 32); +define('HTTP_SUPPORT_EVENTS', 128); /** * allow commands additionally to semicolons as separator * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_PARAMS_ALLOW_COMMA', 1); +define('HTTP_PARAMS_ALLOW_COMMA', 1); /** * continue parsing after an error occurred * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_PARAMS_ALLOW_FAILURE', 2); +define('HTTP_PARAMS_ALLOW_FAILURE', 2); /** * raise PHP warnings on parse errors * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_PARAMS_RAISE_ERROR', 4); +define('HTTP_PARAMS_RAISE_ERROR', 4); /** * all three values above, bitwise or'ed * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_PARAMS_DEFAULT', 7); +define('HTTP_PARAMS_DEFAULT', 7); /** * replace every part of the first URL when there's one of the second URL * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_REPLACE', 0); +define('HTTP_URL_REPLACE', 0); /** * join relative paths * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_JOIN_PATH', 1); +define('HTTP_URL_JOIN_PATH', 1); /** * join query strings * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_JOIN_QUERY', 2); +define('HTTP_URL_JOIN_QUERY', 2); /** * strip any user authentication information * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_USER', 4); +define('HTTP_URL_STRIP_USER', 4); /** * strip any password authentication information * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_PASS', 8); +define('HTTP_URL_STRIP_PASS', 8); /** * strip any authentication information * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_AUTH', 12); +define('HTTP_URL_STRIP_AUTH', 12); /** * strip explicit port numbers * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_PORT', 32); +define('HTTP_URL_STRIP_PORT', 32); /** * strip complete path * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_PATH', 64); +define('HTTP_URL_STRIP_PATH', 64); /** * strip query string * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_QUERY', 128); +define('HTTP_URL_STRIP_QUERY', 128); /** * strip any fragments (#identifier) * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_FRAGMENT', 256); +define('HTTP_URL_STRIP_FRAGMENT', 256); /** * strip anything but scheme and host * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_URL_STRIP_ALL', 492); -define ('HTTP_URL_FROM_ENV', 4096); +define('HTTP_URL_STRIP_ALL', 492); +define('HTTP_URL_FROM_ENV', 4096); /** * runtime error * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_RUNTIME', 1); +define('HTTP_E_RUNTIME', 1); /** * an invalid parameter was passed * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_INVALID_PARAM', 2); +define('HTTP_E_INVALID_PARAM', 2); /** * header() or similar operation failed * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_HEADER', 3); +define('HTTP_E_HEADER', 3); /** * HTTP header parse error * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_MALFORMED_HEADERS', 4); +define('HTTP_E_MALFORMED_HEADERS', 4); /** * unknown/invalid request method * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_REQUEST_METHOD', 5); +define('HTTP_E_REQUEST_METHOD', 5); /** * with operation incompatible message type * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_MESSAGE_TYPE', 6); +define('HTTP_E_MESSAGE_TYPE', 6); /** * encoding/decoding error * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_ENCODING', 7); +define('HTTP_E_ENCODING', 7); /** * request failure * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_REQUEST', 8); +define('HTTP_E_REQUEST', 8); /** * request pool failure * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_REQUEST_POOL', 9); +define('HTTP_E_REQUEST_POOL', 9); /** * socket exception * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_SOCKET', 10); +define('HTTP_E_SOCKET', 10); /** * response failure * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_RESPONSE', 11); +define('HTTP_E_RESPONSE', 11); /** * invalid URL * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_URL', 12); +define('HTTP_E_URL', 12); /** * querystring operation failure * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_E_QUERYSTRING', 13); +define('HTTP_E_QUERYSTRING', 13); /** * the message is of no specific type * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_MSG_NONE', 0); +define('HTTP_MSG_NONE', 0); /** * request style message * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_MSG_REQUEST', 1); +define('HTTP_MSG_REQUEST', 1); /** * response style message * @link https://php.net/manual/en/http.constants.php */ -define ('HTTP_MSG_RESPONSE', 2); -define ('HTTP_QUERYSTRING_TYPE_BOOL', 3); -define ('HTTP_QUERYSTRING_TYPE_INT', 1); -define ('HTTP_QUERYSTRING_TYPE_FLOAT', 2); -define ('HTTP_QUERYSTRING_TYPE_STRING', 6); -define ('HTTP_QUERYSTRING_TYPE_ARRAY', 4); -define ('HTTP_QUERYSTRING_TYPE_OBJECT', 5); +define('HTTP_MSG_RESPONSE', 2); +define('HTTP_QUERYSTRING_TYPE_BOOL', 3); +define('HTTP_QUERYSTRING_TYPE_INT', 1); +define('HTTP_QUERYSTRING_TYPE_FLOAT', 2); +define('HTTP_QUERYSTRING_TYPE_STRING', 6); +define('HTTP_QUERYSTRING_TYPE_ARRAY', 4); +define('HTTP_QUERYSTRING_TYPE_OBJECT', 5); diff --git a/http/http3.php b/http/http3.php index 63cbf84ce..54db34d72 100644 --- a/http/http3.php +++ b/http/http3.php @@ -1,1933 +1,2148 @@ ***NOTE:*** - * > This method has been added in v2.3.0. - * - * @param array $configuration Key/value pairs of low level options. - * See f.e. the [configuration options for the Curl driver](http/Client/Curl#Configuration:). - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Client self. - */ - function configure(array $configuration) {} - /** - * Implements Countable. Retrieve the number of enqueued requests. - * - * > ***NOTE:*** - * > The enqueued requests are counted without regard whether they are finished or not. - * - * @return int number of enqueued requests. - */ - function count() {} - /** - * Dequeue the http\Client\Request $request. - * - * See http\Client::requeue(), if you want to requeue the request, instead of calling http\Client::dequeue() and then http\Client::enqueue(). - * - * @param \http\Client\Request $request The request to cancel. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @throws \http\Exception\RuntimeException - * @return \http\Client self. - */ - function dequeue(\http\Client\Request $request) {} - /** - * Implements SplSubject. Detach $observer, which has been previously attached. - * - * @param \SplObserver $observer Previously attached instance of SplObserver implementation. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Client self. - */ - function detach(\SplObserver $observer) {} - /** - * Enable usage of an event library like libevent, which might improve performance with big socket sets. - * - * > ***NOTE:*** - * > This method has been deprecated in 2.3.0, please use http\Client::configure() instead. - * - * @param bool $enable Whether to enable libevent usage. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Client self. - * @deprecated - */ - function enableEvents(bool $enable = true) {} - /** - * Enable sending pipelined requests to the same host if the driver supports it. - * - * > ***NOTE:*** - * > This method has been deprecated in 2.3.0, please use http\Client::configure() instead. - * - * @param bool $enable Whether to enable pipelining. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Client self. - * @deprecated - */ - function enablePipelining(bool $enable = true) {} - /** - * Add another http\Client\Request to the request queue. - * If the optional callback $cb returns true, the request will be automatically dequeued. - * - * > ***Note:*** - * > The http\Client\Response object resulting from the request is always stored - * > internally to be retrieved at a later time, __even__ when $cb is used. - * > - * > If you are about to send a lot of requests and do __not__ need the response - * > after executing the callback, you can use http\Client::getResponse() within - * > the callback to keep the memory usage level as low as possible. - * - * See http\Client::dequeue() and http\Client::send(). - * - * @param \http\Client\Request $request The request to enqueue. - * @param callable $cb as function(\http\Response $response) : ?bool - * A callback to automatically call when the request has finished. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @throws \http\Exception\RuntimeException - * @return \http\Client self. - */ - function enqueue(\http\Client\Request $request, callable $cb = NULL) {} - /** - * Get a list of available configuration options and their default values. - * - * See f.e. the [configuration options for the Curl driver](http/Client/Curl#Configuration:). - * - * @throws \http\Exception\InvalidArgumentException - * @return array list of key/value pairs of available configuration options and their default values. - */ - function getAvailableConfiguration() {} - /** - * List available drivers. - * - * @return array list of supported drivers. - */ - function getAvailableDrivers() {} - /** - * Retrieve a list of available request options and their default values. - * - * See f.e. the [request options for the Curl driver](http/Client/Curl#Options:). - * - * @throws \http\Exception\InvalidArgumentException - * @return array list of key/value pairs of available request options and their default values. - */ - function getAvailableOptions() {} - /** - * Get priorly set custom cookies. - * See http\Client::setCookies(). - * - * @return array custom cookies. - */ - function getCookies() {} - /** - * Simply returns the http\Message chain representing the request/response history. - * - * > ***NOTE:*** - * > The history is only recorded while http\Client::$recordHistory is true. - * - * @throws \http\Exception\InvalidArgumentException - * @return \http\Message the request/response message chain representing the client's history. - */ - function getHistory() {} - /** - * Returns the SplObjectStorage holding attached observers. - * - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \SplObjectStorage observer storage. - */ - function getObservers() {} - /** - * Get priorly set options. - * See http\Client::setOptions(). - * - * @return array options. - */ - function getOptions() {} - /** - * Retrieve the progress information for $request. - * - * @param \http\Client\Request $request The request to retrieve the current progress information for. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return object|NULL object stdClass instance holding progress information. - * or NULL if $request is not enqueued. - */ - function getProgressInfo(\http\Client\Request $request) {} - /** - * Retrieve the corresponding response of an already finished request, or the last received response if $request is not set. - * - * > ***NOTE:*** - * > If $request is NULL, then the response is removed from the internal storage (stack-like operation). - * - * @param \http\Client\Request $request The request to fetch the stored response for. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Client\Response|NULL \http\Client\Response the stored response for the request, or the last that was received. - * or NULL if no more response was available to pop, when no $request was given. - */ - function getResponse(\http\Client\Request $request = NULL) {} - /** - * Retrieve priorly set SSL options. - * See http\Client::getOptions() and http\Client::setSslOptions(). - * - * @return array SSL options. - */ - function getSslOptions() {} - /** - * Get transfer related information for a running or finished request. - * - * @param \http\Client\Request $request The request to probe for transfer info. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return object stdClass instance holding transfer related information. - */ - function getTransferInfo(\http\Client\Request $request) {} - /** - * Implements SplSubject. Notify attached observers about progress with $request. - * - * @param \http\Client\Request $request The request to notify about. - * @param object $progress stdClass instance holding progress information. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Client self. - */ - function notify(\http\Client\Request $request = NULL, $progress = NULL) {} - /** - * Perform outstanding transfer actions. - * See http\Client::wait() for the completing interface. - * - * @return bool true if there are more transfers to complete. - */ - function once() {} - /** - * Requeue an http\Client\Request. - * - * The difference simply is, that this method, in contrast to http\Client::enqueue(), does not throw an http\Exception when the request to queue is already enqueued and dequeues it automatically prior enqueueing it again. - * - * @param \http\Client\Request $request The request to queue. - * @param callable $cb as function(\http\Response $response) : ?bool - * A callback to automatically call when the request has finished. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - * @return \http\Client self. - */ - function requeue(\http\Client\Request $request, callable $cb = NULL) {} - /** - * Reset the client to the initial state. - * - * @return \http\Client self. - */ - function reset() {} - /** - * Send all enqueued requests. - * See http\Client::once() and http\Client::wait() for a more fine grained interface. - * - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - * @return \http\Client self. - */ - function send() {} - /** - * Set custom cookies. - * See http\Client::addCookies() and http\Client::getCookies(). - * - * @param array $cookies Set the custom cookies to this array. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Client self. - */ - function setCookies(array $cookies = NULL) {} - /** - * Set client debugging callback. - * - * > ***NOTE:*** - * > This method has been added in v2.6.0, resp. v3.1.0. - * - * @param callable $callback as function(http\Client $c, http\Client\Request $r, int $type, string $data) - * The debug callback. For $type see http\Client::DEBUG_* constants. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Client self. - */ - function setDebug(callable $callback) {} - /** - * Set client options. - * See http\Client\Curl. - * - * > ***NOTE:*** - * > Only options specified prior enqueueing a request are applied to the request. - * - * @param array $options The options to set. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Client self. - */ - function setOptions(array $options = NULL) {} - /** - * Specifically set SSL options. - * See http\Client::setOptions() and http\Client\Curl\$ssl options. - * - * @param array $ssl_options Set SSL options to this array. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Client self. - */ - function setSslOptions(array $ssl_options = NULL) {} - /** - * Wait for $timeout seconds for transfers to provide data. - * This is the completion call to http\Client::once(). - * - * @param float $timeout Seconds to wait for data on open sockets. - * @return bool success. - */ - function wait(float $timeout = 0) {} +class Client implements \SplSubject, \Countable +{ + /** + * Debug callback's $data contains human readable text. + */ + public const DEBUG_INFO = 0; + + /** + * Debug callback's $data contains data received. + */ + public const DEBUG_IN = 1; + + /** + * Debug callback's $data contains data sent. + */ + public const DEBUG_OUT = 2; + + /** + * Debug callback's $data contains headers. + */ + public const DEBUG_HEADER = 16; + + /** + * Debug callback's $data contains a body part. + */ + public const DEBUG_BODY = 32; + + /** + * Debug callback's $data contains SSL data. + */ + public const DEBUG_SSL = 64; + + /** + * Attached observers. + * + * @var \SplObjectStorage + */ + private $observers = null; + + /** + * Set options. + * + * @var array + */ + protected $options = null; + + /** + * Request/response history. + * + * @var \http\Message + */ + protected $history = null; + + /** + * Whether to record history in http\Client::$history. + * + * @var bool + */ + public $recordHistory = false; + + /** + * Create a new HTTP client. + * + * Currently only "curl" is supported as a $driver, and used by default. + * Persisted resources identified by $persistent_handle_id will be re-used if available. + * + * @param string $driver The HTTP client driver to employ. Currently only the default driver, "curl", is supported. + * @param string $persistent_handle_id If supplied, created curl handles will be persisted with this identifier for later reuse. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @throws \http\Exception\RuntimeException + */ + public function __construct(string $driver = null, string $persistent_handle_id = null) {} + + /** + * Add custom cookies. + * See http\Client::setCookies(). + * + * @param array $cookies Custom cookies to add. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client self. + */ + public function addCookies(array $cookies = null) {} + + /** + * Add specific SSL options. + * See http\Client::setSslOptions(), http\Client::setOptions() and http\Client\Curl\$ssl options. + * + * @param array $ssl_options Add this SSL options. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client self. + */ + public function addSslOptions(array $ssl_options = null) {} + + /** + * Implements SplSubject. Attach another observer. + * Attached observers will be notified with progress of each transfer. + * + * @param \SplObserver $observer An implementation of SplObserver. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client self. + */ + public function attach(\SplObserver $observer) {} + + /** + * Configure the client's low level options. + * + * ***NOTE:*** + * This method has been added in v2.3.0. + * + * @param array $configuration Key/value pairs of low level options. + * See f.e. the [configuration options for the Curl driver](http/Client/Curl#Configuration:). + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client self. + */ + public function configure(array $configuration) {} + + /** + * Implements Countable. Retrieve the number of enqueued requests. + * + * ***NOTE:*** + * The enqueued requests are counted without regard whether they are finished or not. + * + * @return int number of enqueued requests. + */ + public function count() {} + + /** + * Dequeue the http\Client\Request $request. + * + * See http\Client::requeue(), if you want to requeue the request, instead of calling http\Client::dequeue() and then http\Client::enqueue(). + * + * @param \http\Client\Request $request The request to cancel. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @throws \http\Exception\RuntimeException + * @return \http\Client self. + */ + public function dequeue(http\Client\Request $request) {} + + /** + * Implements SplSubject. Detach $observer, which has been previously attached. + * + * @param \SplObserver $observer Previously attached instance of SplObserver implementation. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client self. + */ + public function detach(\SplObserver $observer) {} + + /** + * Enable usage of an event library like libevent, which might improve performance with big socket sets. + * + * @param bool $enable Whether to enable libevent usage. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client self. + * @see Client::configure() + */ + #[Deprecated('This method has been deprecated in 2.3.0. Use http\Client::configure() instead')] + public function enableEvents(bool $enable = true) {} + + /** + * Enable sending pipelined requests to the same host if the driver supports it. + * + * @param bool $enable Whether to enable pipelining. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client self. + * @see Client::configure() + */ + #[Deprecated('This method has been deprecated in 2.3.0. Use http\Client::configure() instead')] + public function enablePipelining(bool $enable = true) {} + + /** + * Add another http\Client\Request to the request queue. + * If the optional callback $cb returns true, the request will be automatically dequeued. + * + * ***Note:*** + * The http\Client\Response object resulting from the request is always stored + * internally to be retrieved at a later time, __even__ when $cb is used. + * + * If you are about to send a lot of requests and do __not__ need the response + * after executing the callback, you can use http\Client::getResponse() within + * the callback to keep the memory usage level as low as possible. + * + * See http\Client::dequeue() and http\Client::send(). + * + * @param \http\Client\Request $request The request to enqueue. + * @param callable $cb as function(\http\Response $response) : ?bool + * A callback to automatically call when the request has finished. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @throws \http\Exception\RuntimeException + * @return \http\Client self. + */ + public function enqueue(http\Client\Request $request, callable $cb = null) {} + + /** + * Get a list of available configuration options and their default values. + * + * See f.e. the [configuration options for the Curl driver](http/Client/Curl#Configuration:). + * + * @throws \http\Exception\InvalidArgumentException + * @return array list of key/value pairs of available configuration options and their default values. + */ + public function getAvailableConfiguration() {} + + /** + * List available drivers. + * + * @return array list of supported drivers. + */ + public function getAvailableDrivers() {} + + /** + * Retrieve a list of available request options and their default values. + * + * See f.e. the [request options for the Curl driver](http/Client/Curl#Options:). + * + * @throws \http\Exception\InvalidArgumentException + * @return array list of key/value pairs of available request options and their default values. + */ + public function getAvailableOptions() {} + + /** + * Get priorly set custom cookies. + * See http\Client::setCookies(). + * + * @return array custom cookies. + */ + public function getCookies() {} + + /** + * Simply returns the http\Message chain representing the request/response history. + * + * ***NOTE:*** + * The history is only recorded while http\Client::$recordHistory is true. + * + * @throws \http\Exception\InvalidArgumentException + * @return \http\Message the request/response message chain representing the client's history. + */ + public function getHistory() {} + + /** + * Returns the SplObjectStorage holding attached observers. + * + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \SplObjectStorage observer storage. + */ + public function getObservers() {} + + /** + * Get priorly set options. + * See http\Client::setOptions(). + * + * @return array options. + */ + public function getOptions() {} + + /** + * Retrieve the progress information for $request. + * + * @param \http\Client\Request $request The request to retrieve the current progress information for. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return object|null object stdClass instance holding progress information. + * or NULL if $request is not enqueued. + */ + public function getProgressInfo(http\Client\Request $request) {} + + /** + * Retrieve the corresponding response of an already finished request, or the last received response if $request is not set. + * + * ***NOTE:*** + * If $request is NULL, then the response is removed from the internal storage (stack-like operation). + * + * @param \http\Client\Request $request The request to fetch the stored response for. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client\Response|null \http\Client\Response the stored response for the request, or the last that was received. + * or NULL if no more response was available to pop, when no $request was given. + */ + public function getResponse(http\Client\Request $request = null) {} + + /** + * Retrieve priorly set SSL options. + * See http\Client::getOptions() and http\Client::setSslOptions(). + * + * @return array SSL options. + */ + public function getSslOptions() {} + + /** + * Get transfer related information for a running or finished request. + * + * @param \http\Client\Request $request The request to probe for transfer info. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return object stdClass instance holding transfer related information. + */ + public function getTransferInfo(http\Client\Request $request) {} + + /** + * Implements SplSubject. Notify attached observers about progress with $request. + * + * @param \http\Client\Request $request The request to notify about. + * @param object $progress stdClass instance holding progress information. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client self. + */ + public function notify(http\Client\Request $request = null, $progress = null) {} + + /** + * Perform outstanding transfer actions. + * See http\Client::wait() for the completing interface. + * + * @return bool true if there are more transfers to complete. + */ + public function once() {} + + /** + * Requeue an http\Client\Request. + * + * The difference simply is, that this method, in contrast to http\Client::enqueue(), does not throw an http\Exception when the request to queue is already enqueued and dequeues it automatically prior enqueueing it again. + * + * @param \http\Client\Request $request The request to queue. + * @param callable $cb as function(\http\Response $response) : ?bool + * A callback to automatically call when the request has finished. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + * @return \http\Client self. + */ + public function requeue(http\Client\Request $request, callable $cb = null) {} + + /** + * Reset the client to the initial state. + * + * @return \http\Client self. + */ + public function reset() {} + + /** + * Send all enqueued requests. + * See http\Client::once() and http\Client::wait() for a more fine grained interface. + * + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + * @return \http\Client self. + */ + public function send() {} + + /** + * Set custom cookies. + * See http\Client::addCookies() and http\Client::getCookies(). + * + * @param array $cookies Set the custom cookies to this array. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client self. + */ + public function setCookies(array $cookies = null) {} + + /** + * Set client debugging callback. + * + * ***NOTE:*** + * This method has been added in v2.6.0, resp. v3.1.0. + * + * @param callable $callback as function(http\Client $c, http\Client\Request $r, int $type, string $data) + * The debug callback. For $type see http\Client::DEBUG_* constants. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client self. + */ + public function setDebug(callable $callback) {} + + /** + * Set client options. + * See http\Client\Curl. + * + * ***NOTE:*** + * Only options specified prior enqueueing a request are applied to the request. + * + * @param array $options The options to set. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client self. + */ + public function setOptions(array $options = null) {} + + /** + * Specifically set SSL options. + * See http\Client::setOptions() and http\Client\Curl\$ssl options. + * + * @param array $ssl_options Set SSL options to this array. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client self. + */ + public function setSslOptions(array $ssl_options = null) {} + + /** + * Wait for $timeout seconds for transfers to provide data. + * This is the completion call to http\Client::once(). + * + * @param float $timeout Seconds to wait for data on open sockets. + * @return bool success. + */ + public function wait(float $timeout = 0) {} } /** * A class representing a list of cookies with specific attributes. */ -class Cookie { - /** - * Do not decode cookie contents. - */ - const PARSE_RAW = 1; - /** - * The cookies' flags have the secure attribute set. - */ - const SECURE = 16; - /** - * The cookies' flags have the httpOnly attribute set. - */ - const HTTPONLY = 32; - /** - * Create a new cookie list. - * - * @param mixed $cookies The string or list of cookies to parse or set. - * @param int $flags Parse flags. See http\Cookie::PARSE_* constants. - * @param array $allowed_extras List of extra attribute names to recognize. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - */ - function __construct($cookies = NULL, int $flags = 0, array $allowed_extras = NULL) {} - /** - * String cast handler. Alias of http\Cookie::toString(). - * - * @return string the cookie(s) represented as string. - */ - function __toString() {} - /** - * Add a cookie. - * See http\Cookie::setCookie() and http\Cookie::addCookies(). - * - * @param string $cookie_name The key of the cookie. - * @param string $cookie_value The value of the cookie. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function addCookie(string $cookie_name, string $cookie_value) {} - /** - * (Re)set the cookies. - * See http\Cookie::setCookies(). - * - * @param array $cookies Add cookies of this array of form ["name" => "value"]. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function addCookies(array $cookies) {} - /** - * Add an extra attribute to the cookie list. - * See http\Cookie::setExtra(). - * - * @param string $extra_name The key of the extra attribute. - * @param string $extra_value The value of the extra attribute. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function addExtra(string $extra_name, string $extra_value) {} - /** - * Add several extra attributes. - * See http\Cookie::addExtra(). - * - * @param array $extras A list of extra attributes of the form ["key" => "value"]. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function addExtras(array $extras) {} - /** - * Retrieve a specific cookie value. - * See http\Cookie::setCookie(). - * - * @param string $cookie_name The key of the cookie to look up. - * @return string|NULL string the cookie value. - * or NULL if $cookie_name could not be found. - */ - function getCookie(string $cookie_name) {} - /** - * Get the list of cookies. - * See http\Cookie::setCookies(). - * - * @return array the list of cookies of form ["name" => "value"]. - */ - function getCookies() {} - /** - * Retrieve the effective domain of the cookie list. - * See http\Cookie::setDomain(). - * - * @return string the effective domain. - */ - function getDomain() {} - /** - * Get the currently set expires attribute. - * See http\Cookie::setExpires(). - * - * > ***NOTE:*** - * > A return value of -1 means that the attribute is not set. - * - * @return int the currently set expires attribute as seconds since the epoch. - */ - function getExpires() {} - /** - * Retrieve an extra attribute. - * See http\Cookie::setExtra(). - * - * @param string $name The key of the extra attribute. - * @return string the value of the extra attribute. - */ - function getExtra(string $name) {} - /** - * Retrieve the list of extra attributes. - * See http\Cookie::setExtras(). - * - * @return array the list of extra attributes of the form ["key" => "value"]. - */ - function getExtras() {} - /** - * Get the currently set flags. - * See http\Cookie::SECURE and http\Cookie::HTTPONLY constants. - * - * @return int the currently set flags bitmask. - */ - function getFlags() {} - /** - * Get the currently set max-age attribute of the cookie list. - * See http\Cookie::setMaxAge(). - * - * > ***NOTE:*** - * > A return value of -1 means that the attribute is not set. - * - * @return int the currently set max-age. - */ - function getMaxAge() {} - /** - * Retrieve the path the cookie(s) of this cookie list are effective at. - * See http\Cookie::setPath(). - * - * @return string the effective path. - */ - function getPath() {} - /** - * (Re)set a cookie. - * See http\Cookie::addCookie() and http\Cookie::setCookies(). - * - * > ***NOTE:*** - * > The cookie will be deleted from the list if $cookie_value is NULL. - * - * @param string $cookie_name The key of the cookie. - * @param string $cookie_value The value of the cookie. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setCookie(string $cookie_name, string $cookie_value) {} - /** - * (Re)set the cookies. - * See http\Cookie::addCookies(). - * - * @param array $cookies Set the cookies to this array. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setCookies(array $cookies = NULL) {} - /** - * Set the effective domain of the cookie list. - * See http\Cookie::setPath(). - * - * @param string $value The domain the cookie(s) belong to. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setDomain(string $value = NULL) {} - /** - * Set the traditional expires timestamp. - * See http\Cookie::setMaxAge() for a safer alternative. - * - * @param int $value The expires timestamp as seconds since the epoch. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setExpires(int $value = -1) {} - /** - * (Re)set an extra attribute. - * See http\Cookie::addExtra(). - * - * > ***NOTE:*** - * > The attribute will be removed from the extras list if $extra_value is NULL. - * - * @param string $extra_name The key of the extra attribute. - * @param string $extra_value The value of the extra attribute. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setExtra(string $extra_name, string $extra_value = NULL) {} - /** - * (Re)set the extra attributes. - * See http\Cookie::addExtras(). - * - * @param array $extras Set the extra attributes to this array. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setExtras(array $extras = NULL) {} - /** - * Set the flags to specified $value. - * See http\Cookie::SECURE and http\Cookie::HTTPONLY constants. - * - * @param int $value The new flags bitmask. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setFlags(int $value = 0) {} - /** - * Set the maximum age the cookie may have on the client side. - * This is a client clock departure safe alternative to the "expires" attribute. - * See http\Cookie::setExpires(). - * - * @param int $value The max-age in seconds. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setMaxAge(int $value = -1) {} - /** - * Set the path the cookie(s) of this cookie list should be effective at. - * See http\Cookie::setDomain(). - * - * @param string $path The URL path the cookie(s) should take effect within. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Cookie self. - */ - function setPath(string $path = NULL) {} - /** - * Get the cookie list as array. - * - * @return array the cookie list as array. - */ - function toArray() {} - /** - * Retrieve the string representation of the cookie list. - * See http\Cookie::toArray(). - * - * @return string the cookie list as string. - */ - function toString() {} +class Cookie +{ + /** + * Do not decode cookie contents. + */ + public const PARSE_RAW = 1; + + /** + * The cookies' flags have the secure attribute set. + */ + public const SECURE = 16; + + /** + * The cookies' flags have the httpOnly attribute set. + */ + public const HTTPONLY = 32; + + /** + * Create a new cookie list. + * + * @param mixed $cookies The string or list of cookies to parse or set. + * @param int $flags Parse flags. See http\Cookie::PARSE_* constants. + * @param array $allowed_extras List of extra attribute names to recognize. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + */ + public function __construct($cookies = null, int $flags = 0, array $allowed_extras = null) {} + + /** + * String cast handler. Alias of http\Cookie::toString(). + * + * @return string the cookie(s) represented as string. + */ + public function __toString() {} + + /** + * Add a cookie. + * See http\Cookie::setCookie() and http\Cookie::addCookies(). + * + * @param string $cookie_name The key of the cookie. + * @param string $cookie_value The value of the cookie. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function addCookie(string $cookie_name, string $cookie_value) {} + + /** + * (Re)set the cookies. + * See http\Cookie::setCookies(). + * + * @param array $cookies Add cookies of this array of form ["name" => "value"]. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function addCookies(array $cookies) {} + + /** + * Add an extra attribute to the cookie list. + * See http\Cookie::setExtra(). + * + * @param string $extra_name The key of the extra attribute. + * @param string $extra_value The value of the extra attribute. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function addExtra(string $extra_name, string $extra_value) {} + + /** + * Add several extra attributes. + * See http\Cookie::addExtra(). + * + * @param array $extras A list of extra attributes of the form ["key" => "value"]. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function addExtras(array $extras) {} + + /** + * Retrieve a specific cookie value. + * See http\Cookie::setCookie(). + * + * @param string $cookie_name The key of the cookie to look up. + * @return string|null string the cookie value. + * or NULL if $cookie_name could not be found. + */ + public function getCookie(string $cookie_name) {} + + /** + * Get the list of cookies. + * See http\Cookie::setCookies(). + * + * @return array the list of cookies of form ["name" => "value"]. + */ + public function getCookies() {} + + /** + * Retrieve the effective domain of the cookie list. + * See http\Cookie::setDomain(). + * + * @return string the effective domain. + */ + public function getDomain() {} + + /** + * Get the currently set expires attribute. + * See http\Cookie::setExpires(). + * + * ***NOTE:*** + * A return value of -1 means that the attribute is not set. + * + * @return int the currently set expires attribute as seconds since the epoch. + */ + public function getExpires() {} + + /** + * Retrieve an extra attribute. + * See http\Cookie::setExtra(). + * + * @param string $name The key of the extra attribute. + * @return string the value of the extra attribute. + */ + public function getExtra(string $name) {} + + /** + * Retrieve the list of extra attributes. + * See http\Cookie::setExtras(). + * + * @return array the list of extra attributes of the form ["key" => "value"]. + */ + public function getExtras() {} + + /** + * Get the currently set flags. + * See http\Cookie::SECURE and http\Cookie::HTTPONLY constants. + * + * @return int the currently set flags bitmask. + */ + public function getFlags() {} + + /** + * Get the currently set max-age attribute of the cookie list. + * See http\Cookie::setMaxAge(). + * + * ***NOTE:*** + * A return value of -1 means that the attribute is not set. + * + * @return int the currently set max-age. + */ + public function getMaxAge() {} + + /** + * Retrieve the path the cookie(s) of this cookie list are effective at. + * See http\Cookie::setPath(). + * + * @return string the effective path. + */ + public function getPath() {} + + /** + * (Re)set a cookie. + * See http\Cookie::addCookie() and http\Cookie::setCookies(). + * + * ***NOTE:*** + * The cookie will be deleted from the list if $cookie_value is NULL. + * + * @param string $cookie_name The key of the cookie. + * @param string $cookie_value The value of the cookie. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setCookie(string $cookie_name, string $cookie_value) {} + + /** + * (Re)set the cookies. + * See http\Cookie::addCookies(). + * + * @param array $cookies Set the cookies to this array. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setCookies(array $cookies = null) {} + + /** + * Set the effective domain of the cookie list. + * See http\Cookie::setPath(). + * + * @param string $value The domain the cookie(s) belong to. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setDomain(string $value = null) {} + + /** + * Set the traditional expires timestamp. + * See http\Cookie::setMaxAge() for a safer alternative. + * + * @param int $value The expires timestamp as seconds since the epoch. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setExpires(int $value = -1) {} + + /** + * (Re)set an extra attribute. + * See http\Cookie::addExtra(). + * + * ***NOTE:*** + * The attribute will be removed from the extras list if $extra_value is NULL. + * + * @param string $extra_name The key of the extra attribute. + * @param string $extra_value The value of the extra attribute. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setExtra(string $extra_name, string $extra_value = null) {} + + /** + * (Re)set the extra attributes. + * See http\Cookie::addExtras(). + * + * @param array $extras Set the extra attributes to this array. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setExtras(array $extras = null) {} + + /** + * Set the flags to specified $value. + * See http\Cookie::SECURE and http\Cookie::HTTPONLY constants. + * + * @param int $value The new flags bitmask. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setFlags(int $value = 0) {} + + /** + * Set the maximum age the cookie may have on the client side. + * This is a client clock departure safe alternative to the "expires" attribute. + * See http\Cookie::setExpires(). + * + * @param int $value The max-age in seconds. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setMaxAge(int $value = -1) {} + + /** + * Set the path the cookie(s) of this cookie list should be effective at. + * See http\Cookie::setDomain(). + * + * @param string $path The URL path the cookie(s) should take effect within. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Cookie self. + */ + public function setPath(string $path = null) {} + + /** + * Get the cookie list as array. + * + * @return array the cookie list as array. + */ + public function toArray() {} + + /** + * Retrieve the string representation of the cookie list. + * See http\Cookie::toArray(). + * + * @return string the cookie list as string. + */ + public function toString() {} } -/** - * - */ + namespace http\Encoding; + namespace http; + /** * The http\Env class provides static methods to manipulate and inspect the server's current request's HTTP environment. */ -class Env { - /** - * Retrieve the current HTTP request's body. - * - * @param string $body_class_name A user class extending http\Message\Body. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Message\Body instance representing the request body - */ - function getRequestBody(string $body_class_name = NULL) {} - /** - * Retrieve one or all headers of the current HTTP request. - * - * @param string $header_name The key of a header to retrieve. - * @return NULL|string|array NULL if $header_name was not found - * or string the compound header when $header_name was found - * or array of all headers if $header_name was not specified - */ - function getRequestHeader(string $header_name = NULL) {} - /** - * Get the HTTP response code to send. - * - * @return int the HTTP response code. - */ - function getResponseCode() {} - /** - * Get one or all HTTP response headers to be sent. - * - * @param string $header_name The name of the response header to retrieve. - * @return string|NULL|array string the compound value of the response header to send - * or NULL if the header was not found - * or array of all response headers, if $header_name was not specified - */ - function getResponseHeader(string $header_name = NULL) {} - /** - * Retrieve a list of all known HTTP response status. - * - * @return array mapping of the form \[ - * ... - * int $code => string $status - * ... - * \] - */ - function getResponseStatusForAllCodes() {} - /** - * Retrieve the string representation of specified HTTP response code. - * - * @param int $code The HTTP response code to get the string representation for. - * @return string the HTTP response status message (may be empty, if no message for this code was found) - */ - function getResponseStatusForCode(int $code) {} - /** - * Generic negotiator. For specific client negotiation see http\Env::negotiateContentType() and related methods. - * - * > ***NOTE:*** - * > The first element of $supported serves as a default if no operand matches. - * - * @param string $params HTTP header parameter's value to negotiate. - * @param array $supported List of supported negotiation operands. - * @param string $prim_typ_sep A "primary type separator", i.e. that would be a hyphen for content language negotiation (en-US, de-DE, etc.). - * @param array $result Out parameter recording negotiation results. - * @return NULL|string NULL if negotiation fails. - * or string the closest match negotiated, or the default (first entry of $supported). - */ - function negotiate(string $params, array $supported, string $prim_typ_sep = NULL, array &$result = NULL) {} - /** - * Negotiate the client's preferred character set. - * - * > ***NOTE:*** - * > The first element of $supported character sets serves as a default if no character set matches. - * - * @param array $supported List of supported content character sets. - * @param array $result Out parameter recording negotiation results. - * @return NULL|string NULL if negotiation fails. - * or string the negotiated character set. - */ - function negotiateCharset(array $supported, array &$result = NULL) {} - /** - * Negotiate the client's preferred MIME content type. - * - * > ***NOTE:*** - * > The first element of $supported content types serves as a default if no content-type matches. - * - * @param array $supported List of supported MIME content types. - * @param array $result Out parameter recording negotiation results. - * @return NULL|string NULL if negotiation fails. - * or string the negotiated content type. - */ - function negotiateContentType(array $supported, array &$result = NULL) {} - /** - * Negotiate the client's preferred encoding. - * - * > ***NOTE:*** - * > The first element of $supported encodings serves as a default if no encoding matches. - * - * @param array $supported List of supported content encodings. - * @param array $result Out parameter recording negotiation results. - * @return NULL|string NULL if negotiation fails. - * or string the negotiated encoding. - */ - function negotiateEncoding(array $supported, array &$result = NULL) {} - /** - * Negotiate the client's preferred language. - * - * > ***NOTE:*** - * > The first element of $supported languages serves as a default if no language matches. - * - * @param array $supported List of supported content languages. - * @param array $result Out parameter recording negotiation results. - * @return NULL|string NULL if negotiation fails. - * or string the negotiated language. - */ - function negotiateLanguage(array $supported, array &$result = NULL) {} - /** - * Set the HTTP response code to send. - * - * @param int $code The HTTP response status code. - * @return bool Success. - */ - function setResponseCode(int $code) {} - /** - * Set a response header, either replacing a prior set header, or appending the new header value, depending on $replace. - * - * If no $header_value is specified, or $header_value is NULL, then a previously set header with the same key will be deleted from the list. - * - * If $response_code is not 0, the response status code is updated accordingly. - * - * @param string $header_name - * @param mixed $header_value - * @param int $response_code - * @param bool $replace - * @return bool Success. - */ - function setResponseHeader(string $header_name, $header_value = NULL, int $response_code = NULL, bool $replace = NULL) {} +class Env +{ + /** + * Retrieve the current HTTP request's body. + * + * @param string $body_class_name A user class extending http\Message\Body. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Message\Body instance representing the request body + */ + public function getRequestBody(string $body_class_name = null) {} + + /** + * Retrieve one or all headers of the current HTTP request. + * + * @param string $header_name The key of a header to retrieve. + * @return string|null|array NULL if $header_name was not found + * or string the compound header when $header_name was found + * or array of all headers if $header_name was not specified + */ + public function getRequestHeader(string $header_name = null) {} + + /** + * Get the HTTP response code to send. + * + * @return int the HTTP response code. + */ + public function getResponseCode() {} + + /** + * Get one or all HTTP response headers to be sent. + * + * @param string $header_name The name of the response header to retrieve. + * @return string|array|null string the compound value of the response header to send + * or NULL if the header was not found + * or array of all response headers, if $header_name was not specified + */ + public function getResponseHeader(string $header_name = null) {} + + /** + * Retrieve a list of all known HTTP response status. + * + * @return array mapping of the form \[ + * ... + * int $code => string $status + * ... + * \] + */ + public function getResponseStatusForAllCodes() {} + + /** + * Retrieve the string representation of specified HTTP response code. + * + * @param int $code The HTTP response code to get the string representation for. + * @return string the HTTP response status message (may be empty, if no message for this code was found) + */ + public function getResponseStatusForCode(int $code) {} + + /** + * Generic negotiator. For specific client negotiation see http\Env::negotiateContentType() and related methods. + * + * ***NOTE:*** + * The first element of $supported serves as a default if no operand matches. + * + * @param string $params HTTP header parameter's value to negotiate. + * @param array $supported List of supported negotiation operands. + * @param string $prim_typ_sep A "primary type separator", i.e. that would be a hyphen for content language negotiation (en-US, de-DE, etc.). + * @param array &$result Out parameter recording negotiation results. + * @return string|null NULL if negotiation fails. + * or string the closest match negotiated, or the default (first entry of $supported). + */ + public function negotiate(string $params, array $supported, string $prim_typ_sep = null, array &$result = null) {} + + /** + * Negotiate the client's preferred character set. + * + * ***NOTE:*** + * The first element of $supported character sets serves as a default if no character set matches. + * + * @param array $supported List of supported content character sets. + * @param array &$result Out parameter recording negotiation results. + * @return string|null NULL if negotiation fails. + * or string the negotiated character set. + */ + public function negotiateCharset(array $supported, array &$result = null) {} + + /** + * Negotiate the client's preferred MIME content type. + * + * ***NOTE:*** + * The first element of $supported content types serves as a default if no content-type matches. + * + * @param array $supported List of supported MIME content types. + * @param array &$result Out parameter recording negotiation results. + * @return string|null NULL if negotiation fails. + * or string the negotiated content type. + */ + public function negotiateContentType(array $supported, array &$result = null) {} + + /** + * Negotiate the client's preferred encoding. + * + * ***NOTE:*** + * The first element of $supported encodings serves as a default if no encoding matches. + * + * @param array $supported List of supported content encodings. + * @param array &$result Out parameter recording negotiation results. + * @return string|null NULL if negotiation fails. + * or string the negotiated encoding. + */ + public function negotiateEncoding(array $supported, array &$result = null) {} + + /** + * Negotiate the client's preferred language. + * + * ***NOTE:*** + * The first element of $supported languages serves as a default if no language matches. + * + * @param array $supported List of supported content languages. + * @param array &$result Out parameter recording negotiation results. + * @return string|null NULL if negotiation fails. + * or string the negotiated language. + */ + public function negotiateLanguage(array $supported, array &$result = null) {} + + /** + * Set the HTTP response code to send. + * + * @param int $code The HTTP response status code. + * @return bool Success. + */ + public function setResponseCode(int $code) {} + + /** + * Set a response header, either replacing a prior set header, or appending the new header value, depending on $replace. + * + * If no $header_value is specified, or $header_value is NULL, then a previously set header with the same key will be deleted from the list. + * + * If $response_code is not 0, the response status code is updated accordingly. + * + * @param string $header_name + * @param mixed $header_value + * @param int $response_code + * @param bool $replace + * @return bool Success. + */ + public function setResponseHeader(string $header_name, $header_value = null, int $response_code = null, bool $replace = null) {} } /** * The http extension's Exception interface. - * + * * Use it to catch any Exception thrown by pecl/http. - * + * * The individual exception classes extend their equally named native PHP extensions, if such exist, and implement this empty interface. For example the http\Exception\BadMethodCallException extends SPL's BadMethodCallException. */ -interface Exception { -} +interface Exception {} /** * The http\Header class provides methods to manipulate, match, negotiate and serialize HTTP headers. */ -class Header implements \Serializable { - /** - * None of the following match constraints applies. - */ - const MATCH_LOOSE = 0; - /** - * Perform case sensitive matching. - */ - const MATCH_CASE = 1; - /** - * Match only on word boundaries (according by CType alpha-numeric). - */ - const MATCH_WORD = 16; - /** - * Match the complete string. - */ - const MATCH_FULL = 32; - /** - * Case sensitively match the full string (same as MATCH_CASE|MATCH_FULL). - */ - const MATCH_STRICT = 33; - /** - * The name of the HTTP header. - * - * @public - * @var string - */ - public $name = NULL; - /** - * The value of the HTTP header. - * - * @public - * @var - */ - public $value = NULL; - /** - * Create an http\Header instance for use of simple matching or negotiation. If the value of the header is an array it may be compounded to a single comma separated string. - * - * @param string $name The HTTP header name. - * @param mixed $value The value of the header. - * - * # Throws: - */ - function __construct(string $name = NULL, $value = NULL) {} - /** - * String cast handler. Alias of http\Header::serialize(). - * - * @return string the serialized form of the HTTP header (i.e. "Name: value"). - */ - function __toString() {} - /** - * Create a parameter list out of the HTTP header value. - * - * @param mixed $ps The parameter separator(s). - * @param mixed $as The argument separator(s). - * @param mixed $vs The value separator(s). - * @param int $flags The modus operandi. See http\Params constants. - * @return \http\Params instance - */ - function getParams($ps = NULL, $as = NULL, $vs = NULL, int $flags = NULL) {} - /** - * Match the HTTP header's value against provided $value according to $flags. - * - * @param string $value The comparison value. - * @param int $flags The modus operandi. See http\Header constants. - * @return bool whether $value matches the header value according to $flags. - */ - function match(string $value, int $flags = NULL) {} - /** - * Negotiate the header's value against a list of supported values in $supported. - * Negotiation operation is adopted according to the header name, i.e. if the - * header being negotiated is Accept, then a slash is used as primary type - * separator, and if the header is Accept-Language respectively, a hyphen is - * used instead. - * - * > ***NOTE:*** - * > The first element of $supported serves as a default if no operand matches. - * - * @param array $supported The list of supported values to negotiate. - * @param array $result Out parameter recording the negotiation results. - * @return NULL|string NULL if negotiation fails. - * or string the closest match negotiated, or the default (first entry of $supported). - */ - function negotiate(array $supported, array &$result = NULL) {} - /** - * Parse HTTP headers. - * See also http\Header\Parser. - * - * @param string $header The complete string of headers. - * @param string $header_class A class extending http\Header. - * @return array|false array of parsed headers, where the elements are instances of $header_class if specified. - * or false if parsing fails. - */ - function parse(string $header, string $header_class = NULL) {} - /** - * Implements Serializable. - * - * @return string serialized representation of HTTP header (i.e. "Name: value") - */ - function serialize() {} - /** - * Convenience method. Alias of http\Header::serialize(). - * - * @return string the serialized form of the HTTP header (i.e. "Name: value"). - */ - function toString() {} - /** - * Implements Serializable. - * - * @param string $serialized The serialized HTTP header (i.e. "Name: value") - */ - function unserialize($serialized) {} +class Header implements \Serializable +{ + /** + * None of the following match constraints applies. + */ + public const MATCH_LOOSE = 0; + + /** + * Perform case sensitive matching. + */ + public const MATCH_CASE = 1; + + /** + * Match only on word boundaries (according by CType alpha-numeric). + */ + public const MATCH_WORD = 16; + + /** + * Match the complete string. + */ + public const MATCH_FULL = 32; + + /** + * Case sensitively match the full string (same as MATCH_CASE|MATCH_FULL). + */ + public const MATCH_STRICT = 33; + + /** + * The name of the HTTP header. + * + * @var string + */ + public $name = null; + + /** + * The value of the HTTP header. + * + * @var mixed + */ + public $value = null; + + /** + * Create an http\Header instance for use of simple matching or negotiation. If the value of the header is an array it may be compounded to a single comma separated string. + * + * @param string $name The HTTP header name. + * @param mixed $value The value of the header. + * + * # Throws: + */ + public function __construct(string $name = null, $value = null) {} + + /** + * String cast handler. Alias of http\Header::serialize(). + * + * @return string the serialized form of the HTTP header (i.e. "Name: value"). + */ + public function __toString() {} + + /** + * Create a parameter list out of the HTTP header value. + * + * @param mixed $ps The parameter separator(s). + * @param mixed $as The argument separator(s). + * @param mixed $vs The value separator(s). + * @param int $flags The modus operandi. See http\Params constants. + * @return \http\Params instance + */ + public function getParams($ps = null, $as = null, $vs = null, int $flags = null) {} + + /** + * Match the HTTP header's value against provided $value according to $flags. + * + * @param string $value The comparison value. + * @param int $flags The modus operandi. See http\Header constants. + * @return bool whether $value matches the header value according to $flags. + */ + public function match(string $value, int $flags = null) {} + + /** + * Negotiate the header's value against a list of supported values in $supported. + * Negotiation operation is adopted according to the header name, i.e. if the + * header being negotiated is Accept, then a slash is used as primary type + * separator, and if the header is Accept-Language respectively, a hyphen is + * used instead. + * + * ***NOTE:*** + * The first element of $supported serves as a default if no operand matches. + * + * @param array $supported The list of supported values to negotiate. + * @param array &$result Out parameter recording the negotiation results. + * @return string|null NULL if negotiation fails. + * or string the closest match negotiated, or the default (first entry of $supported). + */ + public function negotiate(array $supported, array &$result = null) {} + + /** + * Parse HTTP headers. + * See also http\Header\Parser. + * + * @param string $header The complete string of headers. + * @param string $header_class A class extending http\Header. + * @return array|false array of parsed headers, where the elements are instances of $header_class if specified. + * or false if parsing fails. + */ + public function parse(string $header, string $header_class = null) {} + + /** + * Implements Serializable. + * + * @return string serialized representation of HTTP header (i.e. "Name: value") + */ + public function serialize() {} + + /** + * Convenience method. Alias of http\Header::serialize(). + * + * @return string the serialized form of the HTTP header (i.e. "Name: value"). + */ + public function toString() {} + + /** + * Implements Serializable. + * + * @param string $serialized The serialized HTTP header (i.e. "Name: value") + */ + public function unserialize($serialized) {} } /** * The message class builds the foundation for any request and response message. - * + * * See http\Client\Request and http\Client\Response, as well as http\Env\Request and http\Env\Response. */ -class Message implements \Countable, \Serializable, \Iterator { - /** - * No specific type of message. - */ - const TYPE_NONE = 0; - /** - * A request message. - */ - const TYPE_REQUEST = 1; - /** - * A response message. - */ - const TYPE_RESPONSE = 2; - /** - * The message type. See http\Message::TYPE_* constants. - * - * @protected - * @var int - */ - protected $type = \http\Message::TYPE_NONE; - /** - * The message's body. - * - * @protected - * @var \http\Message\Body - */ - protected $body = NULL; - /** - * The request method if the message is of type request. - * - * @protected - * @var string - */ - protected $requestMethod = ""; - /** - * The request url if the message is of type request. - * - * @protected - * @var string - */ - protected $requestUrl = ""; - /** - * The response status phrase if the message is of type response. - * - * @protected - * @var string - */ - protected $responseStatus = ""; - /** - * The response code if the message is of type response. - * - * @protected - * @var int - */ - protected $responseCode = 0; - /** - * A custom HTTP protocol version. - * - * @protected - * @var string - */ - protected $httpVersion = NULL; - /** - * Any message headers. - * - * @protected - * @var array - */ - protected $headers = NULL; - /** - * Any parent message. - * - * @protected - * @var \http\Message - */ - protected $parentMessage; - /** - * Create a new HTTP message. - * - * @param mixed $message Either a resource or a string, representing the HTTP message. - * @param bool $greedy Whether to read from a $message resource until EOF. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMessageException - */ - function __construct($message = NULL, bool $greedy = true) {} - /** - * Retrieve the message serialized to a string. - * Alias of http\Message::toString(). - * - * @return string the single serialized HTTP message. - */ - function __toString() {} - /** - * Append the data of $body to the message's body. - * See http\Message::setBody() and http\Message\Body::append(). - * - * @param \http\Message\Body $body The message body to add. - * @return \http\Message self. - */ - function addBody(\http\Message\Body $body) {} - /** - * Add an header, appending to already existing headers. - * See http\Message::addHeaders() and http\Message::setHeader(). - * - * @param string $name The header name. - * @param mixed $value The header value. - * @return \http\Message self. - */ - function addHeader(string $name, $value) {} - /** - * Add headers, optionally appending values, if header keys already exist. - * See http\Message::addHeader() and http\Message::setHeaders(). - * - * @param array $headers The HTTP headers to add. - * @param bool $append Whether to append values for existing headers. - * @return \http\Message self. - */ - function addHeaders(array $headers, bool $append = false) {} - /** - * Implements Countable. - * - * @return int the count of messages in the chain above the current message. - */ - function count() {} - /** - * Implements iterator. - * See http\Message::valid() and http\Message::rewind(). - * - * @return \http\Message the current message in the iterated message chain. - */ - function current() {} - /** - * Detach a clone of this message from any message chain. - * - * @throws \http\Exception\InvalidArgumentException - * @return \http\Message clone. - */ - function detach() {} - /** - * Retrieve the message's body. - * See http\Message::setBody(). - * - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Message\Body the message body. - */ - function getBody() {} - /** - * Retrieve a single header, optionally hydrated into a http\Header extending class. - * - * @param string $header The header's name. - * @param string $into_class The name of a class extending http\Header. - * @return mixed|\http\Header mixed the header value if $into_class is NULL. - * or \http\Header descendant. - */ - function getHeader(string $header, string $into_class = NULL) {} - /** - * Retrieve all message headers. - * See http\Message::setHeaders() and http\Message::getHeader(). - * - * @return array the message's headers. - */ - function getHeaders() {} - /** - * Retrieve the HTTP protocol version of the message. - * See http\Message::setHttpVersion(). - * - * @return string the HTTP protocol version, e.g. "1.0"; defaults to "1.1". - */ - function getHttpVersion() {} - /** - * Retrieve the first line of a request or response message. - * See http\Message::setInfo and also: - * - * * http\Message::getType() - * * http\Message::getHttpVersion() - * * http\Message::getResponseCode() - * * http\Message::getResponseStatus() - * * http\Message::getRequestMethod() - * * http\Message::getRequestUrl() - * - * @return string|NULL string the HTTP message information. - * or NULL if the message is neither of type request nor response. - */ - function getInfo() {} - /** - * Retrieve any parent message. - * See http\Message::reverse(). - * - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @return \http\Message the parent message. - */ - function getParentMessage() {} - /** - * Retrieve the request method of the message. - * See http\Message::setRequestMethod() and http\Message::getRequestUrl(). - * - * @return string|false string the request method. - * or false if the message was not of type request. - */ - function getRequestMethod() {} - /** - * Retrieve the request URL of the message. - * See http\Message::setRequestUrl(). - * - * @return string|false string the request URL; usually the path and the querystring. - * or false if the message was not of type request. - */ - function getRequestUrl() {} - /** - * Retrieve the response code of the message. - * See http\Message::setResponseCode() and http\Message::getResponseStatus(). - * - * @return int|false int the response status code. - * or false if the message is not of type response. - */ - function getResponseCode() {} - /** - * Retrieve the response status of the message. - * See http\Message::setResponseStatus() and http\Message::getResponseCode(). - * - * @return string|false string the response status phrase. - * or false if the message is not of type response. - */ - function getResponseStatus() {} - /** - * Retrieve the type of the message. - * See http\Message::setType() and http\Message::getInfo(). - * - * @return int the message type. See http\Message::TYPE_* constants. - */ - function getType() {} - /** - * Check whether this message is a multipart message based on it's content type. - * If the message is a multipart message and a reference $boundary is given, the boundary string of the multipart message will be stored in $boundary. - * - * See http\Message::splitMultipartBody(). - * - * @param string $boundary A reference where the boundary string will be stored. - * @return bool whether this is a message with a multipart "Content-Type". - */ - function isMultipart(string &$boundary = NULL) {} - /** - * Implements Iterator. - * See http\Message::current() and http\Message::rewind(). - * - * @return int a non-sequential integer key. - */ - function key() {} - /** - * Implements Iterator. - * See http\Message::valid() and http\Message::rewind(). - */ - function next() {} - /** - * Prepend message(s) $message to this message, or the top most message of this message chain. - * - * > ***NOTE:*** - * > The message chains must not overlap. - * - * @param \http\Message $message The message (chain) to prepend as parent messages. - * @param bool $top Whether to prepend to the top-most parent message. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Message self. - */ - function prepend(\http\Message $message, bool $top = true) {} - /** - * Reverse the message chain and return the former top-most message. - * - * > ***NOTE:*** - * > Message chains are ordered in reverse-parsed order by default, i.e. the last parsed message is the message you'll receive from any call parsing HTTP messages. - * > - * > This call re-orders the messages of the chain and returns the message that was parsed first with any later parsed messages re-parentized. - * - * @throws \http\Exception\InvalidArgumentException - * @return \http\Message the other end of the message chain. - */ - function reverse() {} - /** - * Implements Iterator. - */ - function rewind() {} - /** - * Implements Serializable. - * - * @return string the serialized HTTP message. - */ - function serialize() {} - /** - * Set the message's body. - * See http\Message::getBody() and http\Message::addBody(). - * - * @param \http\Message\Body $body The new message body. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Message self. - */ - function setBody(\http\Message\Body $body) {} - /** - * Set a single header. - * See http\Message::getHeader() and http\Message::addHeader(). - * - * > ***NOTE:*** - * > Prior to v2.5.6/v3.1.0 headers with the same name were merged into a single - * > header with values concatenated by comma. - * - * @param string $header The header's name. - * @param mixed $value The header's value. Removes the header if NULL. - * @return \http\Message self. - */ - function setHeader(string $header, $value = NULL) {} - /** - * Set the message headers. - * See http\Message::getHeaders() and http\Message::addHeaders(). - * - * > ***NOTE:*** - * > Prior to v2.5.6/v3.1.0 headers with the same name were merged into a single - * > header with values concatenated by comma. - * - * @param array $headers The message's headers. - * @return \http\Message null. - */ - function setHeaders(array $headers = NULL) {} - /** - * Set the HTTP protocol version of the message. - * See http\Message::getHttpVersion(). - * - * @param string $http_version The protocol version, e.g. "1.1", optionally prefixed by "HTTP/". - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadHeaderException - * @return \http\Message self. - */ - function setHttpVersion(string $http_version) {} - /** - * Set the complete message info, i.e. type and response resp. request information, at once. - * See http\Message::getInfo(). - * - * @param string $http_info The message info (first line of an HTTP message). - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadHeaderException - * @return \http\Message self. - */ - function setInfo(string $http_info) {} - /** - * Set the request method of the message. - * See http\Message::getRequestMethod() and http\Message::setRequestUrl(). - * - * @param string $method The request method. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @return \http\Message self. - */ - function setRequestMethod(string $method) {} - /** - * Set the request URL of the message. - * See http\Message::getRequestUrl() and http\Message::setRequestMethod(). - * - * @param string $url The request URL. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @return \http\Message self. - */ - function setRequestUrl(string $url) {} - /** - * Set the response status code. - * See http\Message::getResponseCode() and http\Message::setResponseStatus(). - * - * > ***NOTE:*** - * > This method also resets the response status phrase to the default for that code. - * - * @param int $response_code The response code. - * @param bool $strict Whether to check that the response code is between 100 and 599 inclusive. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @return \http\Message self. - */ - function setResponseCode(int $response_code, bool $strict = true) {} - /** - * Set the response status phrase. - * See http\Message::getResponseStatus() and http\Message::setResponseCode(). - * - * @param string $response_status The status phrase. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @return \http\Message self. - */ - function setResponseStatus(string $response_status) {} - /** - * Set the message type and reset the message info. - * See http\Message::getType() and http\Message::setInfo(). - * - * @param int $type The desired message type. See the http\Message::TYPE_* constants. - * @return \http\Message self. - */ - function setType(int $type) {} - /** - * Splits the body of a multipart message. - * See http\Message::isMultipart() and http\Message\Body::addPart(). - * - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @throws \http\Exception\BadMessageException - * @return \http\Message a message chain of all messages of the multipart body. - */ - function splitMultipartBody() {} - /** - * Stream the message through a callback. - * - * @param callable $callback The callback of the form function(http\Message $from, string $data). - * @return \http\Message self. - */ - function toCallback(callable $callback) {} - /** - * Stream the message into stream $stream, starting from $offset, streaming $maxlen at most. - * - * @param resource $stream The resource to write to. - * @return \http\Message self. - */ - function toStream($stream) {} - /** - * Retrieve the message serialized to a string. - * - * @param bool $include_parent Whether to include all parent messages. - * @return string the HTTP message chain serialized to a string. - */ - function toString(bool $include_parent = false) {} - /** - * Implements Serializable. - * - * @param string $data The serialized message. - */ - function unserialize($data) {} - /** - * Implements Iterator. - * See http\Message::current() and http\Message::rewind(). - * - * @return bool whether http\Message::current() would not return NULL. - */ - function valid() {} +class Message implements \Countable, \Serializable, \Iterator +{ + /** + * No specific type of message. + */ + public const TYPE_NONE = 0; + + /** + * A request message. + */ + public const TYPE_REQUEST = 1; + + /** + * A response message. + */ + public const TYPE_RESPONSE = 2; + + /** + * The message type. See http\Message::TYPE_* constants. + * + * @var int + */ + protected $type = \http\Message::TYPE_NONE; + + /** + * The message's body. + * + * @var \http\Message\Body + */ + protected $body = null; + + /** + * The request method if the message is of type request. + * + * @var string + */ + protected $requestMethod = ""; + + /** + * The request url if the message is of type request. + * + * @var string + */ + protected $requestUrl = ""; + + /** + * The response status phrase if the message is of type response. + * + * @var string + */ + protected $responseStatus = ""; + + /** + * The response code if the message is of type response. + * + * @var int + */ + protected $responseCode = 0; + + /** + * A custom HTTP protocol version. + * + * @var string + */ + protected $httpVersion = null; + + /** + * Any message headers. + * + * @var array + */ + protected $headers = null; + + /** + * Any parent message. + * + * @var \http\Message + */ + protected $parentMessage; + + /** + * Create a new HTTP message. + * + * @param mixed $message Either a resource or a string, representing the HTTP message. + * @param bool $greedy Whether to read from a $message resource until EOF. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMessageException + */ + public function __construct($message = null, bool $greedy = true) {} + + /** + * Retrieve the message serialized to a string. + * Alias of http\Message::toString(). + * + * @return string the single serialized HTTP message. + */ + public function __toString() {} + + /** + * Append the data of $body to the message's body. + * See http\Message::setBody() and http\Message\Body::append(). + * + * @param \http\Message\Body $body The message body to add. + * @return \http\Message self. + */ + public function addBody(http\Message\Body $body) {} + + /** + * Add an header, appending to already existing headers. + * See http\Message::addHeaders() and http\Message::setHeader(). + * + * @param string $name The header name. + * @param mixed $value The header value. + * @return \http\Message self. + */ + public function addHeader(string $name, $value) {} + + /** + * Add headers, optionally appending values, if header keys already exist. + * See http\Message::addHeader() and http\Message::setHeaders(). + * + * @param array $headers The HTTP headers to add. + * @param bool $append Whether to append values for existing headers. + * @return \http\Message self. + */ + public function addHeaders(array $headers, bool $append = false) {} + + /** + * Implements Countable. + * + * @return int the count of messages in the chain above the current message. + */ + public function count() {} + + /** + * Implements iterator. + * See http\Message::valid() and http\Message::rewind(). + * + * @return \http\Message the current message in the iterated message chain. + */ + public function current() {} + + /** + * Detach a clone of this message from any message chain. + * + * @throws \http\Exception\InvalidArgumentException + * @return \http\Message clone. + */ + public function detach() {} + + /** + * Retrieve the message's body. + * See http\Message::setBody(). + * + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Message\Body the message body. + */ + public function getBody() {} + + /** + * Retrieve a single header, optionally hydrated into a http\Header extending class. + * + * @param string $header The header's name. + * @param string $into_class The name of a class extending http\Header. + * @return mixed|\http\Header mixed the header value if $into_class is NULL. + * or \http\Header descendant. + */ + public function getHeader(string $header, string $into_class = null) {} + + /** + * Retrieve all message headers. + * See http\Message::setHeaders() and http\Message::getHeader(). + * + * @return array the message's headers. + */ + public function getHeaders() {} + + /** + * Retrieve the HTTP protocol version of the message. + * See http\Message::setHttpVersion(). + * + * @return string the HTTP protocol version, e.g. "1.0"; defaults to "1.1". + */ + public function getHttpVersion() {} + + /** + * Retrieve the first line of a request or response message. + * See http\Message::setInfo and also: + * + * * http\Message::getType() + * * http\Message::getHttpVersion() + * * http\Message::getResponseCode() + * * http\Message::getResponseStatus() + * * http\Message::getRequestMethod() + * * http\Message::getRequestUrl() + * + * @return string|null string the HTTP message information. + * or NULL if the message is neither of type request nor response. + */ + public function getInfo() {} + + /** + * Retrieve any parent message. + * See http\Message::reverse(). + * + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @return \http\Message the parent message. + */ + public function getParentMessage() {} + + /** + * Retrieve the request method of the message. + * See http\Message::setRequestMethod() and http\Message::getRequestUrl(). + * + * @return string|false string the request method. + * or false if the message was not of type request. + */ + public function getRequestMethod() {} + + /** + * Retrieve the request URL of the message. + * See http\Message::setRequestUrl(). + * + * @return string|false string the request URL; usually the path and the querystring. + * or false if the message was not of type request. + */ + public function getRequestUrl() {} + + /** + * Retrieve the response code of the message. + * See http\Message::setResponseCode() and http\Message::getResponseStatus(). + * + * @return int|false int the response status code. + * or false if the message is not of type response. + */ + public function getResponseCode() {} + + /** + * Retrieve the response status of the message. + * See http\Message::setResponseStatus() and http\Message::getResponseCode(). + * + * @return string|false string the response status phrase. + * or false if the message is not of type response. + */ + public function getResponseStatus() {} + + /** + * Retrieve the type of the message. + * See http\Message::setType() and http\Message::getInfo(). + * + * @return int the message type. See http\Message::TYPE_* constants. + */ + public function getType() {} + + /** + * Check whether this message is a multipart message based on it's content type. + * If the message is a multipart message and a reference $boundary is given, the boundary string of the multipart message will be stored in $boundary. + * + * See http\Message::splitMultipartBody(). + * + * @param string &$boundary A reference where the boundary string will be stored. + * @return bool whether this is a message with a multipart "Content-Type". + */ + public function isMultipart(string &$boundary = null) {} + + /** + * Implements Iterator. + * See http\Message::current() and http\Message::rewind(). + * + * @return int a non-sequential integer key. + */ + public function key() {} + + /** + * Implements Iterator. + * See http\Message::valid() and http\Message::rewind(). + */ + public function next() {} + + /** + * Prepend message(s) $message to this message, or the top most message of this message chain. + * + * ***NOTE:*** + * The message chains must not overlap. + * + * @param \http\Message $message The message (chain) to prepend as parent messages. + * @param bool $top Whether to prepend to the top-most parent message. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Message self. + */ + public function prepend(http\Message $message, bool $top = true) {} + + /** + * Reverse the message chain and return the former top-most message. + * + * ***NOTE:*** + * Message chains are ordered in reverse-parsed order by default, i.e. the last parsed message is the message you'll receive from any call parsing HTTP messages. + * + * This call re-orders the messages of the chain and returns the message that was parsed first with any later parsed messages re-parentized. + * + * @throws \http\Exception\InvalidArgumentException + * @return \http\Message the other end of the message chain. + */ + public function reverse() {} + + /** + * Implements Iterator. + */ + public function rewind() {} + + /** + * Implements Serializable. + * + * @return string the serialized HTTP message. + */ + public function serialize() {} + + /** + * Set the message's body. + * See http\Message::getBody() and http\Message::addBody(). + * + * @param \http\Message\Body $body The new message body. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Message self. + */ + public function setBody(http\Message\Body $body) {} + + /** + * Set a single header. + * See http\Message::getHeader() and http\Message::addHeader(). + * + * ***NOTE:*** + * Prior to v2.5.6/v3.1.0 headers with the same name were merged into a single + * header with values concatenated by comma. + * + * @param string $header The header's name. + * @param mixed $value The header's value. Removes the header if NULL. + * @return \http\Message self. + */ + public function setHeader(string $header, $value = null) {} + + /** + * Set the message headers. + * See http\Message::getHeaders() and http\Message::addHeaders(). + * + * ***NOTE:*** + * Prior to v2.5.6/v3.1.0 headers with the same name were merged into a single + * header with values concatenated by comma. + * + * @param array $headers The message's headers. + * @return \http\Message null. + */ + public function setHeaders(array $headers = null) {} + + /** + * Set the HTTP protocol version of the message. + * See http\Message::getHttpVersion(). + * + * @param string $http_version The protocol version, e.g. "1.1", optionally prefixed by "HTTP/". + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadHeaderException + * @return \http\Message self. + */ + public function setHttpVersion(string $http_version) {} + + /** + * Set the complete message info, i.e. type and response resp. request information, at once. + * See http\Message::getInfo(). + * + * @param string $http_info The message info (first line of an HTTP message). + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadHeaderException + * @return \http\Message self. + */ + public function setInfo(string $http_info) {} + + /** + * Set the request method of the message. + * See http\Message::getRequestMethod() and http\Message::setRequestUrl(). + * + * @param string $method The request method. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @return \http\Message self. + */ + public function setRequestMethod(string $method) {} + + /** + * Set the request URL of the message. + * See http\Message::getRequestUrl() and http\Message::setRequestMethod(). + * + * @param string $url The request URL. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @return \http\Message self. + */ + public function setRequestUrl(string $url) {} + + /** + * Set the response status code. + * See http\Message::getResponseCode() and http\Message::setResponseStatus(). + * + * ***NOTE:*** + * This method also resets the response status phrase to the default for that code. + * + * @param int $response_code The response code. + * @param bool $strict Whether to check that the response code is between 100 and 599 inclusive. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @return \http\Message self. + */ + public function setResponseCode(int $response_code, bool $strict = true) {} + + /** + * Set the response status phrase. + * See http\Message::getResponseStatus() and http\Message::setResponseCode(). + * + * @param string $response_status The status phrase. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @return \http\Message self. + */ + public function setResponseStatus(string $response_status) {} + + /** + * Set the message type and reset the message info. + * See http\Message::getType() and http\Message::setInfo(). + * + * @param int $type The desired message type. See the http\Message::TYPE_* constants. + * @return \http\Message self. + */ + public function setType(int $type) {} + + /** + * Splits the body of a multipart message. + * See http\Message::isMultipart() and http\Message\Body::addPart(). + * + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @throws \http\Exception\BadMessageException + * @return \http\Message a message chain of all messages of the multipart body. + */ + public function splitMultipartBody() {} + + /** + * Stream the message through a callback. + * + * @param callable $callback The callback of the form function(http\Message $from, string $data). + * @return \http\Message self. + */ + public function toCallback(callable $callback) {} + + /** + * Stream the message into stream $stream, starting from $offset, streaming $maxlen at most. + * + * @param resource $stream The resource to write to. + * @return \http\Message self. + */ + public function toStream($stream) {} + + /** + * Retrieve the message serialized to a string. + * + * @param bool $include_parent Whether to include all parent messages. + * @return string the HTTP message chain serialized to a string. + */ + public function toString(bool $include_parent = false) {} + + /** + * Implements Serializable. + * + * @param string $data The serialized message. + */ + public function unserialize($data) {} + + /** + * Implements Iterator. + * See http\Message::current() and http\Message::rewind(). + * + * @return bool whether http\Message::current() would not return NULL. + */ + public function valid() {} } /** * Parse, interpret and compose HTTP (header) parameters. */ -class Params implements \ArrayAccess { - /** - * The default parameter separator (","). - */ - const DEF_PARAM_SEP = ','; - /** - * The default argument separator (";"). - */ - const DEF_ARG_SEP = ';'; - /** - * The default value separator ("="). - */ - const DEF_VAL_SEP = '='; - /** - * Empty param separator to parse cookies. - */ - const COOKIE_PARAM_SEP = ''; - /** - * Do not interpret the parsed parameters. - */ - const PARSE_RAW = 0; - /** - * Interpret input as default formatted parameters. - */ - const PARSE_DEFAULT = 17; - /** - * Parse backslash escaped (quoted) strings. - */ - const PARSE_ESCAPED = 1; - /** - * Urldecode single units of parameters, arguments and values. - */ - const PARSE_URLENCODED = 4; - /** - * Parse sub dimensions indicated by square brackets. - */ - const PARSE_DIMENSION = 8; - /** - * Parse URL querystring (same as http\Params::PARSE_URLENCODED|http\Params::PARSE_DIMENSION). - */ - const PARSE_QUERY = 12; - /** - * Parse [RFC5987](http://tools.ietf.org/html/rfc5987) style encoded character set and language information embedded in HTTP header params. - */ - const PARSE_RFC5987 = 16; - /** - * Parse [RFC5988](http://tools.ietf.org/html/rfc5988) (Web Linking) tags of Link headers. - */ - const PARSE_RFC5988 = 32; - /** - * The (parsed) parameters. - * - * @public - * @var array - */ - public $params = NULL; - /** - * The parameter separator(s). - * - * @public - * @var array - */ - public $param_sep = \http\Params::DEF_PARAM_SEP; - /** - * The argument separator(s). - * - * @public - * @var array - */ - public $arg_sep = \http\Params::DEF_ARG_SEP; - /** - * The value separator(s). - * - * @public - * @var array - */ - public $val_sep = \http\Params::DEF_VAL_SEP; - /** - * The modus operandi of the parser. See http\Params::PARSE_* constants. - * - * @public - * @var int - */ - public $flags = \http\Params::PARSE_DEFAULT; - /** - * Instantiate a new HTTP (header) parameter set. - * - * @param mixed $params Pre-parsed parameters or a string to be parsed. - * @param mixed $ps The parameter separator(s). - * @param mixed $as The argument separator(s). - * @param mixed $vs The value separator(s). - * @param int $flags The modus operandi. See http\Params::PARSE_* constants. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - */ - function __construct($params = NULL, $ps = NULL, $as = NULL, $vs = NULL, int $flags = NULL) {} - /** - * String cast handler. Alias of http\Params::toString(). - * Returns a stringified version of the parameters. - * - * @return string version of the parameters. - */ - function __toString() {} - /** - * Implements ArrayAccess. - * - * @param string $name The offset to look after. - * @return bool Existence. - */ - function offsetExists($name) {} - /** - * Implements ArrayAccess. - * - * @param string $name The offset to retrieve. - * @return mixed contents at offset. - */ - function offsetGet($name) {} - /** - * Implements ArrayAccess. - * - * @param string $name The offset to modify. - * @param mixed $value The value to set. - */ - function offsetSet($name, $value) {} - /** - * Implements ArrayAccess. - * - * @param string $name The offset to delete. - */ - function offsetUnset($name) {} - /** - * Convenience method that simply returns http\Params::$params. - * - * @return array of parameters. - */ - function toArray() {} - /** - * Returns a stringified version of the parameters. - * - * @return string version of the parameters. - */ - function toString() {} +class Params implements \ArrayAccess +{ + /** + * The default parameter separator (","). + */ + public const DEF_PARAM_SEP = ','; + + /** + * The default argument separator (";"). + */ + public const DEF_ARG_SEP = ';'; + + /** + * The default value separator ("="). + */ + public const DEF_VAL_SEP = '='; + + /** + * Empty param separator to parse cookies. + */ + public const COOKIE_PARAM_SEP = ''; + + /** + * Do not interpret the parsed parameters. + */ + public const PARSE_RAW = 0; + + /** + * Interpret input as default formatted parameters. + */ + public const PARSE_DEFAULT = 17; + + /** + * Parse backslash escaped (quoted) strings. + */ + public const PARSE_ESCAPED = 1; + + /** + * Urldecode single units of parameters, arguments and values. + */ + public const PARSE_URLENCODED = 4; + + /** + * Parse sub dimensions indicated by square brackets. + */ + public const PARSE_DIMENSION = 8; + + /** + * Parse URL querystring (same as http\Params::PARSE_URLENCODED|http\Params::PARSE_DIMENSION). + */ + public const PARSE_QUERY = 12; + + /** + * Parse [RFC5987](http://tools.ietf.org/html/rfc5987) style encoded character set and language information embedded in HTTP header params. + */ + public const PARSE_RFC5987 = 16; + + /** + * Parse [RFC5988](http://tools.ietf.org/html/rfc5988) (Web Linking) tags of Link headers. + */ + public const PARSE_RFC5988 = 32; + + /** + * The (parsed) parameters. + * + * @var array + */ + public $params = null; + + /** + * The parameter separator(s). + * + * @var array + */ + public $param_sep = \http\Params::DEF_PARAM_SEP; + + /** + * The argument separator(s). + * + * @var array + */ + public $arg_sep = \http\Params::DEF_ARG_SEP; + + /** + * The value separator(s). + * + * @var array + */ + public $val_sep = \http\Params::DEF_VAL_SEP; + + /** + * The modus operandi of the parser. See http\Params::PARSE_* constants. + * + * @var int + */ + public $flags = \http\Params::PARSE_DEFAULT; + + /** + * Instantiate a new HTTP (header) parameter set. + * + * @param mixed $params Pre-parsed parameters or a string to be parsed. + * @param mixed $ps The parameter separator(s). + * @param mixed $as The argument separator(s). + * @param mixed $vs The value separator(s). + * @param int $flags The modus operandi. See http\Params::PARSE_* constants. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + */ + public function __construct($params = null, $ps = null, $as = null, $vs = null, int $flags = null) {} + + /** + * String cast handler. Alias of http\Params::toString(). + * Returns a stringified version of the parameters. + * + * @return string version of the parameters. + */ + public function __toString() {} + + /** + * Implements ArrayAccess. + * + * @param string $name The offset to look after. + * @return bool Existence. + */ + public function offsetExists($name) {} + + /** + * Implements ArrayAccess. + * + * @param string $name The offset to retrieve. + * @return mixed contents at offset. + */ + public function offsetGet($name) {} + + /** + * Implements ArrayAccess. + * + * @param string $name The offset to modify. + * @param mixed $value The value to set. + */ + public function offsetSet($name, $value) {} + + /** + * Implements ArrayAccess. + * + * @param string $name The offset to delete. + */ + public function offsetUnset($name) {} + + /** + * Convenience method that simply returns http\Params::$params. + * + * @return array of parameters. + */ + public function toArray() {} + + /** + * Returns a stringified version of the parameters. + * + * @return string version of the parameters. + */ + public function toString() {} } /** * The http\QueryString class provides versatile facilities to retrieve, use and manipulate query strings and form data. */ -class QueryString implements \Serializable, \ArrayAccess, \IteratorAggregate { - /** - * Cast requested value to bool. - */ - const TYPE_BOOL = 16; - /** - * Cast requested value to int. - */ - const TYPE_INT = 4; - /** - * Cast requested value to float. - */ - const TYPE_FLOAT = 5; - /** - * Cast requested value to string. - */ - const TYPE_STRING = 6; - /** - * Cast requested value to an array. - */ - const TYPE_ARRAY = 7; - /** - * Cast requested value to an object. - */ - const TYPE_OBJECT = 8; - /** - * The global instance. See http\QueryString::getGlobalInstance(). - * - * @private - * @var \http\QueryString - */ - private $instance = NULL; - /** - * The data. - * - * @private - * @var array - */ - private $queryArray = NULL; - /** - * Create an independent querystring instance. - * - * @param mixed $params The query parameters to use or parse. - * @throws \http\Exception\BadQueryStringException - */ - function __construct($params = NULL) {} - /** - * Get the string representation of the querystring (x-www-form-urlencoded). - * - * @return string the x-www-form-urlencoded querystring. - */ - function __toString() {} - /** - * Retrieve an querystring value. - * - * See http\QueryString::TYPE_* constants. - * - * @param string $name The key to retrieve the value for. - * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. - * @param mixed $defval The default value to return if the key $name does not exist. - * @param bool $delete Whether to delete the entry from the querystring after retrieval. - * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. - * or string the whole querystring if $name is of zero length. - * or mixed $defval if the key $name does not exist. - * or mixed the querystring value cast to $type if $type was specified and the key $name exists. - * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. - */ - function get(string $name = NULL, $type = NULL, $defval = NULL, bool $delete = false) {} - /** - * Retrieve an array value with at offset $name. - * - * @param string $name The key to look up. - * @param mixed $defval The default value to return if the offset $name does not exist. - * @param bool $delete Whether to remove the key and value from the querystring after retrieval. - * @return array|mixed array the (casted) value. - * or mixed $defval if offset $name does not exist. - */ - function getArray(string $name, $defval = NULL, bool $delete = false) {} - /** - * Retrieve a boolean value at offset $name. - * - * @param string $name The key to look up. - * @param mixed $defval The default value to return if the offset $name does not exist. - * @param bool $delete Whether to remove the key and value from the querystring after retrieval. - * @return bool|mixed bool the (casted) value. - * or mixed $defval if offset $name does not exist. - */ - function getBool(string $name, $defval = NULL, bool $delete = false) {} - /** - * Retrieve a float value at offset $name. - * - * @param string $name The key to look up. - * @param mixed $defval The default value to return if the offset $name does not exist. - * @param bool $delete Whether to remove the key and value from the querystring after retrieval. - * @return float|mixed float the (casted) value. - * or mixed $defval if offset $name does not exist. - */ - function getFloat(string $name, $defval = NULL, bool $delete = false) {} - /** - * Retrieve the global querystring instance referencing $_GET. - * - * @throws \http\Exception\UnexpectedValueException - * @return \http\QueryString the http\QueryString::$instance - */ - function getGlobalInstance() {} - /** - * Retrieve a int value at offset $name. - * - * @param string $name The key to look up. - * @param mixed $defval The default value to return if the offset $name does not exist. - * @param bool $delete Whether to remove the key and value from the querystring after retrieval. - * @return int|mixed int the (casted) value. - * or mixed $defval if offset $name does not exist. - */ - function getInt(string $name, $defval = NULL, bool $delete = false) {} - /** - * Implements IteratorAggregate. - * - * @throws \http\Exception\InvalidArgumentException - * @throws \InvalidArgumentException - */ - function getIterator() {} - /** - * Retrieve a object value with at offset $name. - * - * @param string $name The key to look up. - * @param mixed $defval The default value to return if the offset $name does not exist. - * @param bool $delete Whether to remove the key and value from the querystring after retrieval. - * @return object|mixed object the (casted) value. - * or mixed $defval if offset $name does not exist. - */ - function getObject(string $name, $defval = NULL, bool $delete = false) {} - /** - * Retrieve a string value with at offset $name. - * - * @param string $name The key to look up. - * @param mixed $defval The default value to return if the offset $name does not exist. - * @param bool $delete Whether to remove the key and value from the querystring after retrieval. - * @return string|mixed string the (casted) value. - * or mixed $defval if offset $name does not exist. - */ - function getString(string $name, $defval = NULL, bool $delete = false) {} - /** - * Set additional $params to a clone of this instance. - * See http\QueryString::set(). - * - * > ***NOTE:*** - * > This method returns a clone (copy) of this instance. - * - * @param mixed $params Additional params as object, array or string to parse. - * @throws \http\Exception\BadQueryStringException - * @return \http\QueryString clone. - */ - function mod($params = NULL) {} - /** - * Implements ArrayAccess. - * - * @param string $name The offset to look up. - * @return bool whether the key $name isset. - */ - function offsetExists($name) {} - /** - * Implements ArrayAccess. - * - * @param mixed $offset The offset to look up. - * @return mixed|NULL mixed the value locate at offset $name. - * or NULL if key $name could not be found. - */ - function offsetGet($offset) {} - /** - * Implements ArrayAccess. - * - * @param string $name The key to set the value for. - * @param mixed $data The data to place at offset $name. - */ - function offsetSet($name, $data) {} - /** - * Implements ArrayAccess. - * - * @param string $name The offset to look up. - */ - function offsetUnset($name) {} - /** - * Implements Serializable. - * See http\QueryString::toString(). - * - * @return string the x-www-form-urlencoded querystring. - */ - function serialize() {} - /** - * Set additional querystring entries. - * - * @param mixed $params Additional params as object, array or string to parse. - * @return \http\QueryString self. - */ - function set($params) {} - /** - * Simply returns http\QueryString::$queryArray. - * - * @return array the $queryArray property. - */ - function toArray() {} - /** - * Get the string representation of the querystring (x-www-form-urlencoded). - * - * @return string the x-www-form-urlencoded querystring. - */ - function toString() {} - /** - * Implements Serializable. - * - * @param string $serialized The x-www-form-urlencoded querystring. - * @throws \http\Exception - */ - function unserialize($serialized) {} - /** - * Translate character encodings of the querystring with ext/iconv. - * - * > ***NOTE:*** - * > This method is only available when ext/iconv support was enabled at build time. - * - * @param string $from_enc The encoding to convert from. - * @param string $to_enc The encoding to convert to. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadConversionException - * @return \http\QueryString self. - */ - function xlate(string $from_enc, string $to_enc) {} +class QueryString implements \Serializable, \ArrayAccess, \IteratorAggregate +{ + /** + * Cast requested value to bool. + */ + public const TYPE_BOOL = 16; + + /** + * Cast requested value to int. + */ + public const TYPE_INT = 4; + + /** + * Cast requested value to float. + */ + public const TYPE_FLOAT = 5; + + /** + * Cast requested value to string. + */ + public const TYPE_STRING = 6; + + /** + * Cast requested value to an array. + */ + public const TYPE_ARRAY = 7; + + /** + * Cast requested value to an object. + */ + public const TYPE_OBJECT = 8; + + /** + * The global instance. See http\QueryString::getGlobalInstance(). + * + * @var \http\QueryString + */ + private $instance = null; + + /** + * The data. + * + * @var array + */ + private $queryArray = null; + + /** + * Create an independent querystring instance. + * + * @param mixed $params The query parameters to use or parse. + * @throws \http\Exception\BadQueryStringException + */ + public function __construct($params = null) {} + + /** + * Get the string representation of the querystring (x-www-form-urlencoded). + * + * @return string the x-www-form-urlencoded querystring. + */ + public function __toString() {} + + /** + * Retrieve an querystring value. + * + * See http\QueryString::TYPE_* constants. + * + * @param string $name The key to retrieve the value for. + * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. + * @param mixed $defval The default value to return if the key $name does not exist. + * @param bool $delete Whether to delete the entry from the querystring after retrieval. + * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. + * or string the whole querystring if $name is of zero length. + * or mixed $defval if the key $name does not exist. + * or mixed the querystring value cast to $type if $type was specified and the key $name exists. + * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. + */ + public function get(string $name = null, $type = null, $defval = null, bool $delete = false) {} + + /** + * Retrieve an array value with at offset $name. + * + * @param string $name The key to look up. + * @param mixed $defval The default value to return if the offset $name does not exist. + * @param bool $delete Whether to remove the key and value from the querystring after retrieval. + * @return array|mixed array the (casted) value. + * or mixed $defval if offset $name does not exist. + */ + public function getArray(string $name, $defval = null, bool $delete = false) {} + + /** + * Retrieve a boolean value at offset $name. + * + * @param string $name The key to look up. + * @param mixed $defval The default value to return if the offset $name does not exist. + * @param bool $delete Whether to remove the key and value from the querystring after retrieval. + * @return bool|mixed bool the (casted) value. + * or mixed $defval if offset $name does not exist. + */ + public function getBool(string $name, $defval = null, bool $delete = false) {} + + /** + * Retrieve a float value at offset $name. + * + * @param string $name The key to look up. + * @param mixed $defval The default value to return if the offset $name does not exist. + * @param bool $delete Whether to remove the key and value from the querystring after retrieval. + * @return float|mixed float the (casted) value. + * or mixed $defval if offset $name does not exist. + */ + public function getFloat(string $name, $defval = null, bool $delete = false) {} + + /** + * Retrieve the global querystring instance referencing $_GET. + * + * @throws \http\Exception\UnexpectedValueException + * @return \http\QueryString the http\QueryString::$instance + */ + public function getGlobalInstance() {} + + /** + * Retrieve a int value at offset $name. + * + * @param string $name The key to look up. + * @param mixed $defval The default value to return if the offset $name does not exist. + * @param bool $delete Whether to remove the key and value from the querystring after retrieval. + * @return int|mixed int the (casted) value. + * or mixed $defval if offset $name does not exist. + */ + public function getInt(string $name, $defval = null, bool $delete = false) {} + + /** + * Implements IteratorAggregate. + * + * @throws \http\Exception\InvalidArgumentException + * @throws \InvalidArgumentException + */ + public function getIterator() {} + + /** + * Retrieve a object value with at offset $name. + * + * @param string $name The key to look up. + * @param mixed $defval The default value to return if the offset $name does not exist. + * @param bool $delete Whether to remove the key and value from the querystring after retrieval. + * @return object|mixed object the (casted) value. + * or mixed $defval if offset $name does not exist. + */ + public function getObject(string $name, $defval = null, bool $delete = false) {} + + /** + * Retrieve a string value with at offset $name. + * + * @param string $name The key to look up. + * @param mixed $defval The default value to return if the offset $name does not exist. + * @param bool $delete Whether to remove the key and value from the querystring after retrieval. + * @return string|mixed string the (casted) value. + * or mixed $defval if offset $name does not exist. + */ + public function getString(string $name, $defval = null, bool $delete = false) {} + + /** + * Set additional $params to a clone of this instance. + * See http\QueryString::set(). + * + * ***NOTE:*** + * This method returns a clone (copy) of this instance. + * + * @param mixed $params Additional params as object, array or string to parse. + * @throws \http\Exception\BadQueryStringException + * @return \http\QueryString clone. + */ + public function mod($params = null) {} + + /** + * Implements ArrayAccess. + * + * @param string $name The offset to look up. + * @return bool whether the key $name isset. + */ + public function offsetExists($name) {} + + /** + * Implements ArrayAccess. + * + * @param mixed $offset The offset to look up. + * @return mixed|null mixed the value locate at offset $name. + * or NULL if key $name could not be found. + */ + public function offsetGet($offset) {} + + /** + * Implements ArrayAccess. + * + * @param string $name The key to set the value for. + * @param mixed $data The data to place at offset $name. + */ + public function offsetSet($name, $data) {} + + /** + * Implements ArrayAccess. + * + * @param string $name The offset to look up. + */ + public function offsetUnset($name) {} + + /** + * Implements Serializable. + * See http\QueryString::toString(). + * + * @return string the x-www-form-urlencoded querystring. + */ + public function serialize() {} + + /** + * Set additional querystring entries. + * + * @param mixed $params Additional params as object, array or string to parse. + * @return \http\QueryString self. + */ + public function set($params) {} + + /** + * Simply returns http\QueryString::$queryArray. + * + * @return array the $queryArray property. + */ + public function toArray() {} + + /** + * Get the string representation of the querystring (x-www-form-urlencoded). + * + * @return string the x-www-form-urlencoded querystring. + */ + public function toString() {} + + /** + * Implements Serializable. + * + * @param string $serialized The x-www-form-urlencoded querystring. + * @throws \http\Exception + */ + public function unserialize($serialized) {} + + /** + * Translate character encodings of the querystring with ext/iconv. + * + * ***NOTE:*** + * This method is only available when ext/iconv support was enabled at build time. + * + * @param string $from_enc The encoding to convert from. + * @param string $to_enc The encoding to convert to. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadConversionException + * @return \http\QueryString self. + */ + public function xlate(string $from_enc, string $to_enc) {} } /** * The http\Url class provides versatile means to parse, construct and manipulate URLs. */ -class Url { - /** - * Replace parts of the old URL with parts of the new. - */ - const REPLACE = 0; - /** - * Whether a relative path should be joined into the old path. - */ - const JOIN_PATH = 1; - /** - * Whether the querystrings should be joined. - */ - const JOIN_QUERY = 2; - /** - * Strip the user information from the URL. - */ - const STRIP_USER = 4; - /** - * Strip the password from the URL. - */ - const STRIP_PASS = 8; - /** - * Strip user and password information from URL (same as STRIP_USER|STRIP_PASS). - */ - const STRIP_AUTH = 12; - /** - * Do not include the port. - */ - const STRIP_PORT = 32; - /** - * Do not include the URL path. - */ - const STRIP_PATH = 64; - /** - * Do not include the URL querystring. - */ - const STRIP_QUERY = 128; - /** - * Strip the fragment (hash) from the URL. - */ - const STRIP_FRAGMENT = 256; - /** - * Strip everything except scheme and host information. - */ - const STRIP_ALL = 492; - /** - * Import initial URL parts from the SAPI environment. - */ - const FROM_ENV = 4096; - /** - * Whether to sanitize the URL path (consolidate double slashes, directory jumps etc.) - */ - const SANITIZE_PATH = 8192; - /** - * Parse UTF-8 encoded multibyte sequences. - */ - const PARSE_MBUTF8 = 131072; - /** - * Parse locale encoded multibyte sequences (on systems with wide character support). - */ - const PARSE_MBLOC = 65536; - /** - * Parse and convert multibyte hostnames according to IDNA (with IDNA support). - */ - const PARSE_TOIDN = 1048576; - /** - * Explicitly request IDNA2003 implementation if available (libidn, idnkit or ICU). - */ - const PARSE_TOIDN_2003 = 9437184; - /** - * Explicitly request IDNA2008 implementation if available (libidn2, idnkit2 or ICU). - */ - const PARSE_TOIDN_2008 = 5242880; - /** - * Percent encode multibyte sequences in the userinfo, path, query and fragment parts of the URL. - */ - const PARSE_TOPCT = 2097152; - /** - * Continue parsing when encountering errors. - */ - const IGNORE_ERRORS = 268435456; - /** - * Suppress errors/exceptions. - */ - const SILENT_ERRORS = 536870912; - /** - * Standard flags used by default internally for e.g. http\Message::setRequestUrl(). - * Enables joining path and query, sanitizing path, multibyte/unicode, international domain names and transient percent encoding. - */ - const STDFLAGS = 3350531; - /** - * The URL's scheme. - * - * @public - * @var string - */ - public $scheme = NULL; - /** - * Authenticating user. - * - * @public - * @var string - */ - public $user = NULL; - /** - * Authentication password. - * - * @public - * @var string - */ - public $pass = NULL; - /** - * Hostname/domain. - * - * @public - * @var string - */ - public $host = NULL; - /** - * Port. - * - * @public - * @var string - */ - public $port = NULL; - /** - * URL path. - * - * @public - * @var string - */ - public $path = NULL; - /** - * URL querystring. - * - * @public - * @var string - */ - public $query = NULL; - /** - * URL fragment (hash). - * - * @public - * @var string - */ - public $fragment = NULL; - /** - * Create an instance of an http\Url. - * - * > ***NOTE:*** - * > Prior to v3.0.0, the default for the $flags parameter was http\Url::FROM_ENV. - * - * See also http\Env\Url. - * - * @param mixed $old_url Initial URL parts. Either an array, object, http\Url instance or string to parse. - * @param mixed $new_url Overriding URL parts. Either an array, object, http\Url instance or string to parse. - * @param int $flags The modus operandi of constructing the url. See http\Url constants. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadUrlException - */ - function __construct($old_url = NULL, $new_url = NULL, int $flags = 0) {} - /** - * String cast handler. Alias of http\Url::toString(). - * - * @return string the URL as string. - */ - function __toString() {} - /** - * Clone this URL and apply $parts to the cloned URL. - * - * > ***NOTE:*** - * > This method returns a clone (copy) of this instance. - * - * @param mixed $parts New URL parts. - * @param int $flags Modus operandi of URL construction. See http\Url constants. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadUrlException - * @return \http\Url clone. - */ - function mod($parts, int $flags = \http\Url::JOIN_PATH|http\Url::JOIN_QUERY|http\Url::SANITIZE_PATH) {} - /** - * Retrieve the URL parts as array. - * - * @return array the URL parts. - */ - function toArray() {} - /** - * Get the string prepresentation of the URL. - * - * @return string the URL as string. - */ - function toString() {} +class Url +{ + /** + * Replace parts of the old URL with parts of the new. + */ + public const REPLACE = 0; + + /** + * Whether a relative path should be joined into the old path. + */ + public const JOIN_PATH = 1; + + /** + * Whether the querystrings should be joined. + */ + public const JOIN_QUERY = 2; + + /** + * Strip the user information from the URL. + */ + public const STRIP_USER = 4; + + /** + * Strip the password from the URL. + */ + public const STRIP_PASS = 8; + + /** + * Strip user and password information from URL (same as STRIP_USER|STRIP_PASS). + */ + public const STRIP_AUTH = 12; + + /** + * Do not include the port. + */ + public const STRIP_PORT = 32; + + /** + * Do not include the URL path. + */ + public const STRIP_PATH = 64; + + /** + * Do not include the URL querystring. + */ + public const STRIP_QUERY = 128; + + /** + * Strip the fragment (hash) from the URL. + */ + public const STRIP_FRAGMENT = 256; + + /** + * Strip everything except scheme and host information. + */ + public const STRIP_ALL = 492; + + /** + * Import initial URL parts from the SAPI environment. + */ + public const FROM_ENV = 4096; + + /** + * Whether to sanitize the URL path (consolidate double slashes, directory jumps etc.) + */ + public const SANITIZE_PATH = 8192; + + /** + * Parse UTF-8 encoded multibyte sequences. + */ + public const PARSE_MBUTF8 = 131072; + + /** + * Parse locale encoded multibyte sequences (on systems with wide character support). + */ + public const PARSE_MBLOC = 65536; + + /** + * Parse and convert multibyte hostnames according to IDNA (with IDNA support). + */ + public const PARSE_TOIDN = 1048576; + + /** + * Explicitly request IDNA2003 implementation if available (libidn, idnkit or ICU). + */ + public const PARSE_TOIDN_2003 = 9437184; + + /** + * Explicitly request IDNA2008 implementation if available (libidn2, idnkit2 or ICU). + */ + public const PARSE_TOIDN_2008 = 5242880; + + /** + * Percent encode multibyte sequences in the userinfo, path, query and fragment parts of the URL. + */ + public const PARSE_TOPCT = 2097152; + + /** + * Continue parsing when encountering errors. + */ + public const IGNORE_ERRORS = 268435456; + + /** + * Suppress errors/exceptions. + */ + public const SILENT_ERRORS = 536870912; + + /** + * Standard flags used by default internally for e.g. http\Message::setRequestUrl(). + * Enables joining path and query, sanitizing path, multibyte/unicode, international domain names and transient percent encoding. + */ + public const STDFLAGS = 3350531; + + /** + * The URL's scheme. + * + * @var string + */ + public $scheme = null; + + /** + * Authenticating user. + * + * @var string + */ + public $user = null; + + /** + * Authentication password. + * + * @var string + */ + public $pass = null; + + /** + * Hostname/domain. + * + * @var string + */ + public $host = null; + + /** + * Port. + * + * @var string + */ + public $port = null; + + /** + * URL path. + * + * @var string + */ + public $path = null; + + /** + * URL querystring. + * + * @var string + */ + public $query = null; + + /** + * URL fragment (hash). + * + * @var string + */ + public $fragment = null; + + /** + * Create an instance of an http\Url. + * + * ***NOTE:*** + * Prior to v3.0.0, the default for the $flags parameter was http\Url::FROM_ENV. + * + * See also http\Env\Url. + * + * @param mixed $old_url Initial URL parts. Either an array, object, http\Url instance or string to parse. + * @param mixed $new_url Overriding URL parts. Either an array, object, http\Url instance or string to parse. + * @param int $flags The modus operandi of constructing the url. See http\Url constants. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadUrlException + */ + public function __construct($old_url = null, $new_url = null, int $flags = 0) {} + + /** + * String cast handler. Alias of http\Url::toString(). + * + * @return string the URL as string. + */ + public function __toString() {} + + /** + * Clone this URL and apply $parts to the cloned URL. + * + * ***NOTE:*** + * This method returns a clone (copy) of this instance. + * + * @param mixed $parts New URL parts. + * @param int $flags Modus operandi of URL construction. See http\Url constants. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadUrlException + * @return \http\Url clone. + */ + public function mod($parts, int $flags = \http\Url::JOIN_PATH|\http\Url::JOIN_QUERY|\http\Url::SANITIZE_PATH) {} + + /** + * Retrieve the URL parts as array. + * + * @return array the URL parts. + */ + public function toArray() {} + + /** + * Get the string prepresentation of the URL. + * + * @return string the URL as string. + */ + public function toString() {} } /** * The http\Client\Curl namespace holds option value constants specific to the curl driver of the http\Client. */ + namespace http\Client\Curl; + /** * Bitmask of available libcurl features. * See http\Client\Curl\Features namespace. @@ -2071,231 +2286,261 @@ function toString() {} * Keep POSTing on any redirect. Available if libcurl is v7.19.1 or more recent. */ const POSTREDIR_ALL = 7; + namespace http\Client; + /** * The http\Client\Request class provides an HTTP message implementation tailored to represent a request message to be sent by the client. - * + * * See http\Client::enqueue(). */ -class Request extends \http\Message { - /** - * Array of options for this request, which override client options. - * - * @protected - * @var array - */ - protected $options = NULL; - /** - * Create a new client request message to be enqueued and sent by http\Client. - * - * @param string $meth The request method. - * @param string $url The request URL. - * @param array $headers HTTP headers. - * @param \http\Message\Body $body Request body. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - */ - function __construct(string $meth = NULL, string $url = NULL, array $headers = NULL, \http\Message\Body $body = NULL) {} - /** - * Add querystring data. - * See http\Client\Request::setQuery() and http\Message::setRequestUrl(). - * - * @param mixed $query_data Additional querystring data. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadQueryStringException - * @return \http\Client\Request self. - */ - function addQuery($query_data) {} - /** - * Add specific SSL options. - * See http\Client\Request::setSslOptions(), http\Client\Request::setOptions() and http\Client\Curl\$ssl options. - * - * @param array $ssl_options Add this SSL options. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Client\Request self. - */ - function addSslOptions(array $ssl_options = NULL) {} - /** - * Extract the currently set "Content-Type" header. - * See http\Client\Request::setContentType(). - * - * @return string|NULL string the currently set content type. - * or NULL if no "Content-Type" header is set. - */ - function getContentType() {} - /** - * Get priorly set options. - * See http\Client\Request::setOptions(). - * - * @return array options. - */ - function getOptions() {} - /** - * Retrieve the currently set querystring. - * - * @return string|NULL string the currently set querystring. - * or NULL if no querystring is set. - */ - function getQuery() {} - /** - * Retrieve priorly set SSL options. - * See http\Client\Request::getOptions() and http\Client\Request::setSslOptions(). - * - * @return array SSL options. - */ - function getSslOptions() {} - /** - * Set the MIME content type of the request message. - * - * @param string $content_type The MIME type used as "Content-Type". - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Client\Request self. - */ - function setContentType(string $content_type) {} - /** - * Set client options. - * See http\Client::setOptions() and http\Client\Curl. - * - * Request specific options override general options which were set in the client. - * - * > ***NOTE:*** - * > Only options specified prior enqueueing a request are applied to the request. - * - * @param array $options The options to set. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Client\Request self. - */ - function setOptions(array $options = NULL) {} - /** - * (Re)set the querystring. - * See http\Client\Request::addQuery() and http\Message::setRequestUrl(). - * - * @param mixed $query_data - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadQueryStringException - * @return \http\Client\Request self. - */ - function setQuery($query_data) {} - /** - * Specifically set SSL options. - * See http\Client\Request::setOptions() and http\Client\Curl\$ssl options. - * - * @param array $ssl_options Set SSL options to this array. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Client\Request self. - */ - function setSslOptions(array $ssl_options = NULL) {} +class Request extends \http\Message +{ + /** + * Array of options for this request, which override client options. + * + * @var array + */ + protected $options = null; + + /** + * Create a new client request message to be enqueued and sent by http\Client. + * + * @param string $meth The request method. + * @param string $url The request URL. + * @param array $headers HTTP headers. + * @param \http\Message\Body $body Request body. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + */ + public function __construct(string $meth = null, string $url = null, array $headers = null, http\Message\Body $body = null) {} + + /** + * Add querystring data. + * See http\Client\Request::setQuery() and http\Message::setRequestUrl(). + * + * @param mixed $query_data Additional querystring data. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadQueryStringException + * @return \http\Client\Request self. + */ + public function addQuery($query_data) {} + + /** + * Add specific SSL options. + * See http\Client\Request::setSslOptions(), http\Client\Request::setOptions() and http\Client\Curl\$ssl options. + * + * @param array $ssl_options Add this SSL options. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client\Request self. + */ + public function addSslOptions(array $ssl_options = null) {} + + /** + * Extract the currently set "Content-Type" header. + * See http\Client\Request::setContentType(). + * + * @return string|null string the currently set content type. + * or NULL if no "Content-Type" header is set. + */ + public function getContentType() {} + + /** + * Get priorly set options. + * See http\Client\Request::setOptions(). + * + * @return array options. + */ + public function getOptions() {} + + /** + * Retrieve the currently set querystring. + * + * @return string|null string the currently set querystring. + * or NULL if no querystring is set. + */ + public function getQuery() {} + + /** + * Retrieve priorly set SSL options. + * See http\Client\Request::getOptions() and http\Client\Request::setSslOptions(). + * + * @return array SSL options. + */ + public function getSslOptions() {} + + /** + * Set the MIME content type of the request message. + * + * @param string $content_type The MIME type used as "Content-Type". + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Client\Request self. + */ + public function setContentType(string $content_type) {} + + /** + * Set client options. + * See http\Client::setOptions() and http\Client\Curl. + * + * Request specific options override general options which were set in the client. + * + * ***NOTE:*** + * Only options specified prior enqueueing a request are applied to the request. + * + * @param array $options The options to set. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client\Request self. + */ + public function setOptions(array $options = null) {} + + /** + * (Re)set the querystring. + * See http\Client\Request::addQuery() and http\Message::setRequestUrl(). + * + * @param mixed $query_data + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadQueryStringException + * @return \http\Client\Request self. + */ + public function setQuery($query_data) {} + + /** + * Specifically set SSL options. + * See http\Client\Request::setOptions() and http\Client\Curl\$ssl options. + * + * @param array $ssl_options Set SSL options to this array. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Client\Request self. + */ + public function setSslOptions(array $ssl_options = null) {} } /** * The http\Client\Response class represents an HTTP message the client returns as answer from a server to an http\Client\Request. */ -class Response extends \http\Message { - /** - * Extract response cookies. - * Parses any "Set-Cookie" response headers into an http\Cookie list. See http\Cookie::__construct(). - * - * @param int $flags Cookie parser flags. - * @param array $allowed_extras List of keys treated as extras. - * @return array list of http\Cookie instances. - */ - function getCookies(int $flags = 0, array $allowed_extras = NULL) {} - /** - * Retrieve transfer related information after the request has completed. - * See http\Client::getTransferInfo(). - * - * @param string $name A key to retrieve out of the transfer info. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\BadMethodCallException - * @throws \http\Exception\UnexpectedValueException - * @return object|mixed object stdClass instance with all transfer info if $name was not given. - * or mixed the specific transfer info for $name. - */ - function getTransferInfo(string $name = NULL) {} +class Response extends \http\Message +{ + /** + * Extract response cookies. + * Parses any "Set-Cookie" response headers into an http\Cookie list. See http\Cookie::__construct(). + * + * @param int $flags Cookie parser flags. + * @param array $allowed_extras List of keys treated as extras. + * @return array list of http\Cookie instances. + */ + public function getCookies(int $flags = 0, array $allowed_extras = null) {} + + /** + * Retrieve transfer related information after the request has completed. + * See http\Client::getTransferInfo(). + * + * @param string $name A key to retrieve out of the transfer info. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\BadMethodCallException + * @throws \http\Exception\UnexpectedValueException + * @return object|mixed object stdClass instance with all transfer info if $name was not given. + * or mixed the specific transfer info for $name. + */ + public function getTransferInfo(string $name = null) {} } + namespace http\Client\Curl; + /** * Interface to an user event loop implementation for http\Client::configure()'s $use_eventloop option. - * - * > ***NOTE:*** - * > This interface was added in v2.6.0, resp. v3.1.0. - */ -interface User { - /** - * No action. - */ - const POLL_NONE = 0; - /** - * Poll for read readiness. - */ - const POLL_IN = 1; - /** - * Poll for write readiness. - */ - const POLL_OUT = 2; - /** - * Poll for read/write readiness. - */ - const POLL_INOUT = 3; - /** - * Stop polling for activity on this descriptor. - */ - const POLL_REMOVE = 4; - /** - * Initialize the event loop. - * - * @param callable $run as function(http\Client $c, resource $s = null, int $action = http\Client\Curl\User::POLL_NONE) : int - * Internal callback returning the number of unfinished requests pending. - * - * - * > ***NOTE***: - * > The callback should be run when a timeout occurs or a watched socket needs action. - */ - function init(callable $run); - /** - * Run the loop as long as it does not block. - * - * > ***NOTE:*** - * > This method is called by http\Client::once(), so it does not need to have an actual implementation if http\Client::once() is never called. - */ - function once(); - /** - * Run the loop. - * - * > ***NOTE:*** - * > This method is called by http\Client::send(), so it does not need to have an actual implementation if http\Client::send() is never called. - */ - function send(); - /** - * Register (or deregister) a socket watcher. - * - * @param resource $socket The socket descriptor to watch. - * @param int $poll http\Client\Curl\User::POLL_* constant. - */ - function socket($socket, int $poll); - /** - * Register a timeout watcher. - * - * @param int $timeout_ms Desired maximum timeout in milliseconds. - */ - function timer(int $timeout_ms); - /** - * Wait/poll/select (block the loop) until events fire. - * - * > ***NOTE:*** - * > This method is called by http\Client::wait(), so it does not need to have an actual implementation if http\Client::wait() is never called. - * - * @param int $timeout_ms Block for at most this milliseconds. - */ - function wait(int $timeout_ms = null); + * + * ***NOTE:*** + * This interface was added in v2.6.0, resp. v3.1.0. + */ +interface User +{ + /** + * No action. + */ + public const POLL_NONE = 0; + + /** + * Poll for read readiness. + */ + public const POLL_IN = 1; + + /** + * Poll for write readiness. + */ + public const POLL_OUT = 2; + + /** + * Poll for read/write readiness. + */ + public const POLL_INOUT = 3; + + /** + * Stop polling for activity on this descriptor. + */ + public const POLL_REMOVE = 4; + + /** + * Initialize the event loop. + * + * @param callable $run as function(http\Client $c, resource $s = null, int $action = http\Client\Curl\User::POLL_NONE) : int + * Internal callback returning the number of unfinished requests pending. + * + * + * ***NOTE***: + * The callback should be run when a timeout occurs or a watched socket needs action. + */ + public function init(callable $run); + + /** + * Run the loop as long as it does not block. + * + * ***NOTE:*** + * This method is called by http\Client::once(), so it does not need to have an actual implementation if http\Client::once() is never called. + */ + public function once(); + + /** + * Run the loop. + * + * ***NOTE:*** + * This method is called by http\Client::send(), so it does not need to have an actual implementation if http\Client::send() is never called. + */ + public function send(); + + /** + * Register (or deregister) a socket watcher. + * + * @param resource $socket The socket descriptor to watch. + * @param int $poll http\Client\Curl\User::POLL_* constant. + */ + public function socket($socket, int $poll); + + /** + * Register a timeout watcher. + * + * @param int $timeout_ms Desired maximum timeout in milliseconds. + */ + public function timer(int $timeout_ms); + + /** + * Wait/poll/select (block the loop) until events fire. + * + * ***NOTE:*** + * This method is called by http\Client::wait(), so it does not need to have an actual implementation if http\Client::wait() is never called. + * + * @param int $timeout_ms Block for at most this milliseconds. + */ + public function wait(int $timeout_ms = null); } /** * CURL feature constants. - * - * > ***NOTE:*** - * > These constants have been added in v2.6.0, resp. v3.1.0. + * + * ***NOTE:*** + * These constants have been added in v2.6.0, resp. v3.1.0. */ + namespace http\Client\Curl\Features; + /** * Whether libcurl supports asynchronous domain name resolution. */ @@ -2370,11 +2615,13 @@ function wait(int $timeout_ms = null); const UNIX_SOCKETS = 524288; /** * CURL version constants. - * - * > ***NOTE:*** - * > These constants have been added in v2.6.0, resp. v3.1.0. + * + * ***NOTE:*** + * These constants have been added in v2.6.0, resp. v3.1.0. */ + namespace http\Client\Curl\Versions; + /** * Version string of libcurl, e.g. "7.50.0". */ @@ -2390,935 +2637,1037 @@ function wait(int $timeout_ms = null); /** * Version string of the c-ares library, e.g. "1.11.0". */ -const ARES = NULL; +const ARES = null; /** * Version string of the IDN library, e.g. "1.32". */ -const IDN = NULL; +const IDN = null; + namespace http\Encoding; + /** * Base class for encoding stream implementations. */ -abstract class Stream { - /** - * Do no intermittent flushes. - */ - const FLUSH_NONE = 0; - /** - * Flush at appropriate transfer points. - */ - const FLUSH_SYNC = 1048576; - /** - * Flush at each IO operation. - */ - const FLUSH_FULL = 2097152; - /** - * Base constructor for encoding stream implementations. - * - * @param int $flags See http\Encoding\Stream and implementation specific constants. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - */ - function __construct(int $flags = 0) {} - /** - * Check whether the encoding stream is already done. - * - * @return bool whether the encoding stream is completed. - */ - function done() {} - /** - * Finish and reset the encoding stream. - * Returns any pending data. - * - * @return string any pending data. - */ - function finish() {} - /** - * Flush the encoding stream. - * Returns any pending data. - * - * @return string any pending data. - */ - function flush() {} - /** - * Update the encoding stream with more input. - * - * @param string $data The data to pass through the stream. - * @return string processed data. - */ - function update(string $data) {} +abstract class Stream +{ + /** + * Do no intermittent flushes. + */ + public const FLUSH_NONE = 0; + + /** + * Flush at appropriate transfer points. + */ + public const FLUSH_SYNC = 1048576; + + /** + * Flush at each IO operation. + */ + public const FLUSH_FULL = 2097152; + + /** + * Base constructor for encoding stream implementations. + * + * @param int $flags See http\Encoding\Stream and implementation specific constants. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + */ + public function __construct(int $flags = 0) {} + + /** + * Check whether the encoding stream is already done. + * + * @return bool whether the encoding stream is completed. + */ + public function done() {} + + /** + * Finish and reset the encoding stream. + * Returns any pending data. + * + * @return string any pending data. + */ + public function finish() {} + + /** + * Flush the encoding stream. + * Returns any pending data. + * + * @return string any pending data. + */ + public function flush() {} + + /** + * Update the encoding stream with more input. + * + * @param string $data The data to pass through the stream. + * @return string processed data. + */ + public function update(string $data) {} } + namespace http\Encoding\Stream; + /** * A [brotli](https://brotli.org) decoding stream. - * - * > ***NOTE:*** - * > This class has been added in v3.2.0. - */ -class Debrotli extends \http\Encoding\Stream { - /** - * Decode brotli encoded data. - * - * @param string $data The data to uncompress. - * @return string the uncompressed data. - */ - function decode(string $data) {} + * + * ***NOTE:*** + * This class has been added in v3.2.0. + */ +class Debrotli extends \http\Encoding\Stream +{ + /** + * Decode brotli encoded data. + * + * @param string $data The data to uncompress. + * @return string the uncompressed data. + */ + public function decode(string $data) {} } /** * A stream decoding data encoded with chunked transfer encoding. */ -class Dechunk extends \http\Encoding\Stream { - /** - * Decode chunked encoded data. - * - * @param string $data The data to decode. - * @param int $decoded_len Out parameter with the length of $data that's been decoded. - * Should be ```strlen($data)``` if not truncated. - * @return string|string|string|false string the decoded data. - * or string the unencoded data. - * or string the truncated decoded data. - * or false if $data cannot be decoded. - */ - function decode(string $data, int &$decoded_len = 0) {} +class Dechunk extends \http\Encoding\Stream +{ + /** + * Decode chunked encoded data. + * + * @param string $data The data to decode. + * @param int &$decoded_len Out parameter with the length of $data that's been decoded. + * Should be ```strlen($data)``` if not truncated. + * @return string|string|string|false string the decoded data. + * or string the unencoded data. + * or string the truncated decoded data. + * or false if $data cannot be decoded. + */ + public function decode(string $data, int &$decoded_len = 0) {} } /** * A deflate stream supporting deflate, zlib and gzip encodings. */ -class Deflate extends \http\Encoding\Stream { - /** - * Gzip encoding. RFC1952 - */ - const TYPE_GZIP = 16; - /** - * Zlib encoding. RFC1950 - */ - const TYPE_ZLIB = 0; - /** - * Deflate encoding. RFC1951 - */ - const TYPE_RAW = 32; - /** - * Default compression level. - */ - const LEVEL_DEF = 0; - /** - * Least compression level. - */ - const LEVEL_MIN = 1; - /** - * Greatest compression level. - */ - const LEVEL_MAX = 9; - /** - * Default compression strategy. - */ - const STRATEGY_DEF = 0; - /** - * Filtered compression strategy. - */ - const STRATEGY_FILT = 256; - /** - * Huffman strategy only. - */ - const STRATEGY_HUFF = 512; - /** - * Run-length encoding strategy. - */ - const STRATEGY_RLE = 768; - /** - * Encoding with fixed Huffman codes only. - * - * > **A note on the compression strategy:** - * > - * > The strategy parameter is used to tune the compression algorithm. - * > - * > Use the value DEFAULT_STRATEGY for normal data, FILTERED for data produced by a filter (or predictor), HUFFMAN_ONLY to force Huffman encoding only (no string match), or RLE to limit match distances to one (run-length encoding). - * > - * > Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY. - * > - * > RLE is designed to be almost as fast as HUFFMAN_ONLY, but give better compression for PNG image data. - * > - * > FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications. - * > - * > The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. - * > - * >_Source: [zlib Manual](http://www.zlib.net/manual.html)_ - */ - const STRATEGY_FIXED = 1024; - /** - * Encode data with deflate/zlib/gzip encoding. - * - * @param string $data The data to compress. - * @param int $flags Any compression tuning flags. See http\Encoding\Stream\Deflate and http\Encoding\Stream constants. - * @return string the compressed data. - */ - function encode(string $data, int $flags = 0) {} +class Deflate extends \http\Encoding\Stream +{ + /** + * Gzip encoding. RFC1952 + */ + public const TYPE_GZIP = 16; + + /** + * Zlib encoding. RFC1950 + */ + public const TYPE_ZLIB = 0; + + /** + * Deflate encoding. RFC1951 + */ + public const TYPE_RAW = 32; + + /** + * Default compression level. + */ + public const LEVEL_DEF = 0; + + /** + * Least compression level. + */ + public const LEVEL_MIN = 1; + + /** + * Greatest compression level. + */ + public const LEVEL_MAX = 9; + + /** + * Default compression strategy. + */ + public const STRATEGY_DEF = 0; + + /** + * Filtered compression strategy. + */ + public const STRATEGY_FILT = 256; + + /** + * Huffman strategy only. + */ + public const STRATEGY_HUFF = 512; + + /** + * Run-length encoding strategy. + */ + public const STRATEGY_RLE = 768; + + /** + * Encoding with fixed Huffman codes only. + * + * > **A note on the compression strategy:** + * > + * > The strategy parameter is used to tune the compression algorithm. + * > + * > Use the value DEFAULT_STRATEGY for normal data, FILTERED for data produced by a filter (or predictor), HUFFMAN_ONLY to force Huffman encoding only (no string match), or RLE to limit match distances to one (run-length encoding). + * > + * > Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY. + * > + * > RLE is designed to be almost as fast as HUFFMAN_ONLY, but give better compression for PNG image data. + * > + * > FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications. + * > + * > The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. + * > + * >_Source: [zlib Manual](http://www.zlib.net/manual.html)_ + */ + public const STRATEGY_FIXED = 1024; + + /** + * Encode data with deflate/zlib/gzip encoding. + * + * @param string $data The data to compress. + * @param int $flags Any compression tuning flags. See http\Encoding\Stream\Deflate and http\Encoding\Stream constants. + * @return string the compressed data. + */ + public function encode(string $data, int $flags = 0) {} } /** * A [brotli](https://brotli.org) encoding stream. - * - * > ***NOTE:*** - * > This class has been added in v3.2.0. - */ -class Enbrotli extends \http\Encoding\Stream { - /** - * Default compression level. - */ - const LEVEL_DEF = NULL; - /** - * Least compression level. - */ - const LEVEL_MIN = NULL; - /** - * Greatest compression level. - */ - const LEVEL_MAX = NULL; - /** - * Default window bits. - */ - const WBITS_DEF = NULL; - /** - * Minimum window bits. - */ - const WBITS_MIN = NULL; - /** - * Maximum window bits. - */ - const WBITS_MAX = NULL; - /** - * Default compression mode. - */ - const MODE_GENERIC = NULL; - /** - * Compression mode for UTF-8 formatted text. - */ - const MODE_TEXT = NULL; - /** - * Compression mode used in WOFF 2.0. - */ - const MODE_FONT = NULL; - /** - * Encode data with brotli encoding. - * - * @param string $data The data to compress. - * @param int $flags Any compression tuning flags. See http\Encoding\Stream\Enbrotli and http\Encoding\Stream constants. - * @return string the compressed data. - */ - function encode(string $data, int $flags = 0) {} + * + * ***NOTE:*** + * This class has been added in v3.2.0. + */ +class Enbrotli extends \http\Encoding\Stream +{ + /** + * Default compression level. + */ + public const LEVEL_DEF = null; + + /** + * Least compression level. + */ + public const LEVEL_MIN = null; + + /** + * Greatest compression level. + */ + public const LEVEL_MAX = null; + + /** + * Default window bits. + */ + public const WBITS_DEF = null; + + /** + * Minimum window bits. + */ + public const WBITS_MIN = null; + + /** + * Maximum window bits. + */ + public const WBITS_MAX = null; + + /** + * Default compression mode. + */ + public const MODE_GENERIC = null; + + /** + * Compression mode for UTF-8 formatted text. + */ + public const MODE_TEXT = null; + + /** + * Compression mode used in WOFF 2.0. + */ + public const MODE_FONT = null; + + /** + * Encode data with brotli encoding. + * + * @param string $data The data to compress. + * @param int $flags Any compression tuning flags. See http\Encoding\Stream\Enbrotli and http\Encoding\Stream constants. + * @return string the compressed data. + */ + public function encode(string $data, int $flags = 0) {} } /** * A inflate stream supporting deflate, zlib and gzip encodings. */ -class Inflate extends \http\Encoding\Stream { - /** - * Decode deflate/zlib/gzip encoded data. - * - * @param string $data The data to uncompress. - * @return string the uncompressed data. - */ - function decode(string $data) {} +class Inflate extends \http\Encoding\Stream +{ + /** + * Decode deflate/zlib/gzip encoded data. + * + * @param string $data The data to uncompress. + * @return string the uncompressed data. + */ + public function decode(string $data) {} } + namespace http\Env; + /** * The http\Env\Request class' instances represent the server's current HTTP request. - * + * * See http\Message for inherited members. */ -class Request extends \http\Message { - /** - * The request's query parameters. ($_GET) - * - * @protected - * @var \http\QueryString - */ - protected $query = NULL; - /** - * The request's form parameters. ($_POST) - * - * @protected - * @var \http\QueryString - */ - protected $form = NULL; - /** - * The request's form uploads. ($_FILES) - * - * @protected - * @var array - */ - protected $files = NULL; - /** - * The request's cookies. ($_COOKIE) - * - * @protected - * @var array - */ - protected $cookie = NULL; - /** - * Create an instance of the server's current HTTP request. - * - * Upon construction, the http\Env\Request acquires http\QueryString instances of query parameters ($\_GET) and form parameters ($\_POST). - * - * It also compiles an array of uploaded files ($\_FILES) more comprehensive than the original $\_FILES array, see http\Env\Request::getFiles() for that matter. - * - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - */ - function __construct() {} - /** - * Retrieve an URL query value ($_GET). - * - * See http\QueryString::get() and http\QueryString::TYPE_* constants. - * - * @param string $name The key to retrieve the value for. - * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. - * @param mixed $defval The default value to return if the key $name does not exist. - * @param bool $delete Whether to delete the entry from the querystring after retrieval. - * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. - * or string the whole querystring if $name is of zero length. - * or mixed $defval if the key $name does not exist. - * or mixed the querystring value cast to $type if $type was specified and the key $name exists. - * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. - */ - function getCookie(string $name = NULL, $type = NULL, $defval = NULL, bool $delete = false) {} - /** - * Retrieve the uploaded files list ($_FILES). - * - * @return array the consolidated upload files array. - */ - function getFiles() {} - /** - * Retrieve a form value ($_POST). - * - * See http\QueryString::get() and http\QueryString::TYPE_* constants. - * - * @param string $name The key to retrieve the value for. - * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. - * @param mixed $defval The default value to return if the key $name does not exist. - * @param bool $delete Whether to delete the entry from the querystring after retrieval. - * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. - * or string the whole querystring if $name is of zero length. - * or mixed $defval if the key $name does not exist. - * or mixed the querystring value cast to $type if $type was specified and the key $name exists. - * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. - */ - function getForm(string $name = NULL, $type = NULL, $defval = NULL, bool $delete = false) {} - /** - * Retrieve an URL query value ($_GET). - * - * See http\QueryString::get() and http\QueryString::TYPE_* constants. - * - * @param string $name The key to retrieve the value for. - * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. - * @param mixed $defval The default value to return if the key $name does not exist. - * @param bool $delete Whether to delete the entry from the querystring after retrieval. - * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. - * or string the whole querystring if $name is of zero length. - * or mixed $defval if the key $name does not exist. - * or mixed the querystring value cast to $type if $type was specified and the key $name exists. - * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. - */ - function getQuery(string $name = NULL, $type = NULL, $defval = NULL, bool $delete = false) {} +class Request extends \http\Message +{ + /** + * The request's query parameters. ($_GET) + * + * @var \http\QueryString + */ + protected $query = null; + + /** + * The request's form parameters. ($_POST) + * + * @var \http\QueryString + */ + protected $form = null; + + /** + * The request's form uploads. ($_FILES) + * + * @var array + */ + protected $files = null; + + /** + * The request's cookies. ($_COOKIE) + * + * @var array + */ + protected $cookie = null; + + /** + * Create an instance of the server's current HTTP request. + * + * Upon construction, the http\Env\Request acquires http\QueryString instances of query parameters ($\_GET) and form parameters ($\_POST). + * + * It also compiles an array of uploaded files ($\_FILES) more comprehensive than the original $\_FILES array, see http\Env\Request::getFiles() for that matter. + * + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + */ + public function __construct() {} + + /** + * Retrieve an URL query value ($_GET). + * + * See http\QueryString::get() and http\QueryString::TYPE_* constants. + * + * @param string $name The key to retrieve the value for. + * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. + * @param mixed $defval The default value to return if the key $name does not exist. + * @param bool $delete Whether to delete the entry from the querystring after retrieval. + * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. + * or string the whole querystring if $name is of zero length. + * or mixed $defval if the key $name does not exist. + * or mixed the querystring value cast to $type if $type was specified and the key $name exists. + * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. + */ + public function getCookie(string $name = null, $type = null, $defval = null, bool $delete = false) {} + + /** + * Retrieve the uploaded files list ($_FILES). + * + * @return array the consolidated upload files array. + */ + public function getFiles() {} + + /** + * Retrieve a form value ($_POST). + * + * See http\QueryString::get() and http\QueryString::TYPE_* constants. + * + * @param string $name The key to retrieve the value for. + * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. + * @param mixed $defval The default value to return if the key $name does not exist. + * @param bool $delete Whether to delete the entry from the querystring after retrieval. + * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. + * or string the whole querystring if $name is of zero length. + * or mixed $defval if the key $name does not exist. + * or mixed the querystring value cast to $type if $type was specified and the key $name exists. + * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. + */ + public function getForm(string $name = null, $type = null, $defval = null, bool $delete = false) {} + + /** + * Retrieve an URL query value ($_GET). + * + * See http\QueryString::get() and http\QueryString::TYPE_* constants. + * + * @param string $name The key to retrieve the value for. + * @param mixed $type The type to cast the value to. See http\QueryString::TYPE_* constants. + * @param mixed $defval The default value to return if the key $name does not exist. + * @param bool $delete Whether to delete the entry from the querystring after retrieval. + * @return \http\QueryString|string|mixed|mixed|string \http\QueryString if called without arguments. + * or string the whole querystring if $name is of zero length. + * or mixed $defval if the key $name does not exist. + * or mixed the querystring value cast to $type if $type was specified and the key $name exists. + * or string the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING. + */ + public function getQuery(string $name = null, $type = null, $defval = null, bool $delete = false) {} } /** * The http\Env\Response class' instances represent the server's current HTTP response. - * + * * See http\Message for inherited members. */ -class Response extends \http\Message { - /** - * Do not use content encoding. - */ - const CONTENT_ENCODING_NONE = 0; - /** - * Support "Accept-Encoding" requests with gzip and deflate encoding. - */ - const CONTENT_ENCODING_GZIP = 1; - /** - * No caching info available. - */ - const CACHE_NO = 0; - /** - * The cache was hit. - */ - const CACHE_HIT = 1; - /** - * The cache was missed. - */ - const CACHE_MISS = 2; - /** - * A request instance which overrides the environments default request. - * - * @protected - * @var \http\Env\Request - */ - protected $request = NULL; - /** - * The response's MIME content type. - * - * @protected - * @var string - */ - protected $contentType = NULL; - /** - * The response's MIME content disposition. - * - * @protected - * @var string - */ - protected $contentDisposition = NULL; - /** - * See http\Env\Response::CONTENT_ENCODING_* constants. - * - * @protected - * @var int - */ - protected $contentEncoding = NULL; - /** - * How the client should treat this response in regards to caching. - * - * @protected - * @var string - */ - protected $cacheControl = NULL; - /** - * A custom ETag. - * - * @protected - * @var string - */ - protected $etag = NULL; - /** - * A "Last-Modified" time stamp. - * - * @protected - * @var int - */ - protected $lastModified = NULL; - /** - * Any throttling delay. - * - * @protected - * @var int - */ - protected $throttleDelay = NULL; - /** - * The chunk to send every $throttleDelay seconds. - * - * @protected - * @var int - */ - protected $throttleChunk = NULL; - /** - * The response's cookies. - * - * @protected - * @var array - */ - protected $cookies = NULL; - /** - * Create a new env response message instance. - * - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - */ - function __construct() {} - /** - * Output buffer handler. - * Appends output data to the body. - * - * @param string $data The data output. - * @param int $ob_flags Output buffering flags passed from the output buffering control layer. - * @return bool success. - */ - function __invoke(string $data, int $ob_flags = 0) {} - /** - * Manually test the header $header_name of the environment's request for a cache hit. - * http\Env\Response::send() checks that itself, though. - * - * @param string $header_name The request header to test. - * @return int a http\Env\Response::CACHE_* constant. - */ - function isCachedByEtag(string $header_name = "If-None-Match") {} - /** - * Manually test the header $header_name of the environment's request for a cache hit. - * http\Env\Response::send() checks that itself, though. - * - * @param string $header_name The request header to test. - * @return int a http\Env\Response::CACHE_* constant. - */ - function isCachedByLastModified(string $header_name = "If-Modified-Since") {} - /** - * Send the response through the SAPI or $stream. - * Flushes all output buffers. - * - * @param resource $stream A writable stream to send the response through. - * @return bool success. - */ - function send($stream = NULL) {} - /** - * Make suggestions to the client how it should cache the response. - * - * @param string $cache_control (A) "Cache-Control" header value(s). - * @throws \http\Exception\InvalidArgumentException - * @return \http\Env\Response self. - */ - function setCacheControl(string $cache_control) {} - /** - * Set the reponse's content disposition parameters. - * - * @param array $disposition_params MIME content disposition as http\Params array. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Env\Response self. - */ - function setContentDisposition(array $disposition_params) {} - /** - * Enable support for "Accept-Encoding" requests with deflate or gzip. - * The response will be compressed if the client indicates support and wishes that. - * - * @param int $content_encoding See http\Env\Response::CONTENT_ENCODING_* constants. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Env\Response self. - */ - function setContentEncoding(int $content_encoding) {} - /** - * Set the MIME content type of the response. - * - * @param string $content_type The response's content type. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Env\Response self. - */ - function setContentType(string $content_type) {} - /** - * Add cookies to the response to send. - * - * @param mixed $cookie The cookie to send. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return \http\Env\Response self. - */ - function setCookie($cookie) {} - /** - * Override the environment's request. - * - * @param \http\Message $env_request The overriding request message. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Env\Response self. - */ - function setEnvRequest(\http\Message $env_request) {} - /** - * Set a custom ETag. - * - * > ***NOTE:*** - * > This will be used for caching and pre-condition checks. - * - * @param string $etag A ETag. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Env\Response self. - */ - function setEtag(string $etag) {} - /** - * Set a custom last modified time stamp. - * - * > ***NOTE:*** - * > This will be used for caching and pre-condition checks. - * - * @param int $last_modified A unix timestamp. - * @throws \http\Exception\InvalidArgumentException - * @return \http\Env\Response self. - */ - function setLastModified(int $last_modified) {} - /** - * Enable throttling. - * Send $chunk_size bytes every $delay seconds. - * - * > ***NOTE:*** - * > If you need throttling by regular means, check for other options in your stack, because this method blocks the executing process/thread until the response has completely been sent. - * - * @param int $chunk_size Bytes to send. - * @param float $delay Seconds to sleep. - * @return \http\Env\Response self. - */ - function setThrottleRate(int $chunk_size, float $delay = 1) {} +class Response extends \http\Message +{ + /** + * Do not use content encoding. + */ + public const CONTENT_ENCODING_NONE = 0; + + /** + * Support "Accept-Encoding" requests with gzip and deflate encoding. + */ + public const CONTENT_ENCODING_GZIP = 1; + + /** + * No caching info available. + */ + public const CACHE_NO = 0; + + /** + * The cache was hit. + */ + public const CACHE_HIT = 1; + + /** + * The cache was missed. + */ + public const CACHE_MISS = 2; + + /** + * A request instance which overrides the environments default request. + * + * @var \http\Env\Request + */ + protected $request = null; + + /** + * The response's MIME content type. + * + * @var string + */ + protected $contentType = null; + + /** + * The response's MIME content disposition. + * + * @var string + */ + protected $contentDisposition = null; + + /** + * See http\Env\Response::CONTENT_ENCODING_* constants. + * + * @var int + */ + protected $contentEncoding = null; + + /** + * How the client should treat this response in regards to caching. + * + * @var string + */ + protected $cacheControl = null; + + /** + * A custom ETag. + * + * @var string + */ + protected $etag = null; + + /** + * A "Last-Modified" time stamp. + * + * @var int + */ + protected $lastModified = null; + + /** + * Any throttling delay. + * + * @var int + */ + protected $throttleDelay = null; + + /** + * The chunk to send every $throttleDelay seconds. + * + * @var int + */ + protected $throttleChunk = null; + + /** + * The response's cookies. + * + * @var array + */ + protected $cookies = null; + + /** + * Create a new env response message instance. + * + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + */ + public function __construct() {} + + /** + * Output buffer handler. + * Appends output data to the body. + * + * @param string $data The data output. + * @param int $ob_flags Output buffering flags passed from the output buffering control layer. + * @return bool success. + */ + public function __invoke(string $data, int $ob_flags = 0) {} + + /** + * Manually test the header $header_name of the environment's request for a cache hit. + * http\Env\Response::send() checks that itself, though. + * + * @param string $header_name The request header to test. + * @return int a http\Env\Response::CACHE_* constant. + */ + public function isCachedByEtag(string $header_name = "If-None-Match") {} + + /** + * Manually test the header $header_name of the environment's request for a cache hit. + * http\Env\Response::send() checks that itself, though. + * + * @param string $header_name The request header to test. + * @return int a http\Env\Response::CACHE_* constant. + */ + public function isCachedByLastModified(string $header_name = "If-Modified-Since") {} + + /** + * Send the response through the SAPI or $stream. + * Flushes all output buffers. + * + * @param resource $stream A writable stream to send the response through. + * @return bool success. + */ + public function send($stream = null) {} + + /** + * Make suggestions to the client how it should cache the response. + * + * @param string $cache_control (A) "Cache-Control" header value(s). + * @throws \http\Exception\InvalidArgumentException + * @return \http\Env\Response self. + */ + public function setCacheControl(string $cache_control) {} + + /** + * Set the response's content disposition parameters. + * + * @param array $disposition_params MIME content disposition as http\Params array. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Env\Response self. + */ + public function setContentDisposition(array $disposition_params) {} + + /** + * Enable support for "Accept-Encoding" requests with deflate or gzip. + * The response will be compressed if the client indicates support and wishes that. + * + * @param int $content_encoding See http\Env\Response::CONTENT_ENCODING_* constants. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Env\Response self. + */ + public function setContentEncoding(int $content_encoding) {} + + /** + * Set the MIME content type of the response. + * + * @param string $content_type The response's content type. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Env\Response self. + */ + public function setContentType(string $content_type) {} + + /** + * Add cookies to the response to send. + * + * @param mixed $cookie The cookie to send. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return \http\Env\Response self. + */ + public function setCookie($cookie) {} + + /** + * Override the environment's request. + * + * @param \http\Message $env_request The overriding request message. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Env\Response self. + */ + public function setEnvRequest(http\Message $env_request) {} + + /** + * Set a custom ETag. + * + * ***NOTE:*** + * This will be used for caching and pre-condition checks. + * + * @param string $etag A ETag. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Env\Response self. + */ + public function setEtag(string $etag) {} + + /** + * Set a custom last modified time stamp. + * + * ***NOTE:*** + * This will be used for caching and pre-condition checks. + * + * @param int $last_modified A unix timestamp. + * @throws \http\Exception\InvalidArgumentException + * @return \http\Env\Response self. + */ + public function setLastModified(int $last_modified) {} + + /** + * Enable throttling. + * Send $chunk_size bytes every $delay seconds. + * + * ***NOTE:*** + * If you need throttling by regular means, check for other options in your stack, because this method blocks the executing process/thread until the response has completely been sent. + * + * @param int $chunk_size Bytes to send. + * @param float $delay Seconds to sleep. + * @return \http\Env\Response self. + */ + public function setThrottleRate(int $chunk_size, float $delay = 1) {} } /** * URL class using the HTTP environment by default. - * - * > ***NOTE:*** - * > This class has been added in v3.0.0. - * + * + * ***NOTE:*** + * This class has been added in v3.0.0. + * * Always adds http\Url::FROM_ENV to the $flags constructor argument. See also http\Url. */ -class Url extends \http\Url { -} +class Url extends \http\Url {} + namespace http\Exception; + /** * A bad conversion (e.g. character conversion) was encountered. */ -class BadConversionException extends \DomainException implements \http\Exception { -} +class BadConversionException extends \DomainException implements \http\Exception {} /** * A bad HTTP header was encountered. */ -class BadHeaderException extends \DomainException implements \http\Exception { -} +class BadHeaderException extends \DomainException implements \http\Exception {} /** * A bad HTTP message was encountered. */ -class BadMessageException extends \DomainException implements \http\Exception { -} +class BadMessageException extends \DomainException implements \http\Exception {} /** * A method was called on an object, which was in an invalid or unexpected state. */ -class BadMethodCallException extends \BadMethodCallException implements \http\Exception { -} +class BadMethodCallException extends \BadMethodCallException implements \http\Exception {} /** * A bad querystring was encountered. */ -class BadQueryStringException extends \DomainException implements \http\Exception { -} +class BadQueryStringException extends \DomainException implements \http\Exception {} /** * A bad HTTP URL was encountered. */ -class BadUrlException extends \DomainException implements \http\Exception { -} +class BadUrlException extends \DomainException implements \http\Exception {} /** * One or more invalid arguments were passed to a method. */ -class InvalidArgumentException extends \InvalidArgumentException implements \http\Exception { -} +class InvalidArgumentException extends \InvalidArgumentException implements \http\Exception {} /** * A generic runtime exception. */ -class RuntimeException extends \RuntimeException implements \http\Exception { -} +class RuntimeException extends \RuntimeException implements \http\Exception {} /** * An unexpected value was encountered. */ -class UnexpectedValueException extends \UnexpectedValueException implements \http\Exception { -} +class UnexpectedValueException extends \UnexpectedValueException implements \http\Exception {} + namespace http\Header; + /** * The parser which is underlying http\Header and http\Message. - * - * > ***NOTE:*** - * > This class has been added in v2.3.0. - */ -class Parser { - /** - * Finish up parser at end of (incomplete) input. - */ - const CLEANUP = 1; - /** - * Parse failure. - */ - const STATE_FAILURE = -1; - /** - * Expecting HTTP info (request/response line) or headers. - */ - const STATE_START = 0; - /** - * Expecting a key or already parsing a key. - */ - const STATE_KEY = 1; - /** - * Expecting a value or already parsing the value. - */ - const STATE_VALUE = 2; - /** - * At EOL of an header, checking whether a folded header line follows. - */ - const STATE_VALUE_EX = 3; - /** - * A header was completed. - */ - const STATE_HEADER_DONE = 4; - /** - * Finished parsing the headers. - * - * > ***NOTE:*** - * > Most of this states won't be returned to the user, because the parser immediately jumps to the next expected state. - */ - const STATE_DONE = 5; - /** - * Retrieve the current state of the parser. - * See http\Header\Parser::STATE_* constants. - * - * @throws \http\Exception\InvalidArgumentException - * @return int http\Header\Parser::STATE_* constant. - */ - function getState() {} - /** - * Parse a string. - * - * @param string $data The (part of the) header to parse. - * @param int $flags Any combination of [parser flags](http/Header/Parser#Parser.flags:). - * @param array $header Successfully parsed headers. - * @throws \http\Exception\InvalidArgumentException - * @return int http\Header\Parser::STATE_* constant. - */ - function parse(string $data, int $flags, array &$header = NULL) {} - /** - * Parse a stream. - * - * @param resource $stream The header stream to parse from. - * @param int $flags Any combination of [parser flags](http/Header/Parser#Parser.flags:). - * @param array $headers The headers parsed. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return int http\Header\Parser::STATE_* constant. - */ - function stream($stream, int $flags, array &$headers) {} + * + * ***NOTE:*** + * This class has been added in v2.3.0. + */ +class Parser +{ + /** + * Finish up parser at end of (incomplete) input. + */ + public const CLEANUP = 1; + + /** + * Parse failure. + */ + public const STATE_FAILURE = -1; + + /** + * Expecting HTTP info (request/response line) or headers. + */ + public const STATE_START = 0; + + /** + * Expecting a key or already parsing a key. + */ + public const STATE_KEY = 1; + + /** + * Expecting a value or already parsing the value. + */ + public const STATE_VALUE = 2; + + /** + * At EOL of an header, checking whether a folded header line follows. + */ + public const STATE_VALUE_EX = 3; + + /** + * A header was completed. + */ + public const STATE_HEADER_DONE = 4; + + /** + * Finished parsing the headers. + * + * ***NOTE:*** + * Most of this states won't be returned to the user, because the parser immediately jumps to the next expected state. + */ + public const STATE_DONE = 5; + + /** + * Retrieve the current state of the parser. + * See http\Header\Parser::STATE_* constants. + * + * @throws \http\Exception\InvalidArgumentException + * @return int http\Header\Parser::STATE_* constant. + */ + public function getState() {} + + /** + * Parse a string. + * + * @param string $data The (part of the) header to parse. + * @param int $flags Any combination of [parser flags](http/Header/Parser#Parser.flags:). + * @param array &$header Successfully parsed headers. + * @throws \http\Exception\InvalidArgumentException + * @return int http\Header\Parser::STATE_* constant. + */ + public function parse(string $data, int $flags, array &$header = null) {} + + /** + * Parse a stream. + * + * @param resource $stream The header stream to parse from. + * @param int $flags Any combination of [parser flags](http/Header/Parser#Parser.flags:). + * @param array &$headers The headers parsed. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return int http\Header\Parser::STATE_* constant. + */ + public function stream($stream, int $flags, array &$headers) {} } + namespace http\Message; + /** * The message body, represented as a PHP (temporary) stream. - * - * > ***NOTE:*** - * > Currently, http\Message\Body::addForm() creates multipart/form-data bodies. - */ -class Body implements \Serializable { - /** - * Create a new message body, optionally referencing $stream. - * - * @param resource $stream A stream to be used as message body. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - */ - function __construct($stream = NULL) {} - /** - * String cast handler. - * - * @return string the message body. - */ - function __toString() {} - /** - * Add form fields and files to the message body. - * - * > ***NOTE:*** - * > Currently, http\Message\Body::addForm() creates "multipart/form-data" bodies. - * - * @param array $fields List of form fields to add. - * @param array $files List of form files to add. - * - * $fields must look like: - * - * [ - * "field_name" => "value", - * "multi_field" => [ - * "value1", - * "value2" - * ] - * ] - * - * $files must look like: - * - * [ - * [ - * "name" => "field_name", - * "type" => "content/type", - * "file" => "/path/to/file.ext" - * ], [ - * "name" => "field_name2", - * "type" => "text/plain", - * "file" => "file.ext", - * "data" => "string" - * ], [ - * "name" => "field_name3", - * "type" => "image/jpeg", - * "file" => "file.ext", - * "data" => fopen("/home/mike/Pictures/mike.jpg","r") - * ] - * - * As you can see, a file structure must contain a "file" entry, which holds a file path, and an optional "data" entry, which may either contain a resource to read from or the actual data as string. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - * @return \http\Message\Body self. - */ - function addForm(array $fields = NULL, array $files = NULL) {} - /** - * Add a part to a multipart body. - * - * @param \http\Message $part The message part. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - * @return \http\Message\Body self. - */ - function addPart(\http\Message $part) {} - /** - * Append plain bytes to the message body. - * - * @param string $data The data to append to the body. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\RuntimeException - * @return \http\Message\Body self. - */ - function append(string $data) {} - /** - * Retrieve the ETag of the body. - * - * @return string|string|false string an Apache style ETag of inode, mtime and size in hex concatenated by hyphens if the message body stream is stat-able. - * or string a content hash (which algorithm is determined by INI http.etag.mode) if the stream is not stat-able. - * or false if http.etag.mode is not a known hash algorithm. - */ - function etag() {} - /** - * Retrieve any boundary of the message body. - * See http\Message::splitMultipartBody(). - * - * @return string|NULL string the message body boundary. - * or NULL if this message body has no boundary. - */ - function getBoundary() {} - /** - * Retrieve the underlying stream resource. - * - * @return resource the underlying stream. - */ - function getResource() {} - /** - * Implements Serializable. - * Alias of http\Message\Body::__toString(). - * - * @return string serialized message body. - */ - function serialize() {} - /** - * Stat size, atime, mtime and/or ctime. - * - * @param string $field A single stat field to retrieve. - * @return int|object int the requested stat field. - * or object stdClass instance holding all four stat fields. - */ - function stat(string $field = NULL) {} - /** - * Stream the message body through a callback. - * - * @param callable $callback The callback of the form function(http\Message\Body $from, string $data). - * @param int $offset Start to stream from this offset. - * @param int $maxlen Stream at most $maxlen bytes, or all if $maxlen is less than 1. - * @return \http\Message\Body self. - */ - function toCallback(callable $callback, int $offset = 0, int $maxlen = 0) {} - /** - * Stream the message body into another stream $stream, starting from $offset, streaming $maxlen at most. - * - * @param resource $stream The resource to write to. - * @param int $offset The starting offset. - * @param int $maxlen The maximum amount of data to stream. All content if less than 1. - * @return \http\Message\Body self. - */ - function toStream($stream, int $offset = 0, int $maxlen = 0) {} - /** - * Retrieve the message body serialized to a string. - * Alias of http\Message\Body::__toString(). - * - * @return string message body. - */ - function toString() {} - /** - * Implements Serializable. - * - * @param string $serialized The serialized message body. - */ - function unserialize($serialized) {} + * + * ***NOTE:*** + * Currently, http\Message\Body::addForm() creates multipart/form-data bodies. + */ +class Body implements \Serializable +{ + /** + * Create a new message body, optionally referencing $stream. + * + * @param resource $stream A stream to be used as message body. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + */ + public function __construct($stream = null) {} + + /** + * String cast handler. + * + * @return string the message body. + */ + public function __toString() {} + + /** + * Add form fields and files to the message body. + * + * ***NOTE:*** + * Currently, http\Message\Body::addForm() creates "multipart/form-data" bodies. + * + * @param array $fields List of form fields to add. + * @param array $files List of form files to add. + * + * $fields must look like: + * + * [ + * "field_name" => "value", + * "multi_field" => [ + * "value1", + * "value2" + * ] + * ] + * + * $files must look like: + * + * [ + * [ + * "name" => "field_name", + * "type" => "content/type", + * "file" => "/path/to/file.ext" + * ], [ + * "name" => "field_name2", + * "type" => "text/plain", + * "file" => "file.ext", + * "data" => "string" + * ], [ + * "name" => "field_name3", + * "type" => "image/jpeg", + * "file" => "file.ext", + * "data" => fopen("/home/mike/Pictures/mike.jpg","r") + * ] + * + * As you can see, a file structure must contain a "file" entry, which holds a file path, and an optional "data" entry, which may either contain a resource to read from or the actual data as string. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + * @return \http\Message\Body self. + */ + public function addForm(array $fields = null, array $files = null) {} + + /** + * Add a part to a multipart body. + * + * @param \http\Message $part The message part. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + * @return \http\Message\Body self. + */ + public function addPart(http\Message $part) {} + + /** + * Append plain bytes to the message body. + * + * @param string $data The data to append to the body. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\RuntimeException + * @return \http\Message\Body self. + */ + public function append(string $data) {} + + /** + * Retrieve the ETag of the body. + * + * @return string|string|false string an Apache style ETag of inode, mtime and size in hex concatenated by hyphens if the message body stream is stat-able. + * or string a content hash (which algorithm is determined by INI http.etag.mode) if the stream is not stat-able. + * or false if http.etag.mode is not a known hash algorithm. + */ + public function etag() {} + + /** + * Retrieve any boundary of the message body. + * See http\Message::splitMultipartBody(). + * + * @return string|null string the message body boundary. + * or NULL if this message body has no boundary. + */ + public function getBoundary() {} + + /** + * Retrieve the underlying stream resource. + * + * @return resource the underlying stream. + */ + public function getResource() {} + + /** + * Implements Serializable. + * Alias of http\Message\Body::__toString(). + * + * @return string serialized message body. + */ + public function serialize() {} + + /** + * Stat size, atime, mtime and/or ctime. + * + * @param string $field A single stat field to retrieve. + * @return int|object int the requested stat field. + * or object stdClass instance holding all four stat fields. + */ + public function stat(string $field = null) {} + + /** + * Stream the message body through a callback. + * + * @param callable $callback The callback of the form function(http\Message\Body $from, string $data). + * @param int $offset Start to stream from this offset. + * @param int $maxlen Stream at most $maxlen bytes, or all if $maxlen is less than 1. + * @return \http\Message\Body self. + */ + public function toCallback(callable $callback, int $offset = 0, int $maxlen = 0) {} + + /** + * Stream the message body into another stream $stream, starting from $offset, streaming $maxlen at most. + * + * @param resource $stream The resource to write to. + * @param int $offset The starting offset. + * @param int $maxlen The maximum amount of data to stream. All content if less than 1. + * @return \http\Message\Body self. + */ + public function toStream($stream, int $offset = 0, int $maxlen = 0) {} + + /** + * Retrieve the message body serialized to a string. + * Alias of http\Message\Body::__toString(). + * + * @return string message body. + */ + public function toString() {} + + /** + * Implements Serializable. + * + * @param string $serialized The serialized message body. + */ + public function unserialize($serialized) {} } /** * The parser which is underlying http\Message. - * - * > ***NOTE:*** - * > This class was added in v2.2.0. - */ -class Parser { - /** - * Finish up parser at end of (incomplete) input. - */ - const CLEANUP = 1; - /** - * Soak up the rest of input if no entity length is deducible. - */ - const DUMB_BODIES = 2; - /** - * Redirect messages do not contain any body despite of indication of such. - */ - const EMPTY_REDIRECTS = 4; - /** - * Continue parsing while input is available. - */ - const GREEDY = 8; - /** - * Parse failure. - */ - const STATE_FAILURE = -1; - /** - * Expecting HTTP info (request/response line) or headers. - */ - const STATE_START = 0; - /** - * Parsing headers. - */ - const STATE_HEADER = 1; - /** - * Completed parsing headers. - */ - const STATE_HEADER_DONE = 2; - /** - * Parsing the body. - */ - const STATE_BODY = 3; - /** - * Soaking up all input as body. - */ - const STATE_BODY_DUMB = 4; - /** - * Reading body as indicated by `Content-Length` or `Content-Range`. - */ - const STATE_BODY_LENGTH = 5; - /** - * Parsing `chunked` encoded body. - */ - const STATE_BODY_CHUNKED = 6; - /** - * Finished parsing the body. - */ - const STATE_BODY_DONE = 7; - /** - * Updating Content-Length based on body size. - */ - const STATE_UPDATE_CL = 8; - /** - * Finished parsing the message. - * - * > ***NOTE:*** - * > Most of this states won't be returned to the user, because the parser immediately jumps to the next expected state. - */ - const STATE_DONE = 9; - /** - * Retrieve the current state of the parser. - * See http\Message\Parser::STATE_* constants. - * - * @throws \http\Exception\InvalidArgumentException - * @return int http\Message\Parser::STATE_* constant. - */ - function getState() {} - /** - * Parse a string. - * - * @param string $data The (part of the) message to parse. - * @param int $flags Any combination of [parser flags](http/Message/Parser#Parser.flags:). - * @param \http\Message $message The current state of the message parsed. - * @throws \http\Exception\InvalidArgumentException - * @return int http\Message\Parser::STATE_* constant. - */ - function parse(string $data, int $flags, \http\Message &$message) {} - /** - * Parse a stream. - * - * @param resource $stream The message stream to parse from. - * @param int $flags Any combination of [parser flags](http/Message/Parser#Parser.flags:). - * @param \http\Message $message The current state of the message parsed. - * @throws \http\Exception\InvalidArgumentException - * @throws \http\Exception\UnexpectedValueException - * @return int http\Message\Parser::STATE_* constant. - */ - function stream($stream, int $flags, \http\Message &$message) {} + * + * ***NOTE:*** + * This class was added in v2.2.0. + */ +class Parser +{ + /** + * Finish up parser at end of (incomplete) input. + */ + public const CLEANUP = 1; + + /** + * Soak up the rest of input if no entity length is deducible. + */ + public const DUMB_BODIES = 2; + + /** + * Redirect messages do not contain any body despite of indication of such. + */ + public const EMPTY_REDIRECTS = 4; + + /** + * Continue parsing while input is available. + */ + public const GREEDY = 8; + + /** + * Parse failure. + */ + public const STATE_FAILURE = -1; + + /** + * Expecting HTTP info (request/response line) or headers. + */ + public const STATE_START = 0; + + /** + * Parsing headers. + */ + public const STATE_HEADER = 1; + + /** + * Completed parsing headers. + */ + public const STATE_HEADER_DONE = 2; + + /** + * Parsing the body. + */ + public const STATE_BODY = 3; + + /** + * Soaking up all input as body. + */ + public const STATE_BODY_DUMB = 4; + + /** + * Reading body as indicated by `Content-Length` or `Content-Range`. + */ + public const STATE_BODY_LENGTH = 5; + + /** + * Parsing `chunked` encoded body. + */ + public const STATE_BODY_CHUNKED = 6; + + /** + * Finished parsing the body. + */ + public const STATE_BODY_DONE = 7; + + /** + * Updating Content-Length based on body size. + */ + public const STATE_UPDATE_CL = 8; + + /** + * Finished parsing the message. + * + * ***NOTE:*** + * Most of this states won't be returned to the user, because the parser immediately jumps to the next expected state. + */ + public const STATE_DONE = 9; + + /** + * Retrieve the current state of the parser. + * See http\Message\Parser::STATE_* constants. + * + * @throws \http\Exception\InvalidArgumentException + * @return int http\Message\Parser::STATE_* constant. + */ + public function getState() {} + + /** + * Parse a string. + * + * @param string $data The (part of the) message to parse. + * @param int $flags Any combination of [parser flags](http/Message/Parser#Parser.flags:). + * @param \http\Message $message The current state of the message parsed. + * @throws \http\Exception\InvalidArgumentException + * @return int http\Message\Parser::STATE_* constant. + */ + public function parse(string $data, int $flags, http\Message $message) {} + + /** + * Parse a stream. + * + * @param resource $stream The message stream to parse from. + * @param int $flags Any combination of [parser flags](http/Message/Parser#Parser.flags:). + * @param \http\Message $message The current state of the message parsed. + * @throws \http\Exception\InvalidArgumentException + * @throws \http\Exception\UnexpectedValueException + * @return int http\Message\Parser::STATE_* constant. + */ + public function stream($stream, int $flags, http\Message $message) {} } diff --git a/ibm_db2/ibm_db2.php b/ibm_db2/ibm_db2.php index 7b2428520..b074a0baf 100644 --- a/ibm_db2/ibm_db2.php +++ b/ibm_db2/ibm_db2.php @@ -6,32 +6,23 @@ * Returns a connection to a database * @link https://php.net/manual/en/function.db2-connect.php * @param string $database - * For a cataloged connection to a database, database - * represents the database alias in the DB2 client catalog. + * For a cataloged connection to a database, this parameter + * represents the connection alias in the DB2 client catalog. * *- * For an uncataloged connection to a database, - * database represents a complete connection - * string in the following format: - * DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;UID=username;PWD=password; - * where the parameters represent the following values: - * database - * - * The name of the database. - * - * @param string $username- * The username with which you are connecting to the database. + * For an uncataloged connection to a database, + * this parameter represents a complete DSN in the following format: + * DRIVER=driver;DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;UID=username;PWD=password; * - *- * For uncataloged connections, you must pass a &null; value or empty - * string. + * @param string|null $username + * The username with which you are connecting to the database, or null if + * the $database parameter contains a DSN which already provides the username for + * the connection. * - * @param string $password- * The password with which you are connecting to the database. - * - *- * For uncataloged connections, you must pass a &null; value or empty - * string. + * @param string|null $password + * The password with which you are connecting to the database, or null if + * the $database parameter contains a DSN which already provides the password for + * the connection. * * @param array $options* An associative array of connection options that affect the behavior @@ -49,7 +40,7 @@ * successful. If the connection attempt fails, db2_connect * returns false. */ -function db2_connect ($database, $username, $password, array $options = null) {} +function db2_connect(#[\SensitiveParameter] string $database, ?string $username, #[\SensitiveParameter] ?string $password, array $options = []) {} /** * Commits a transaction @@ -60,24 +51,35 @@ function db2_connect ($database, $username, $password, array $options = null) {} * * @return bool true on success or false on failure. */ -function db2_commit ($connection) {} +function db2_commit($connection): bool {} /** * Returns a persistent connection to a database * @link https://php.net/manual/en/function.db2-pconnect.php * @param string $database- * The database alias in the DB2 client catalog. + * For a cataloged connection to a database, this parameter + * represents the connection alias in the DB2 client catalog. * - * @param string $username- * The username with which you are connecting to the database. + * + * For an uncataloged connection to a database, + * this parameter represents a complete DSN in the following format: + * DRIVER=driver;DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;UID=username;PWD=password; + * + * @param string|null $username+ * The username with which you are connecting to the database, or null if + * the $database parameter contains a DSN which already provides the username for + * the connection. * - * @param string $password- * The password with which you are connecting to the database. + * @param string|null $password + * The password with which you are connecting to the database, or null if + * the $database parameter contains a DSN which already provides the password for + * the connection. * * @param array $options* An associative array of connection options that affect the behavior * of the connection, where valid array keys include: * autocommit + * ** Passing the DB2_AUTOCOMMIT_ON value turns * autocommit on for this connection handle. @@ -93,7 +95,7 @@ function db2_commit ($connection) {} * password parameters. If the connection attempt fails, * db2_pconnect returns false. */ -function db2_pconnect ($database, $username, $password, array $options = null) {} +function db2_pconnect(#[\SensitiveParameter] string $database, ?string $username, #[\SensitiveParameter] ?string $password, array $options = []) {} /** * Returns or sets the AUTOCOMMIT state for a database connection @@ -103,12 +105,16 @@ function db2_pconnect ($database, $username, $password, array $options = null) { * db2_connect or db2_pconnect. * * @param int $value- * One of the following constants: - * DB2_AUTOCOMMIT_OFF + * One of the following constants: *+ * DB2_AUTOCOMMIT_OFF * Turns AUTOCOMMIT off. * - * @return mixed When db2_autocommit receives only the + *+ * DB2_AUTOCOMMIT_ON + * Turns AUTOCOMMIT on. + * + * @return int|boolWhen db2_autocommit receives only the * connection parameter, it returns the current state * of AUTOCOMMIT for the requested connection as an integer value. A value of * 0 indicates that AUTOCOMMIT is off, while a value of 1 indicates that @@ -119,9 +125,9 @@ function db2_pconnect ($database, $username, $password, array $options = null) { * connection parameter and * autocommit parameter, it attempts to set the * AUTOCOMMIT state of the requested connection to the corresponding state. - * true on success or false on failure. + * true on success or false on failure. */ -function db2_autocommit ($connection, $value = null) {} +function db2_autocommit($connection, int $value = null): int|bool {} /** * Binds a PHP variable to an SQL statement parameter @@ -135,10 +141,10 @@ function db2_autocommit ($connection, $value = null) {} * @param int $data_type * @param int $precision* Specifies the precision with which the variable should be bound to the - * database. This parameter can also be used for retrieving XML output values - * from stored procedures. A non-negative value specifies the maximum size of - * the XML data that will be retrieved from the database. If this parameter - * is not used, a default of 1MB will be assumed for retrieving the XML + * database. This parameter can also be used for retrieving XML output values + * from stored procedures. A non-negative value specifies the maximum size of + * the XML data that will be retrieved from the database. If this parameter + * is not used, a default of 1MB will be assumed for retrieving the XML * output value from the stored procedure. * * @param int $scale@@ -147,7 +153,7 @@ function db2_autocommit ($connection, $value = null) {} * * @return bool true on success or false on failure. */ -function db2_bind_param ($stmt, $parameter_number, $variable_name, $parameter_type = null, $data_type = null, $precision = null, $scale = null) {} +function db2_bind_param($stmt, int $parameter_number, string $variable_name, int $parameter_type = DB2_PARAM_IN, int $data_type = 0, int $precision = -1, int $scale = 0): bool {} /** * Closes a database connection @@ -157,7 +163,7 @@ function db2_bind_param ($stmt, $parameter_number, $variable_name, $parameter_ty * * @return bool true on success or false on failure. */ -function db2_close ($connection) {} +function db2_close($connection): bool {} /** * Returns a result set listing the columns and associated privileges for a table @@ -165,16 +171,16 @@ function db2_close ($connection) {} * @param resource $connection* A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. * - * @param string $qualifier+ * @param string|null $qualifier * A qualifier for DB2 databases running on OS/390 or z/OS servers. For - * other databases, pass &null; or an empty string. + * other databases, pass null or an empty string. * - * @param string $schema- * The schema which contains the tables. To match all schemas, pass &null; + * @param string|null $schema + * The schema which contains the tables. To match all schemas, pass null * or an empty string. * - * @param string $table_name - * @param string $column_name + * @param string|null $table_name + * @param string|null $column_name * @return resource|false a statement resource with a result set containing rows describing * the column privileges for columns matching the specified parameters. The * rows are composed of the following columns: @@ -218,9 +224,9 @@ function db2_close ($connection) {} * other users. |
* |||||||||||
DECIMAL_DIGITS | *- * The scale of the column, or &null; where scale is not applicable. + * The scale of the column, or null where scale is not applicable. * | *|||||||||||
* An integer value of either 10 (representing * an exact numeric data type), 2 (representing an - * approximate numeric data type), or &null; (representing a data type for + * approximate numeric data type), or null (representing a data type for * which radix is not applicable). * | *SQL_DATETIME_SUB | ** Returns an integer value representing a datetime subtype code, - * or &null; for SQL data types to which this does not apply. + * or null for SQL data types to which this does not apply. * | * *||||||||||
CHAR_OCTET_LENGTH | ** Maximum length in octets for a character data type column, which - * matches COLUMN_SIZE for single-byte character set data, or &null; for + * matches COLUMN_SIZE for single-byte character set data, or null for * non-character data types. * | *The name of the primary key. | * */ -function db2_primary_keys ($connection, $qualifier, $schema, $table_name) {} +function db2_primary_keys($connection, ?string $qualifier, ?string $schema, string $table_name) {} -function db2_primarykeys () {} +function db2_primarykeys() {} /** * Returns a result set listing stored procedure parameters @@ -508,9 +514,9 @@ function db2_primarykeys () {} * @param resource $connection||||||||||
PROCEDURE_CAT | - *The catalog that contains the procedure. The value is &null; if + * | The catalog that contains the procedure. The value is null if * this table does not have catalogs. | *||||||||||
DECIMAL_DIGITS | *- * The scale of the parameter, or &null; where scale is not applicable. + * The scale of the parameter, or null where scale is not applicable. * | *|||||||||||
* An integer value of either 10 (representing * an exact numeric data type), 2 (representing an - * approximate numeric data type), or &null; (representing a data type for + * approximate numeric data type), or null (representing a data type for * which radix is not applicable). * | *SQL_DATETIME_SUB | ** Returns an integer value representing a datetime subtype code, - * or &null; for SQL data types to which this does not apply. + * or null for SQL data types to which this does not apply. * | * *||||||||||
CHAR_OCTET_LENGTH | ** Maximum length in octets for a character data type parameter, which - * matches COLUMN_SIZE for single-byte character set data, or &null; for + * matches COLUMN_SIZE for single-byte character set data, or null for * non-character data types. * | *IS_NULLABLE | ** A string value where 'YES' means that the parameter accepts or - * returns &null; values and 'NO' means that the parameter does not - * accept or return &null; values. + * returns null values and 'NO' means that the parameter does not + * accept or return null values. * | * */ -function db2_procedure_columns ($connection, $qualifier, $schema, $procedure, $parameter) {} +function db2_procedure_columns($connection, ?string $qualifier, string $schema, string $procedure, ?string $parameter) {} -function db2_procedurecolumns () {} +function db2_procedurecolumns() {} /** * Returns a result set listing the stored procedures registered in a database @@ -666,9 +672,9 @@ function db2_procedurecolumns () {} * @param resource $connection|||||||||
PROCEDURE_CAT | - *The catalog that contains the procedure. The value is &null; if + * | The catalog that contains the procedure. The value is null if * this table does not have catalogs. | *||||||||||
DECIMAL_DIGITS | *- * The scale of the column, or &null; where scale is not applicable. + * The scale of the column, or null where scale is not applicable. * | *|||||||||||
* An integer value of either 10 (representing * an exact numeric data type), 2 (representing an - * approximate numeric data type), or &null; (representing a data type for + * approximate numeric data type), or null (representing a data type for * which radix is not applicable). * | *Always returns 1. | * */ -function db2_special_columns ($connection, $qualifier, $schema, $table_name, $scope) {} +function db2_special_columns($connection, ?string $qualifier, string $schema, string $table_name, int $scope) {} -function db2_specialcolumns () {} +function db2_specialcolumns() {} /** * Returns a result set listing the index and statistics for a table @@ -858,34 +864,35 @@ function db2_specialcolumns () {} * @param resource $connection
Column name | *Description | *|||||||||||
TABLE_CAT | - *The catalog that contains the table. The value is &null; if + * | The catalog that contains the table. The value is null if * this table does not have catalogs. | *||||||||||
NON_UNIQUE | *
+ *
|
* |||||||||||
* * An integer value representing the type of information contained in - * this row of the result set: + * this row of the result set: + *
|
* ||||||||||||
ORDINAL_POSITION | - *The 1-indexed position of the column in the index. &null; if + * | The 1-indexed position of the column in the index. null if * the row contains statistics information about the table itself. | *||||||||||
COLUMN_NAME | - *The name of the column in the index. &null; if the row + * | The name of the column in the index. null if the row * contains statistics information about the table itself. | *||||||||||
* A if the column is sorted in ascending order, * D if the column is sorted in descending order, - * &null; if the row contains statistics information about the table + * null if the row contains statistics information about the table * itself. * | *||||||||||||
FILTER_CONDITION | - *Always returns &null;. | + *Always returns null. | *
* A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. *
- * @param string $qualifier+ * @param string|null $qualifier
* A qualifier for DB2 databases running on OS/390 or z/OS servers. For - * other databases, pass &null; or an empty string. + * other databases, pass null or an empty string. *
- * @param string $schema+ * @param string|null $schema
* The schema which contains the tables. This parameter accepts a * search pattern containing _ and % * as wildcards. *
- * @param string $table_name+ * @param string|null $table_name
* The name of the table. This parameter accepts a search pattern * containing _ and % as wildcards. *
@@ -1044,7 +1054,7 @@ function db2_statistics ($connection, $qualifier, $schema, $table_name, $unique) * ** A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. *
- * @param string $qualifier+ * @param string|null $qualifier
* A qualifier for DB2 databases running on OS/390 or z/OS servers. For - * other databases, pass &null; or an empty string. + * other databases, pass null or an empty string. *
- * @param string $schema+ * @param string|null $schema
* The schema which contains the tables. This parameter accepts a * search pattern containing _ and % * as wildcards. *
- * @param string $table_name - * @param string $table_type + * @param string|null $table_name + * @param string|null $table_type * @return resource|false A statement resource with a result set containing rows describing * the tables that match the specified parameters. The rows are composed of * the following columns: @@ -1109,7 +1119,7 @@ function db2_tableprivileges () {} * ** Passing the DB2_FORWARD_ONLY value requests a * forward-only cursor for this SQL statement. This is the default @@ -1162,7 +1173,7 @@ function db2_tables ($connection, $qualifier = null, $schema = null, $table_name * @return resource|false A statement resource if the SQL statement was issued successfully, * or false if the database failed to execute the SQL statement. */ -function db2_exec ($connection, $statement, array $options = null) {} +function db2_exec($connection, string $statement, array $options = []) {} /** * Prepares an SQL statement to be executed @@ -1179,7 +1190,8 @@ function db2_exec ($connection, $statement, array $options = null) {} * parameter to request a scrollable cursor on database servers that * support this functionality. * cursor - *
+ *
+ * * Passing the DB2_FORWARD_ONLY value requests a * forward-only cursor for this SQL statement. This is the default * type of cursor, and it is supported by all database servers. It is @@ -1197,7 +1209,7 @@ function db2_exec ($connection, $statement, array $options = null) {} * returned an error. You can determine which error was returned by calling * db2_stmt_error or db2_stmt_errormsg. */ -function db2_prepare ($connection, $statement, array $options = null) {} +function db2_prepare($connection, string $statement, array $options = []) {} /** * Executes a prepared SQL statement @@ -1211,23 +1223,23 @@ function db2_prepare ($connection, $statement, array $options = null) {} * * @return bool true on success or false on failure. */ -function db2_execute ($stmt, array $parameters = null) {} +function db2_execute($stmt, array $parameters = []): bool {} /** * Returns a string containing the last SQL statement error message * @link https://php.net/manual/en/function.db2-stmt-errormsg.php - * @param resource $stmt- * A valid statement resource. + * @param resource|null $stmt
+ * A valid statement resource or NULL. *
* @return string a string containing the error message and SQLCODE value for the * last error that occurred issuing an SQL statement. */ -function db2_stmt_errormsg ($stmt = null) {} +function db2_stmt_errormsg($stmt = null) {} /** * Returns the last connection error message and SQLCODE value * @link https://php.net/manual/en/function.db2-conn-errormsg.php - * @param resource $connection+ * @param resource|null $connection
* A connection resource associated with a connection that initially * succeeded, but which over time became invalid. *
@@ -1236,12 +1248,12 @@ function db2_stmt_errormsg ($stmt = null) {} * connection attempt, db2_conn_errormsg returns an empty * string. */ -function db2_conn_errormsg ($connection = null) {} +function db2_conn_errormsg($connection = null) {} /** * Returns a string containing the SQLSTATE returned by the last connection attempt * @link https://php.net/manual/en/function.db2-conn-error.php - * @param resource $connection+ * @param resource|null $connection
* A connection resource associated with a connection that initially * succeeded, but which over time became invalid. *
@@ -1249,17 +1261,17 @@ function db2_conn_errormsg ($connection = null) {} * Returns an empty string if there is no error associated with the last * connection attempt. */ -function db2_conn_error ($connection = null) {} +function db2_conn_error($connection = null) {} /** * Returns a string containing the SQLSTATE returned by an SQL statement * @link https://php.net/manual/en/function.db2-stmt-error.php - * @param resource $stmt- * A valid statement resource. + * @param resource|null $stmt
+ * A valid statement resource or NULL. *
* @return string a string containing an SQLSTATE value. */ -function db2_stmt_error ($stmt = null) {} +function db2_stmt_error($stmt = null) {} /** * Requests the next result set from a stored procedure @@ -1272,7 +1284,7 @@ function db2_stmt_error ($stmt = null) {} * stored procedure returned another result set. Returns false if the stored * procedure did not return another result set. */ -function db2_next_result ($stmt) {} +function db2_next_result($stmt) {} /** * Returns the number of fields contained in a result set @@ -1284,7 +1296,7 @@ function db2_next_result ($stmt) {} * set associated with the specified statement resource. Returns false if * the statement resource is not a valid input value. */ -function db2_num_fields ($stmt) {} +function db2_num_fields($stmt): int|false {} /** * Returns the number of rows affected by an SQL statement @@ -1292,10 +1304,10 @@ function db2_num_fields ($stmt) {} * @param resource $stmt* A valid stmt resource containing a result set. *
- * @return int the number of rows affected by the last SQL statement issued by - * the specified statement handle. + * @return int|false the number of rows affected by the last SQL statement issued by + * the specified statement handle, or false in case of failure. */ -function db2_num_rows ($stmt) {} +function db2_num_rows($stmt): int|false {} /** * Returns the name of the column in the result set @@ -1303,7 +1315,7 @@ function db2_num_rows ($stmt) {} * @param resource $stmt* Specifies a statement resource containing a result set. *
- * @param mixed $column+ * @param int|string $column
* Specifies the column in the result set. This can either be an integer * representing the 0-indexed position of the column, or a string * containing the name of the column. @@ -1312,7 +1324,7 @@ function db2_num_rows ($stmt) {} * specified column does not exist in the result * set, db2_field_name returns false. */ -function db2_field_name ($stmt, $column) {} +function db2_field_name($stmt, int|string $column): string|false {} /** * Returns the maximum number of bytes required to display a column @@ -1320,7 +1332,7 @@ function db2_field_name ($stmt, $column) {} * @param resource $stmt
* Specifies a statement resource containing a result set. *
- * @param mixed $column+ * @param int|string $column
* Specifies the column in the result set. This can either be an integer * representing the 0-indexed position of the column, or a string * containing the name of the column. @@ -1329,7 +1341,7 @@ function db2_field_name ($stmt, $column) {} * display the specified column. If the column does not exist in the result * set, db2_field_display_size returns false. */ -function db2_field_display_size ($stmt, $column) {} +function db2_field_display_size($stmt, int|string $column): int|false {} /** * Returns the position of the named column in a result set @@ -1337,7 +1349,7 @@ function db2_field_display_size ($stmt, $column) {} * @param resource $stmt
* Specifies a statement resource containing a result set. *
- * @param mixed $column+ * @param int|string $column
* Specifies the column in the result set. This can either be an integer * representing the 0-indexed position of the column, or a string * containing the name of the column. @@ -1346,7 +1358,7 @@ function db2_field_display_size ($stmt, $column) {} * the result set. If the specified column does not exist in the result set, * db2_field_num returns false. */ -function db2_field_num ($stmt, $column) {} +function db2_field_num($stmt, int|string $column): int|false {} /** * Returns the precision of the indicated column in a result set @@ -1354,7 +1366,7 @@ function db2_field_num ($stmt, $column) {} * @param resource $stmt
* Specifies a statement resource containing a result set. *
- * @param mixed $column+ * @param int|string $column
* Specifies the column in the result set. This can either be an integer * representing the 0-indexed position of the column, or a string * containing the name of the column. @@ -1363,7 +1375,7 @@ function db2_field_num ($stmt, $column) {} * specified column does not exist in the result set, * db2_field_precision returns false. */ -function db2_field_precision ($stmt, $column) {} +function db2_field_precision($stmt, int|string $column): int|false {} /** * Returns the scale of the indicated column in a result set @@ -1371,7 +1383,7 @@ function db2_field_precision ($stmt, $column) {} * @param resource $stmt
* Specifies a statement resource containing a result set. *
- * @param mixed $column+ * @param int|string $column
* Specifies the column in the result set. This can either be an integer * representing the 0-indexed position of the column, or a string * containing the name of the column. @@ -1380,7 +1392,7 @@ function db2_field_precision ($stmt, $column) {} * specified column does not exist in the result set, * db2_field_scale returns false. */ -function db2_field_scale ($stmt, $column) {} +function db2_field_scale($stmt, int|string $column): int|false {} /** * Returns the data type of the indicated column in a result set @@ -1388,7 +1400,7 @@ function db2_field_scale ($stmt, $column) {} * @param resource $stmt
* Specifies a statement resource containing a result set. *
- * @param mixed $column+ * @param int|string $column
* Specifies the column in the result set. This can either be an integer * representing the 0-indexed position of the column, or a string * containing the name of the column. @@ -1397,7 +1409,7 @@ function db2_field_scale ($stmt, $column) {} * If the specified column does not exist in the result set, * db2_field_type returns false. */ -function db2_field_type ($stmt, $column) {} +function db2_field_type($stmt, int|string $column): string|false {} /** * Returns the width of the current value of the indicated column in a result set @@ -1405,7 +1417,7 @@ function db2_field_type ($stmt, $column) {} * @param resource $stmt
* Specifies a statement resource containing a result set. *
- * @param mixed $column+ * @param int|string $column
* Specifies the column in the result set. This can either be an integer * representing the 0-indexed position of the column, or a string * containing the name of the column. @@ -1415,7 +1427,7 @@ function db2_field_type ($stmt, $column) {} * exist in the result set, db2_field_width returns * false. */ -function db2_field_width ($stmt, $column) {} +function db2_field_width($stmt, int|string $column): int|false {} /** * Returns the cursor type used by a statement resource @@ -1427,7 +1439,7 @@ function db2_field_width ($stmt, $column) {} * resource uses a forward-only cursor or DB2_SCROLLABLE if * the statement resource uses a scrollable cursor. */ -function db2_cursor_type ($stmt) {} +function db2_cursor_type($stmt): int {} /** * Rolls back a transaction @@ -1438,7 +1450,7 @@ function db2_cursor_type ($stmt) {} *
* @return bool true on success or false on failure. */ -function db2_rollback ($connection) {} +function db2_rollback($connection): bool {} /** * Frees resources associated with the indicated statement resource @@ -1448,7 +1460,7 @@ function db2_rollback ($connection) {} * * @return bool true on success or false on failure. */ -function db2_free_stmt ($stmt) {} +function db2_free_stmt($stmt): bool {} /** * Returns a single column from a row in the result set @@ -1456,14 +1468,14 @@ function db2_free_stmt ($stmt) {} * @param resource $stmt* A valid stmt resource. *
- * @param mixed $column+ * @param int|string $column
* Either an integer mapping to the 0-indexed field in the result set, or * a string matching the name of the column. *
* @return mixed the value of the requested field if the field exists in the result * set. Returns NULL if the field does not exist, and issues a warning. */ -function db2_result ($stmt, $column) {} +function db2_result($stmt, int|string $column): mixed {} /** * Sets the result set pointer to the next row or requested row @@ -1478,7 +1490,7 @@ function db2_result ($stmt, $column) {} * @return bool true if the requested row exists in the result set. Returns * false if the requested row does not exist in the result set. */ -function db2_fetch_row ($stmt, $row_number = null) {} +function db2_fetch_row($stmt, int $row_number = null) {} /** * Returns an array, indexed by column name, representing a row in a result set @@ -1496,7 +1508,7 @@ function db2_fetch_row ($stmt, $row_number = null) {} * there are no rows left in the result set, or if the row requested by * row_number does not exist in the result set. */ -function db2_fetch_assoc ($stmt, $row_number = null) {} +function db2_fetch_assoc($stmt, int $row_number = null): array|false {} /** * Returns an array, indexed by column position, representing a row in a result set @@ -1514,7 +1526,7 @@ function db2_fetch_assoc ($stmt, $row_number = null) {} * there are no rows left in the result set, or if the row requested by * row_number does not exist in the result set. */ -function db2_fetch_array ($stmt, $row_number = null) {} +function db2_fetch_array($stmt, int $row_number = null): array|false {} /** * Returns an array, indexed by both column name and position, representing a row in a result set @@ -1533,7 +1545,7 @@ function db2_fetch_array ($stmt, $row_number = null) {} * in the result set, or if the row requested by * row_number does not exist in the result set. */ -function db2_fetch_both ($stmt, $row_number = null) {} +function db2_fetch_both($stmt, int $row_number = null): array|false {} /** * Frees resources associated with a result set @@ -1543,7 +1555,7 @@ function db2_fetch_both ($stmt, $row_number = null) {} * * @return bool true on success or false on failure. */ -function db2_free_result ($stmt) {} +function db2_free_result($stmt): bool {} /** * Set options for connection or statement resources @@ -1584,9 +1596,9 @@ function db2_free_result ($stmt) {} * * @return bool true on success or false on failure. */ -function db2_set_option ($resource, array $options, $type) {} +function db2_set_option($resource, array $options, int $type): bool {} -function db2_setoption () {} +function db2_setoption(): bool {} /** * Returns an object with properties representing columns in the fetched row @@ -1599,12 +1611,12 @@ function db2_setoption () {} * parameter results in a PHP warning if the result set uses a * forward-only cursor. * - * @return object|false An object representing a single row in the result set. The + * @return stdClass|false An object representing a single row in the result set. The * properties of the object map to the names of the columns in the result set. * ** The IBM DB2, Cloudscape, and Apache Derby database servers typically fold - * column names to upper-case, so the object properties will reflect that case. + * column names to upper-case, so the object properties will reflect that case. *
** If your SELECT statement calls a scalar function to modify the value @@ -1616,7 +1628,7 @@ function db2_setoption () {} *
* Returns false if no row was retrieved. */ -function db2_fetch_object ($stmt, $row_number = null) {} +function db2_fetch_object($stmt, int $row_number = null): stdClass|false {} /** * Returns an object with properties that describe the DB2 database server @@ -1624,9 +1636,9 @@ function db2_fetch_object ($stmt, $row_number = null) {} * @param resource $connection
* Specifies an active DB2 client connection. *
- * @return object|false An object on a successful call. Returns false on failure. + * @return stdClass|false An object on a successful call. Returns false on failure. */ -function db2_server_info ($connection) {} +function db2_server_info($connection): stdClass|false {} /** * Returns an object with properties that describe the DB2 database client @@ -1634,23 +1646,23 @@ function db2_server_info ($connection) {} * @param resource $connection* Specifies an active DB2 client connection. *
- * @return object|false An object on a successful call. Returns false on failure. + * @return stdClass|false An object on a successful call. Returns false on failure. */ -function db2_client_info ($connection) {} +function db2_client_info($connection): stdClass|false {} /** * Used to escape certain characters * @link https://php.net/manual/en/function.db2-escape-string.php * @param string $string_literal- * The string that contains special characters that need to be modified. - * Characters that are prepended with a backslash are \x00, - * \n, \r, \, + * The string that contains special characters that need to be modified. + * Characters that are prepended with a backslash are \x00, + * \n, \r, \, * ', " and \x1a. *
- * @return string string_literal with the special characters + * @return string string_literal with the special characters * noted above prepended with backslashes. */ -function db2_escape_string ($string_literal) {} +function db2_escape_string(string $string_literal): string {} /** * Gets a user defined size of LOB files with each invocation @@ -1667,7 +1679,7 @@ function db2_escape_string ($string_literal) {} * @return string|false The amount of data the user specifies. Returns * false if the data cannot be retrieved. */ -function db2_lob_read ($stmt, $colnum, $length) {} +function db2_lob_read($stmt, int $colnum, int $length): string|false {} /** * Retrieves an option value for a statement resource or a connection resource @@ -1679,42 +1691,40 @@ function db2_lob_read ($stmt, $colnum, $length) {} * db2_pconnect. * * @param string $option- * A valid statement or connection options. The following new options are available - * as of ibm_db2 version 1.6.0. They provide useful tracking information + * A valid statement or connection options. The following new options are available + * as of ibm_db2 version 1.6.0. They provide useful tracking information * that can be set during execution with db2_get_option. - * Note + *
*- * Prior versions of ibm_db2 do not support these new options. + * Note: Prior versions of ibm_db2 do not support these new options. *
*- * When the value in each option is being set, some servers might not handle + * When the value in each option is being set, some servers might not handle * the entire length provided and might truncate the value. *
*- * To ensure that the data specified in each option is converted correctly - * when transmitted to a host system, use only the characters A through Z, + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, * 0 through 9, and the underscore (_) or period (.). *
- * userid *- * SQL_ATTR_INFO_USERID - A pointer to a null-terminated - * character string used to identify the client user ID sent to the host + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host * database server when using DB2 Connect. - * Note + *
*- * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. - * This user-id is not to be confused with the authentication user-id, it is for + * Note: DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for * identification purposes only and is not used for any authorization. *
- * * @return string|false The current setting of the connection attribute provided on success * or false on failure. */ -function db2_get_option ($resource, $option) {} +function db2_get_option($resource, string $option): string|false {} /** - * @link https://php.net/manual/en/function.db2-last-insert-id.php * Returns the auto generated ID of the last insert query that successfully executed on this connection. + * @link https://php.net/manual/en/function.db2-last-insert-id.php * The result of this function is not affected by any of the following: ** The input charset. *
- * @param string $out_charset+ * @param string $to_encoding
* The output charset. *
*@@ -21,14 +23,13 @@ * discarded. Otherwise, str is cut from the first * illegal character and an E_NOTICE is generated. *
- * @param string $str+ * @param string $string
* The string to be converted. *
* @return string|false the converted string or FALSE on failure. - * @since 4.0.5 - * @since 5.0 */ -function iconv ($in_charset, $out_charset, $str) {} +#[Pure] +function iconv(string $from_encoding, string $to_encoding, string $string): string|false {} /** * Convert character encoding as output buffer handler @@ -37,10 +38,9 @@ function iconv ($in_charset, $out_charset, $str) {} * @param int $status * @return string See ob_start for information about this handler * return values. - * @since 4.0.5 - * @since 5.0 */ -function ob_iconv_handler ($contents, $status) {} +#[Pure] +function ob_iconv_handler(string $contents, int $status): string {} /** * Retrieve internal configuration variables of iconv extension @@ -52,17 +52,17 @@ function ob_iconv_handler ($contents, $status) {} * output_encoding * internal_encoding * - * @return mixed the current value of the internal configuration variable if + * @return string|string[]|false the current value of the internal configuration variable if * successful or FALSE on failure. - * ** If type is omitted or set to "all", * iconv_get_encoding returns an array that * stores all these variables. - * @since 4.0.5 - * @since 5.0 + *
*/ -function iconv_get_encoding ($type = "all") {} +#[Pure] +#[ArrayShape(["input_encoding" => "string", "output_encoding" => "string", "internal_encoding" => "string"])] +function iconv_get_encoding(string $type = "all"): array|string|false {} /** * Set current setting for character encoding conversion @@ -73,35 +73,33 @@ function iconv_get_encoding ($type = "all") {} * output_encoding * internal_encoding * - * @param string $charset+ * @param string $encoding
* The character set. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0.5 - * @since 5.0 */ -function iconv_set_encoding ($type, $charset) {} +function iconv_set_encoding(string $type, string $encoding): bool {} /** * Returns the character count of string * @link https://php.net/manual/en/function.iconv-strlen.php - * @param string $str+ * @param string $string
* The string. *
- * @param string $charset [optional]+ * @param string|null $encoding
* If charset parameter is omitted, * str is assumed to be encoded in * iconv.internal_encoding. *
* @return int|false the character count of str, as an integer. False on error. - * @since 5.0 */ -function iconv_strlen ($str, $charset = 'ini_get("iconv.internal_encoding")') {} +#[Pure] +function iconv_strlen(string $string, ?string $encoding = null): int|false {} /** * Cut out part of a string * @link https://php.net/manual/en/function.iconv-substr.php - * @param string $str+ * @param string $string
* The original string. *
* @param int $offset@@ -116,7 +114,7 @@ function iconv_strlen ($str, $charset = 'ini_get("iconv.internal_encoding")') {} * at the position, offset characters * away from the end of str. *
- * @param int $length [optional]+ * @param int|null $length [optional]
* If length is given and is positive, the return * value will contain at most length characters * of the portion that begins at offset @@ -131,7 +129,7 @@ function iconv_strlen ($str, $charset = 'ini_get("iconv.internal_encoding")') {} * In case offset is also negative, the start position * is calculated beforehand according to the rule explained above. *
- * @param string $charset [optional]+ * @param string|null $encoding
* If charset parameter is omitted, * string are assumed to be encoded in * iconv.internal_encoding. @@ -145,13 +143,13 @@ function iconv_strlen ($str, $charset = 'ini_get("iconv.internal_encoding")') {} *
* @return string|false the portion of str specified by the * offset and length parameters. - * ** If str is shorter than offset * characters long, FALSE will be returned. - * @since 5.0 + *
*/ -function iconv_substr ($str, $offset, $length = 'iconv_strlen($str, $charset)', $charset = 'ini_get("iconv.internal_encoding")') {} +#[Pure] +function iconv_substr(string $string, int $offset, ?int $length, ?string $encoding = null): string|false {} /** * Finds position of first occurrence of a needle within a haystack @@ -166,20 +164,20 @@ function iconv_substr ($str, $offset, $length = 'iconv_strlen($str, $charset)', * The optional offset parameter specifies * the position from which the search should be performed. * - * @param string $charset [optional]+ * @param string|null $encoding
* If charset parameter is omitted, * string are assumed to be encoded in * iconv.internal_encoding. *
- * @return int|false the numeric position of the first occurrence of + * @return int<0,max>|false the numeric position of the first occurrence of * needle in haystack. - * ** If needle is not found, * iconv_strpos will return FALSE. - * @since 5.0 + *
*/ -function iconv_strpos ($haystack, $needle, $offset = 0, $charset = 'ini_get("iconv.internal_encoding")') {} +#[Pure] +function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {} /** * Finds the last occurrence of a needle within a haystack @@ -190,20 +188,20 @@ function iconv_strpos ($haystack, $needle, $offset = 0, $charset = 'ini_get("ico * @param string $needle* The searched substring. *
- * @param string $charset [optional]+ * @param string|null $encoding
* If charset parameter is omitted, * string are assumed to be encoded in * iconv.internal_encoding. *
* @return int|false the numeric position of the last occurrence of * needle in haystack. - * ** If needle is not found, * iconv_strrpos will return FALSE. - * @since 5.0 + *
*/ -function iconv_strrpos ($haystack, $needle, $charset = 'ini_get("iconv.internal_encoding")') {} +#[Pure] +function iconv_strrpos(string $haystack, string $needle, ?string $encoding = null): int|false {} /** * Composes a MIME header field @@ -214,7 +212,7 @@ function iconv_strrpos ($haystack, $needle, $charset = 'ini_get("iconv.internal_ * @param string $field_value* The field value. *
- * @param array $preferences [optional]+ * @param array $options
* You can control the behaviour of iconv_mime_encode * by specifying an associative array that contains configuration items * to the optional third parameter preferences. @@ -302,14 +300,14 @@ function iconv_strrpos ($haystack, $needle, $charset = 'ini_get("iconv.internal_ *
* @return string|false an encoded MIME field on success, * or FALSE if an error occurs during the encoding. - * @since 5.0 */ -function iconv_mime_encode ($field_name, $field_value, array $preferences = null) {} +#[Pure] +function iconv_mime_encode(string $field_name, string $field_value, array $options = []): string|false {} /** * Decodes a MIME header field * @link https://php.net/manual/en/function.iconv-mime-decode.php - * @param string $encoded_header+ * @param string $string
* The encoded header, as a string. *
* @param int $mode [optional]@@ -346,7 +344,7 @@ function iconv_mime_encode ($field_name, $field_value, array $preferences = null * *
+ * @param string|null $encoding
* The optional charset parameter specifies the * character set to represent the result by. If omitted, * iconv.internal_encoding @@ -354,14 +352,14 @@ function iconv_mime_encode ($field_name, $field_value, array $preferences = null *
* @return string|false a decoded MIME field on success, * or FALSE if an error occurs during the decoding. - * @since 5.0 */ -function iconv_mime_decode ($encoded_header, $mode = 0, $charset = 'ini_get("iconv.internal_encoding")') {} +#[Pure] +function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = null): string|false {} /** * Decodes multiple MIME header fields at once * @link https://php.net/manual/en/function.iconv-mime-decode-headers.php - * @param string $encoded_headers+ * @param string $headers
* The encoded headers, as a string. *
* @param int $mode [optional]
@@ -369,8 +367,9 @@ function iconv_mime_decode ($encoded_header, $mode = 0, $charset = 'ini_get("ico
* iconv_mime_decode_headers encounters a malformed
* MIME header field. You can specify any combination
* of the following bitmasks.
+ *
+ * Bitmasks acceptable to iconv_mime_decode_headers
Value | *Constant | @@ -397,8 +396,7 @@ function iconv_mime_decode ($encoded_header, $mode = 0, $charset = 'ini_get("ico * *
+ * @param string|null $encoding
* The optional charset parameter specifies the * character set to represent the result by. If omitted, * iconv.internal_encoding @@ -408,41 +406,39 @@ function iconv_mime_decode ($encoded_header, $mode = 0, $charset = 'ini_get("ico * MIME header fields specified by * encoded_headers on success, or FALSE * if an error occurs during the decoding. - *
** Each key of the return value represents an individual * field name and the corresponding element represents a field value. * If more than one field of the same name are present, * iconv_mime_decode_headers automatically incorporates * them into a numerically indexed array in the order of occurrence. - * @since 5.0 + *
*/ -function iconv_mime_decode_headers ($encoded_headers, $mode = 0, $charset = 'ini_get("iconv.internal_encoding")') {} - +#[Pure] +function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $encoding = null): array|false {} /** * string * @link https://php.net/manual/en/iconv.constants.php */ -define ('ICONV_IMPL', "glibc"); +define('ICONV_IMPL', "libiconv"); /** * string * @link https://php.net/manual/en/iconv.constants.php */ -define ('ICONV_VERSION', 2.17); +define('ICONV_VERSION', 2.17); /** * integer * @link https://php.net/manual/en/iconv.constants.php */ -define ('ICONV_MIME_DECODE_STRICT', 1); +define('ICONV_MIME_DECODE_STRICT', 1); /** * integer * @link https://php.net/manual/en/iconv.constants.php */ -define ('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); +define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); // End of iconv v. -?> diff --git a/igbinary/igbinary.php b/igbinary/igbinary.php index 78b482885..c0c39c43b 100644 --- a/igbinary/igbinary.php +++ b/igbinary/igbinary.php @@ -18,7 +18,7 @@ * Likewise, when the object is restored using unserialize() the __wakeup member function is called. * * @param mixed $value The value to be serialized. - * @return string Returns a string containing a byte-stream representation of value that can be stored anywhere. + * @return string|null Returns a string containing a byte-stream representation of value that can be stored anywhere or NULL on error. * @link https://secure.php.net/serialize PHP default serialize */ function igbinary_serialize($value) {} @@ -31,11 +31,10 @@ function igbinary_serialize($value) {} * In case the passed string is not unserializeable, NULL is returned and E_WARNING is issued. * * @param string $str The serialized string. - * @return mixed The converted value is returned, and can be a boolean, integer, float, string, array or object. + * @return mixed|false The converted value is returned, and can be a boolean, integer, float, string, array, object or false by empty string input. * @link https://secure.php.net/manual/en/function.unserialize.php PHP default unserialize * @link https://secure.php.net/~helly/php/ext/spl/interfaceSerializable.html Serializable */ function igbinary_unserialize($str) {} // End of igbinary v.1.0.0 -?> diff --git a/imagick/imagick.php b/imagick/imagick.php index 12c889537..4c0d5a699 100644 --- a/imagick/imagick.php +++ b/imagick/imagick.php @@ -2,6215 +2,6718 @@ // Start of imagick v.3.4.3 -class ImagickException extends Exception { +use JetBrains\PhpStorm\ArrayShape; +use JetBrains\PhpStorm\Deprecated; +use JetBrains\PhpStorm\Pure; + +class ImagickException extends Exception {} + +class ImagickDrawException extends Exception {} + +class ImagickPixelIteratorException extends Exception {} + +class ImagickPixelException extends Exception {} + +class ImagickKernelException extends Exception {} + +/** + * @method Imagick clone() (PECL imagick 2.0.0)+ * One of the layer method constants. + *
+ * @return Imagick TRUE on success. + * @throws ImagickException on error. + */ + public function compareImageLayers($method) {} + + /** + * (PECL imagick 2.0.0)+ * A string containing the image. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function pingImageBlob($image) {} + + /** + * (PECL imagick 2.0.0)+ * An open filehandle to the image. + *
+ * @param string $fileName [optional]+ * Optional filename for this image. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function pingImageFile($filehandle, $fileName = null) {} + + /** + * (PECL imagick 2.0.0)+ * By default target must match a particular pixel color exactly. + * However, in many cases two colors may differ by a small amount. + * The fuzz member of image defines how much tolerance is acceptable + * to consider two colors as the same. This parameter represents the variation + * on the quantum range. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function trimImage($fuzz) {} + + /** + * (PECL imagick 2.0.0)+ * The amplitude of the wave. + *
+ * @param float $length+ * The length of the wave. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function waveImage($amplitude, $length) {} + + /** + * (PECL imagick 2.0.0)+ * The black point. + *
+ * @param float $whitePoint+ * The white point + *
+ * @param int $x+ * X offset of the ellipse + *
+ * @param int $y+ * Y offset of the ellipse + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function vignetteImage($blackPoint, $whitePoint, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * True activates the matte channel and false disables it. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageMatte($matte) {} + + /** + * Adaptively resize image with data dependent triangulation + * + * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.+ * The radius of the Gaussian, in pixels, not counting the center pixel + *
+ * @param float $sigma+ * The standard deviation of the Gaussian, in pixels. + *
+ * @param float $angle+ * Apply the effect along this angle. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function sketchImage($radius, $sigma, $angle) {} + + /** + * (PECL imagick 2.0.0)+ * A value other than zero shades the intensity of each pixel. + *
+ * @param float $azimuth+ * Defines the light source direction. + *
+ * @param float $elevation+ * Defines the light source direction. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function shadeImage($gray, $azimuth, $elevation) {} + + /** + * (PECL imagick 2.0.0)+ * The width in pixels. + *
+ * @param int $rows+ * The height in pixels. + *
+ * @param int $offset+ * The image offset. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setSizeOffset($columns, $rows, $offset) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the Gaussian, in pixels, not counting the center pixel. + * Provide a value of 0 and the radius will be chosen automagically. + *
+ * @param float $sigma+ * The standard deviation of the Gaussian, in pixels. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function adaptiveBlurImage($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)+ * The black point. + *
+ * @param float $white_point+ * The white point. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Imagick::CHANNEL_ALL. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function contrastStretchImage($black_point, $white_point, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select. + *
+ * @param float $sigma+ * The standard deviation of the Gaussian, in pixels. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function adaptiveSharpenImage($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)+ * The low point + *
+ * @param float $high+ * The high point + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function randomThresholdImage($low, $high, $channel = Imagick::CHANNEL_ALL) {} + + /** + * @param $xRounding + * @param $yRounding + * @param $strokeWidth [optional] + * @param $displace [optional] + * @param $sizeCorrection [optional] + * @throws ImagickException on error. + */ + public function roundCornersImage($xRounding, $yRounding, $strokeWidth, $displace, $sizeCorrection) {} + + /** + * (PECL imagick 2.0.0)+ * x rounding + *
+ * @param float $y_rounding+ * y rounding + *
+ * @param float $stroke_width [optional]+ * stroke width + *
+ * @param float $displace [optional]+ * image displace + *
+ * @param float $size_correction [optional]+ * size correction + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated(replacement: "%class%->roundCornersImage(%parametersList%)")] + public function roundCorners($x_rounding, $y_rounding, $stroke_width = 10.0, $displace = 5.0, $size_correction = -6.0) {} + + /** + * (PECL imagick 2.0.0)+ * The position to set the iterator to + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setIteratorIndex($index) {} + + /** + * (PECL imagick 2.0.0)+ * A crop geometry string. This geometry defines a subregion of the image to crop. + *
+ * @param string $geometry+ * An image geometry string. This geometry defines the final size of the image. + *
+ * @return Imagick TRUE on success. + * @throws ImagickException on error. + */ + public function transformImage($crop, $geometry) {} + + /** + * (PECL imagick 2.0.0)+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully + * transparent. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageOpacity($opacity) {} + + /** + * (PECL imagick 2.2.2)+ * A string containing the name of the threshold dither map to use + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function orderedPosterizeImage($threshold_map, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The polaroid properties + *
+ * @param float $angle+ * The polaroid angle + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function polaroidImage(ImagickDraw $properties, $angle) {} + + /** + * (PECL imagick 2.0.0)+ * name of the property (for example Exif:DateTime) + *
+ * @return string|false a string containing the image property, false if a + * property with the given name does not exist. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageProperty($name) {} + + /** + * (PECL imagick 2.0.0)+ * The method is one of the Imagick::INTERPOLATE_* constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageInterpolateMethod($method) {} + + /** + * (PECL imagick 2.0.0)+ * The image black point + *
+ * @param float $whitePoint+ * The image white point + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function linearStretchImage($blackPoint, $whitePoint) {} + + /** + * (PECL imagick 2.0.0)+ * The new width + *
+ * @param int $height+ * The new height + *
+ * @param int $x+ * X position for the new size + *
+ * @param int $y+ * Y position for the new size + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function extentImage($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * One of the orientation constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageOrientation($orientation) {} + + /** + * (PECL imagick 2.1.0)+ * ImagickPixel object or a string containing the fill color + *
+ * @param float $fuzz+ * The amount of fuzz. For example, set fuzz to 10 and the color red at + * intensities of 100 and 102 respectively are now interpreted as the + * same color for the purposes of the floodfill. + *
+ * @param mixed $bordercolor+ * ImagickPixel object or a string containing the border color + *
+ * @param int $x+ * X start position of the floodfill + *
+ * @param int $y+ * Y start position of the floodfill + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function paintFloodfillImage($fill, $fuzz, $bordercolor, $x, $y, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * Imagick object containing the color lookup table + *
+ * @param int $channel [optional]+ * The Channeltype + * constant. When not supplied, default channels are replaced. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + * @since 2.0.0 + */ + public function clutImage(Imagick $lookup_table, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)+ * The pattern for property names. + *
+ * @param bool $only_names [optional]+ * Whether to return only property names. If FALSE then also the values are returned + *
+ * @return array an array containing the image properties or property names. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageProperties($pattern = "*", $only_names = true) {} + + /** + * (PECL imagick 2.2.0)+ * The pattern for profile names. + *
+ * @param bool $include_values [optional]+ * Whether to return only profile names. If FALSE then only profile names will be returned. + *
+ * @return array an array containing the image profiles or profile names. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageProfiles($pattern = "*", $include_values = true) {} + + /** + * (PECL imagick 2.0.1)+ * The method of image distortion. See distortion constants + *
+ * @param array $arguments+ * The arguments for this distortion method + *
+ * @param bool $bestfit+ * Attempt to resize destination to fit distorted source + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function distortImage($method, array $arguments, $bestfit) {} + + /** + * (No version information available, might only be in SVN)+ * Filehandle where to write the image + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function writeImageFile($filehandle) {} + + /** + * (No version information available, might only be in SVN)+ * Filehandle where to write the images + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function writeImagesFile($filehandle) {} + + /** + * (No version information available, might only be in SVN)+ * The page definition. For example 7168x5147+0+0 + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function resetImagePage($page) {} + + /** + * (No version information available, might only be in SVN)+ * The Imagick object containing the clip mask + *
+ * @return bool TRUE on success. + */ + public function setImageClipMask(Imagick $clip_mask) {} + + /** + * (No version information available, might only be in SVN)+ * X server address + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function animateImages($x_server) {} + + /** + * (No version information available, might only be in SVN)+ * The matrix containing the color values + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function recolorImage(array $matrix) {} + + /** + * (PECL imagick 2.1.0)+ * Font name or a filename + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setFont($font) {} + + /** + * (PECL imagick 2.1.0)+ * Point size + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setPointSize($point_size) {} + + /** + * (No version information available, might only be in SVN)+ * One of the Imagick::LAYERMETHOD_* constants + *
+ * @return Imagick Returns an Imagick object containing the merged image. + * @throws ImagickException + */ + public function mergeImageLayers($layer_method) {} + + /** + * (No version information available, might only be in SVN)+ * One of the Imagick::ALPHACHANNEL_* constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageAlphaChannel($mode) {} + + /** + * (No version information available, might only be in SVN)+ * ImagickPixel object or a string containing the fill color + *
+ * @param float $fuzz+ * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. + *
+ * @param mixed $target+ * ImagickPixel object or a string containing the target color to paint + *
+ * @param int $x+ * X start position of the floodfill + *
+ * @param int $y+ * Y start position of the floodfill + *
+ * @param bool $invert+ * If TRUE paints any pixel that does not match the target color. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function floodFillPaintImage($fill, $fuzz, $target, $x, $y, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)+ * ImagickPixel object or a string containing the color to change + *
+ * @param mixed $fill+ * The replacement color + *
+ * @param float $fuzz+ * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. + *
+ * @param bool $invert+ * If TRUE paints any pixel that does not match the target color. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function opaquePaintImage($target, $fill, $fuzz, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)+ * The target color to paint + *
+ * @param float $alpha+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent. + *
+ * @param float $fuzz+ * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. + *
+ * @param bool $invert+ * If TRUE paints any pixel that does not match the target color. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function transparentPaintImage($target, $alpha, $fuzz, $invert) {} + + /** + * (No version information available, might only be in SVN)+ * The width of the target size + *
+ * @param int $height+ * The height of the target size + *
+ * @param float $delta_x+ * How much the seam can traverse on x-axis. + * Passing 0 causes the seams to be straight. + *
+ * @param float $rigidity+ * Introduces a bias for non-straight seams. This parameter is + * typically 0. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function liquidRescaleImage($width, $height, $delta_x, $rigidity) {} + + /** + * (No version information available, might only be in SVN)+ * The passphrase + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function encipherImage($passphrase) {} + + /** + * (No version information available, might only be in SVN)+ * The passphrase + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function decipherImage($passphrase) {} + + /** + * (No version information available, might only be in SVN)+ * The gravity property. Refer to the list of + * gravity constants. + *
+ * @return bool No value is returned. + * @throws ImagickException on error. + */ + public function setGravity($gravity) {} + + /** + * (No version information available, might only be in SVN)+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return float[] an array containing minima and maxima values of the channel(s). + * @throws ImagickException on error. + */ + #[ArrayShape(["minima" => "float", "maxima" => "float"])] + #[Pure] + public function getImageChannelRange($channel) {} + + /** + * (No version information available, might only be in SVN)+ * Imagick object containing the reference image + *
+ * @param int $metric+ * Refer to this list of metric type constants. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return float a float describing the channel distortion. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageChannelDistortions(Imagick $reference, $metric, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)+ * The gravity property. Refer to the list of + * gravity constants. + *
+ * @return bool No value is returned. + * @throws ImagickException on error. + */ + public function setImageGravity($gravity) {} + + /** + * (No version information available, might only be in SVN)+ * The image x position + *
+ * @param int $y+ * The image y position + *
+ * @param int $width+ * The image width + *
+ * @param int $height+ * The image height + *
+ * @param string $map+ * Map of pixel ordering as a string. This can be for example RGB. + * The value can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), + * O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad. + *
+ * @param int $storage+ * The pixel storage method. + * Refer to this list of pixel constants. + *
+ * @param array $pixels+ * The array of pixels + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function importImagePixels($x, $y, $width, $height, $map, $storage, array $pixels) {} + + /** + * (No version information available, might only be in SVN)+ * Deskew threshold + *
+ * @return bool + * @throws ImagickException on error. + */ + public function deskewImage($threshold) {} + + /** + * (No version information available, might only be in SVN)+ * One of the COLORSPACE constants. + *
+ * @param float $cluster_threshold+ * A percentage describing minimum number of pixels + * contained in hexedra before it is considered valid. + *
+ * @param float $smooth_threshold+ * Eliminates noise from the histogram. + *
+ * @param bool $verbose [optional]+ * Whether to output detailed information about recognised classes. + *
+ * @return bool + * @throws ImagickException on error. + */ + public function segmentImage($COLORSPACE, $cluster_threshold, $smooth_threshold, $verbose = false) {} + + /** + * (No version information available, might only be in SVN)+ * Refer to this list of sparse method constants + *
+ * @param array $arguments+ * An array containing the coordinates. + * The array is in format array(1,1, 2,45) + *
+ * @param int $channel [optional] + * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function sparseColorImage($SPARSE_METHOD, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)+ * An Imagick object containing the replacement colors + *
+ * @param int $DITHER+ * Refer to this list of dither method constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function remapImage(Imagick $replacement, $DITHER) {} + + /** + * (No version information available, might only be in SVN)+ * X-coordinate of the exported area + *
+ * @param int $y+ * Y-coordinate of the exported area + *
+ * @param int $width+ * Width of the exported aread + *
+ * @param int $height+ * Height of the exported area + *
+ * @param string $map+ * Ordering of the exported pixels. For example "RGB". + * Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P. + *
+ * @param int $STORAGE+ * Refer to this list of pixel type constants + *
+ * @return int[] an array containing the pixels values. + * @throws ImagickException on error. + */ + public function exportImagePixels($x, $y, $width, $height, $map, $STORAGE) {} + + /** + * (No version information available, might only be in SVN)+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return float[] an array with kurtosis and skewness + * members. + * @throws ImagickException on error. + */ + #[ArrayShape(["kurtosis" => "float", "skewness" => "float"])] + #[Pure] + public function getImageChannelKurtosis($channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (No version information available, might only be in SVN)+ * Refer to this list of function constants + *
+ * @param array $arguments+ * Array of arguments to pass to this function. + *
+ * @param int $channel [optional] + * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function functionImage($function, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * Transform image colorspace + * @param $COLORSPACE + * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function transformImageColorspace($COLORSPACE) {} + + /** + * (No version information available, might only be in SVN)+ * Imagick object containing the Hald lookup image. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function haldClutImage(Imagick $clut, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range. + * @param $CHANNEL [optional] + * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function autoLevelImage($CHANNEL) {} + + /** + * @link https://www.php.net/manual/en/imagick.blueshiftimage.php + * @param float $factor [optional] + * @return bool + * @throws ImagickException on error. + */ + public function blueShiftImage($factor) {} + + /** + * (No version information available, might only be in SVN)+ * The name of the artifact + *
+ * @return string the artifact value on success. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageArtifact($artifact) {} + + /** + * (No version information available, might only be in SVN)+ * The name of the artifact + *
+ * @param string $value+ * The value of the artifact + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageArtifact($artifact, $value) {} + + /** + * (No version information available, might only be in SVN)+ * The name of the artifact to delete + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function deleteImageArtifact($artifact) {} + + /** + * (PECL imagick 0.9.10-0.9.9)+ * One of the COLORSPACE constants + *
+ * @return bool TRUE on success. + */ + public function setColorspace($COLORSPACE) {} + + /** + * @param $CHANNEL [optional] + * @throws ImagickException on error. + */ + public function clampImage($CHANNEL) {} + + /** + * @param bool $stack + * @param int $offset + * @return Imagick + * @throws ImagickException on error. + */ + public function smushImages($stack, $offset) {} + + /** + * (PECL imagick 2.0.0)+ * The path to an image to load or an array of paths. Paths can include + * wildcards for file names, or can be URLs. + *
+ * @throws ImagickException Throws ImagickException on error. + */ + public function __construct($files = null) {} + + /** + * @return string + */ + public function __toString() {} + + public function count() {} + + /** + * (PECL imagick 2.0.0)+ * The x-coordinate of the region. + *
+ * @param int $y+ * The y-coordinate of the region. + *
+ * @param int $columns+ * The width of the region. + *
+ * @param int $rows+ * The height of the region. + *
+ * @return ImagickPixelIterator an ImagickPixelIterator for an image section. + * @throws ImagickException on error. + * @throws ImagickPixelIteratorException on error. + */ + #[Pure] + public function getPixelRegionIterator($x, $y, $columns, $rows) {} + + /** + * (PECL imagick 0.9.0-0.9.9)+ * String presentation of the image format. Format support + * depends on the ImageMagick installation. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageFormat($format) {} + + /** + * Scales the size of an image to the given dimensions. Passing zero as either of the arguments will preserve dimension while scaling.+ * Filename where to write the image. The extension of the filename + * defines the type of the file. + * Format can be forced regardless of file extension using format: prefix, + * for example "jpg:test.png". + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function writeImage($filename = null) {} + + /** + * (PECL imagick 0.9.0-0.9.9)+ * Blur radius + *
+ * @param float $sigma+ * Standard deviation + *
+ * @param int $channel [optional]+ * The Channeltype + * constant. When not supplied, all channels are blurred. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function blurImage($radius, $sigma, $channel = null) {} + + /** + * Changes the size of an image to the given dimensions and removes any associated profiles.+ * Image width + *
+ * @param int $rows+ * Image height + *
+ * @param bool $bestfit [optional]+ * Whether to force maximum values + *
+ * The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. + * @param bool $fill [optional] + * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on success. + * @throws ImagickException on error. + * @since 2.0.0 + */ + public function thumbnailImage($columns, $rows, $bestfit = false, $fill = false, $legacy = false) {} + + /** + * Creates a cropped thumbnail at the requested size. + * If legacy is true, uses the incorrect behaviour that was present until Imagick 3.4.0. + * If false it uses the correct behaviour. + * @link https://php.net/manual/en/imagick.cropthumbnailimage.php + * @param int $width The width of the thumbnail + * @param int $height The Height of the thumbnail + * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on succes + * @throws ImagickException Throws ImagickException on error + * @since 2.0.0 + */ + public function cropThumbnailImage($width, $height, $legacy = false) {} + + /** + * (PECL imagick 2.0.0)+ * The position to set the iterator to + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function setImageIndex($index) {} + + /** + * (PECL imagick 2.0.0)+ * The comment to add + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function commentImage($comment) {} + + /** + * (PECL imagick 2.0.0)+ * The width of the crop + *
+ * @param int $height+ * The height of the crop + *
+ * @param int $x+ * The X coordinate of the cropped region's top left corner + *
+ * @param int $y+ * The Y coordinate of the cropped region's top left corner + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function cropImage($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * The label to add + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function labelImage($label) {} + + /** + * (PECL imagick 2.0.0)+ * The drawing operations to render on the image. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function drawImage(ImagickDraw $draw) {} + + /** + * (No version information available, might only be in SVN)+ * The image compression quality as an integer + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageCompressionQuality($quality) {} + + /** + * (PECL imagick 2.2.2)+ * The ImagickDraw object that contains settings for drawing the text + *
+ * @param float $x+ * Horizontal offset in pixels to the left of text + *
+ * @param float $y+ * Vertical offset in pixels to the baseline of text + *
+ * @param float $angle+ * The angle at which to write the text + *
+ * @param string $text+ * The string to draw + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function annotateImage(ImagickDraw $draw_settings, $x, $y, $angle, $text) {} + + /** + * (PECL imagick 2.0.0)+ * Imagick object which holds the composite image + *
+ * @param int $composite Composite operator + * @param int $x+ * The column offset of the composited image + *
+ * @param int $y+ * The row offset of the composited image + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function compositeImage(Imagick $composite_object, $composite, $x, $y, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The font name, size, and color are obtained from this object. + *
+ * @param string $tile_geometry+ * The number of tiles per row and page (e.g. 6x4+0+0). + *
+ * @param string $thumbnail_geometry+ * Preferred image size and border size of each thumbnail + * (e.g. 120x120+4+3>). + *
+ * @param int $mode+ * Thumbnail framing mode, see Montage Mode constants. + *
+ * @param string $frame+ * Surround the image with an ornamental border (e.g. 15x15+3+3). The + * frame color is that of the thumbnail's matte color. + *
+ * @return Imagick TRUE on success. + * @throws ImagickException on error. + */ + public function montageImage(ImagickDraw $draw, $tile_geometry, $thumbnail_geometry, $mode, $frame) {} + + /** + * (PECL imagick 2.0.0)+ * Width of the local neighborhood. + *
+ * @param int $height+ * Height of the local neighborhood. + *
+ * @param int $offset+ * The mean offset + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function adaptiveThresholdImage($width, $height, $offset) {} + + /** + * (PECL imagick 2.0.0)+ * The threshold below which everything turns black + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function blackThresholdImage($threshold) {} + + /** + * (PECL imagick 2.0.0)+ * Whether to stack the images vertically. + * By default (or if FALSE is specified) images are stacked left-to-right. + * If stack is TRUE, images are stacked top-to-bottom. + *
+ * @return Imagick Imagick instance on success. + * @throws ImagickException on error. + */ + public function appendImages($stack = false) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the Gaussian, in pixels, not counting the center pixel + *
+ * @param float $sigma+ * The standard deviation of the Gaussian, in pixels + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function charcoalImage($radius, $sigma) {} + + /** + * (PECL imagick 2.0.0)+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function normalizeImage($channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the circular neighborhood. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function oilPaintImage($radius) {} + + /** + * (PECL imagick 2.0.0)+ * The X offset. + *
+ * @param int $y+ * The Y offset. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function rollImage($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * The background color + *
+ * @param float $degrees+ * The number of degrees to rotate the image + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function rotateImage($background, $degrees) {} + + /** + * (PECL imagick 2.0.0)+ * One of the COMPRESSION constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageCompression($compression) {} + + /** + * (PECL imagick 2.0.0)+ * The amount of time expressed in 'ticks' that the image should be + * displayed for. For animated GIFs there are 100 ticks per second, so a + * value of 20 would be 20/100 of a second aka 1/5th of a second. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageDelay($delay) {} + + /** + * (PECL imagick 2.0.0)+ * The number of iterations the image should loop over. Set to '0' to loop + * continuously. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageIterations($iterations) {} + + /** + * (PECL imagick 2.0.0)+ * The duration for which an image should be displayed expressed in ticks + * per second. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageTicksPerSecond($ticks_per_second) {} + + /** + * (PECL imagick 2.0.0)+ * The background color + *
+ * @param float $x_shear+ * The number of degrees to shear on the x axis + *
+ * @param float $y_shear+ * The number of degrees to shear on the y axis + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function shearImage($background, $x_shear, $y_shear) {} + + /** + * (PECL imagick 2.0.0)+ * The filename to read the information from. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function pingImage($filename) {} + + /** + * (PECL imagick 2.0.0)+ * The X server name + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function displayImage($servername) {} + + /** + * (PECL imagick 2.0.0)+ * The X server name + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function displayImages($servername) {} + + /** + * (PECL imagick 2.0.0)+ * The query pattern + *
+ * @return array an array containing the configured fonts. + */ + public static function queryFonts($pattern = "*") {} + + /** + * (PECL imagick 2.0.0)+ * ImagickDraw object containing font properties + *
+ * @param string $text+ * The text + *
+ * @param bool $multiline [optional]+ * Multiline parameter. If left empty it is autodetected + *
+ * @return array a multi-dimensional array representing the font metrics. + * @throws ImagickException on error. + */ + public function queryFontMetrics(ImagickDraw $properties, $text, $multiline = null) {} + + /** + * (PECL imagick 2.0.0)+ * The type of the noise. Refer to this list of + * noise constants. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function addNoiseImage($noise_type, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the Gaussian, in pixels, not counting the center pixel. + *
+ * @param float $sigma+ * The standard deviation of the Gaussian, in pixels. + *
+ * @param float $angle+ * Apply the effect along this angle. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + * The channel argument affects only if Imagick is compiled against ImageMagick version + * 6.4.4 or greater. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function motionBlurImage($radius, $sigma, $angle, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * (PECL imagick 2.0.0)+ * The number of in-between images to generate. + *
+ * @return Imagick This method returns a new Imagick object on success. + * Throw an ImagickException on error. + * @throws ImagickException on error + * @throws ImagickException on error. + */ + public function morphImages($number_frames) {} + + /** + * (PECL imagick 2.0.0)+ * The affine matrix + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function affineTransformImage(ImagickDraw $matrix) {} + + /** + * (PECL imagick 2.0.0)+ * ImagickPixel object or a string containing the border color + *
+ * @param int $width+ * Border width + *
+ * @param int $height+ * Border height + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function borderImage($bordercolor, $width, $height) {} + + /** + * (PECL imagick 2.0.0)+ * Width of the chopped area + *
+ * @param int $height+ * Height of the chopped area + *
+ * @param int $x+ * X origo of the chopped area + *
+ * @param int $y+ * Y origo of the chopped area + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function chopImage($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * The name of the path + *
+ * @param bool $inside+ * If TRUE later operations take effect inside clipping path. + * Otherwise later operations take effect outside clipping path. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function clipPathImage($pathname, $inside) {} + + /** + * Alias to {@see Imagick::clipPathImage} + * @param string $pathname + * @param string $inside + * @throws ImagickException on error. + */ + public function clipImagePath($pathname, $inside) {} + + /** + * (PECL imagick 2.0.0)+ * ImagickPixel object containing the fill color + *
+ * @param float $fuzz+ * The amount of fuzz. For example, set fuzz to 10 and the color red at + * intensities of 100 and 102 respectively are now interpreted as the + * same color for the purposes of the floodfill. + *
+ * @param mixed $bordercolor+ * ImagickPixel object containing the border color + *
+ * @param int $x+ * X start position of the floodfill + *
+ * @param int $y+ * Y start position of the floodfill + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function colorFloodfillImage($fill, $fuzz, $bordercolor, $x, $y) {} + + /** + * Blends the fill color with each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.+ * ImagickPixel object or a string containing the colorize color + *
+ * @param mixed $opacity+ * ImagickPixel object or an float containing the opacity value. + * 1.0 is fully opaque and 0.0 is fully transparent. + *
+ * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE + * @return bool TRUE on success. + * @throws ImagickException Throws ImagickException on error + * @since 2.0.0 + */ + public function colorizeImage($colorize, $opacity, $legacy = false) {} + + /** + * (PECL imagick 2.0.0)+ * Imagick object containing the image to compare. + *
+ * @param int $channelType+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @param int $metricType+ * One of the metric type constants. + *
+ * @return array Array consisting of new_wand and + * distortion. + * @throws ImagickException on error. + */ + public function compareImageChannels(Imagick $image, $channelType, $metricType) {} + + /** + * (PECL imagick 2.0.0)+ * An image to compare to. + *
+ * @param int $metric+ * Provide a valid metric type constant. Refer to this + * list of metric constants. + *
+ * @return array Array consisting of an Imagick object of the + * reconstructed image and a float representing the difference. + * @throws ImagickException Throws ImagickException on error. + */ + public function compareImages(Imagick $compare, $metric) {} + + /** + * (PECL imagick 2.0.0)+ * The sharpen value + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function contrastImage($sharpen) {} + + /** + * (PECL imagick 2.0.0)+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return Imagick TRUE on success. + * @throws ImagickException on error. + */ + public function combineImages($channelType) {} + + /** + * (PECL imagick 2.0.0)+ * The convolution kernel + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function convolveImage(array $kernel, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The amount to displace the colormap. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function cycleColormapImage($displace) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the operation. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function edgeImage($radius) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the effect + *
+ * @param float $sigma+ * The sigma of the effect + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function embossImage($radius, $sigma) {} + + /** + * (PECL imagick 2.0.0)+ * The evaluation operator + *
+ * @param float $constant+ * The value of the operator + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function evaluateImage($op, $constant, $channel = Imagick::CHANNEL_ALL) {} + + /** + * Merges a sequence of images. This is useful for combining Photoshop layers into a single image. + * This is replaced by: + *+ * $im = $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN) + *+ * @link https://php.net/manual/en/imagick.flattenimages.php + * @return Imagick Returns an Imagick object containing the merged image. + * @throws ImagickException Throws ImagickException on error. + * @since 2.0.0 + */ + #[Deprecated] + public function flattenImages() {} + + /** + * (PECL imagick 2.0.0)
+ * ImagickPixel object or a string representing the matte color + *
+ * @param int $width+ * The width of the border + *
+ * @param int $height+ * The height of the border + *
+ * @param int $inner_bevel+ * The inner bevel width + *
+ * @param int $outer_bevel+ * The outer bevel width + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function frameImage($matte_color, $width, $height, $inner_bevel, $outer_bevel) {} + + /** + * (PECL imagick 2.0.0)+ * The expression. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return Imagick TRUE on success. + * @throws ImagickException on error. + */ + public function fxImage($expression, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The amount of gamma-correction. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function gammaImage($gamma, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the Gaussian, in pixels, not counting the center pixel. + *
+ * @param float $sigma+ * The standard deviation of the Gaussian, in pixels. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function gaussianBlurImage($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {} + + /** + * @link https://www.php.net/manual/en/imagick.getimageattribute.php + * @param string $keyThe key of the attribute to get.
+ * @return string + */ + #[Deprecated] + #[Pure] + public function getImageAttribute($key) {} + + /** + * (PECL imagick 2.0.0)+ * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants + *
+ * @return int TRUE on success. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageChannelDepth($channel) {} + + /** + * (PECL imagick 2.0.0)+ * Imagick object to compare to. + *
+ * @param int $channel+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @param int $metric+ * One of the metric type constants. + *
+ * @return float TRUE on success. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageChannelDistortion(Imagick $reference, $channel, $metric) {} + + /** + * (PECL imagick 2.0.0)+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return int[] + * @throws ImagickException on error. + */ + #[ArrayShape(["minima" => "int", "maxima" => "int"])] + #[Deprecated] + #[Pure] + public function getImageChannelExtrema($channel) {} + + /** + * (PECL imagick 2.0.0)+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return float[] + * @throws ImagickException on error. + */ + #[ArrayShape(["mean" => "float", "standardDeviation" => "float"])] + #[Pure] + public function getImageChannelMean($channel) {} + + /** + * (PECL imagick 2.0.0)+ * The offset into the image colormap. + *
+ * @return ImagickPixel TRUE on success. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageColormapColor($index) {} + + /** + * (PECL imagick 2.0.0)+ * Imagick object to compare to. + *
+ * @param int $metric+ * One of the metric type constants. + *
+ * @return float the distortion metric used on the image (or the best guess + * thereof). + * @throws ImagickException on error. + */ + #[Pure] + public function getImageDistortion(Imagick $reference, $metric) {} + + /** + * (PECL imagick 2.0.0)+ * The x-coordinate of the pixel + *
+ * @param int $y+ * The y-coordinate of the pixel + *
+ * @return ImagickPixel an ImagickPixel instance for the color at the coordinates given. + * @throws ImagickException on error. + */ + #[Pure] + public function getImagePixelColor($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * The name of the profile to return. + *
+ * @return string a string containing the image profile. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageProfile($name) {} + + /** + * (PECL imagick 2.0.0)+ * The width of the extracted region. + *
+ * @param int $height+ * The height of the extracted region. + *
+ * @param int $x+ * X-coordinate of the top-left corner of the extracted region. + *
+ * @param int $y+ * Y-coordinate of the top-left corner of the extracted region. + *
+ * @return Imagick Extracts a region of the image and returns it as a new wand. + * @throws ImagickException on error. + */ + #[Pure] + public function getImageRegion($width, $height, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the implode + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function implodeImage($radius) {} + + /** + * (PECL imagick 2.0.0)+ * The image black point + *
+ * @param float $gamma+ * The gamma value + *
+ * @param float $whitePoint+ * The image white point + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function levelImage($blackPoint, $gamma, $whitePoint, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully + * transparent. + *
+ * @param float $fuzz+ * The fuzz member of image defines how much tolerance is acceptable to + * consider two colors as the same. + *
+ * @param mixed $bordercolor+ * An ImagickPixel object or string representing the border color. + *
+ * @param int $x+ * The starting x coordinate of the operation. + *
+ * @param int $y+ * The starting y coordinate of the operation. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function matteFloodfillImage($alpha, $fuzz, $bordercolor, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * The radius of the pixel neighborhood. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function medianFilterImage($radius) {} + + /** + * (PECL imagick 2.0.0)+ * Whether to only negate grayscale pixels within the image. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function negateImage($gray, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * Change this target color to the fill color within the image. An + * ImagickPixel object or a string representing the target color. + *
+ * @param mixed $fill+ * An ImagickPixel object or a string representing the fill color. + *
+ * @param float $fuzz+ * The fuzz member of image defines how much tolerance is acceptable to + * consider two colors as the same. + *
+ * @param int $channel [optional]+ * Provide any channel constant that is valid for your channel mode. To + * apply to more than one channel, combine channeltype constants using + * bitwise operators. Refer to this + * list of channel constants. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function paintOpaqueImage($target, $fill, $fuzz, $channel = Imagick::CHANNEL_ALL) {} + + /** + * (PECL imagick 2.0.0)+ * Change this target color to specified opacity value within the image. + *
+ * @param float $alpha+ * The level of transparency: 1.0 is fully opaque and 0.0 is fully + * transparent. + *
+ * @param float $fuzz+ * The fuzz member of image defines how much tolerance is acceptable to + * consider two colors as the same. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + #[Deprecated] + public function paintTransparentImage($target, $alpha, $fuzz) {} + + /** + * (PECL imagick 2.0.0)+ * Preview type. See Preview type constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function previewImages($preview) {} + + /** + * (PECL imagick 2.0.0)+ * The border color + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageBorderColor($border) {} + + /** + * (PECL imagick 2.0.0)+ * One of the COLORSPACE constants + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImageColorspace($colorspace) {} + + /** + * (PECL imagick 2.0.0)+ * The source Imagick object + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function addImage(Imagick $source) {} + + /** + * (PECL imagick 2.0.0)+ * The replace Imagick object + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setImage(Imagick $replace) {} + + /** + * (PECL imagick 2.0.0)+ * Columns in the new image + *
+ * @param int $rows+ * Rows in the new image + *
+ * @param mixed $background+ * The background color used for this image + *
+ * @param string $format [optional]+ * Image format. This parameter was added in Imagick version 2.0.1. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function newImage($cols, $rows, $background, $format = null) {} + + /** + * (PECL imagick 2.0.0)+ * columns in the new image + *
+ * @param int $rows+ * rows in the new image + *
+ * @param string $pseudoString+ * string containing pseudo image definition. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function newPseudoImage($columns, $rows, $pseudoString) {} + + /** + * (PECL imagick 2.0.0)+ * The name of the option + *
+ * @return string a value associated with a wand and the specified key. + */ + #[Pure] + public function getOption($key) {} + + /** + * (PECL imagick 2.0.0)+ * Refer to the list of resourcetype constants. + *
+ * @return int the specified resource's memory usage in megabytes. + */ + public static function getResource($type) {} + + /** + * (PECL imagick 2.0.0)+ * Refer to the list of resourcetype constants. + *
+ * @return int the specified resource limit in megabytes. + */ + public static function getResourceLimit($type) {} + + /** + * (PECL imagick 2.0.0)+ * Refer to the list of resourcetype constants. + *
+ * @param int $limit+ * The resource limit. The unit depends on the type of the resource being limited. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public static function setResourceLimit($type, $limit) {} + + /** + * (PECL imagick 2.0.0)+ * The horizontal resolution. + *
+ * @param float $y_resolution+ * The vertical resolution. + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function setResolution($x_resolution, $y_resolution) {} + + /** + * (PECL imagick 2.0.0)bool callback ( mixed $offset , mixed $span )+ * Caution + * The values passed to the callback function are not consistent. In particular the span parameter can increase during image processing. Because of this calculating the percentage complete of an image operation is not trivial. + * @return void + * @throws ImagickException on error. + * @since 3.3.0 + */ + public function setProgressMonitor($callback) {} + + /** + * Sets the ImageMagick registry entry named key to value. This is most useful for setting "temporary-path" which controls where ImageMagick creates temporary images e.g. while processing PDFs. + * @link https://php.net/manual/en/imagick.setregistry.php + * @param string $key + * @param string $value + * @return void + * @since 3.3.0 + */ + public static function setRegistry($key, $value) {} + + /** + * Replace each pixel with corresponding statistic from the neighborhood of the specified width and height. + * @link https://php.net/manual/en/imagick.statisticimage.php + * @param int $type + * @param int $width + * @param int $height + * @param int $channel [optional] + * @return void + * @throws ImagickException on error. + * @since 3.3.0 + */ + public function statisticImage($type, $width, $height, $channel = Imagick::CHANNEL_DEFAULT) {} + + /** + * Searches for a subimage in the current image and returns a similarity image such that an exact match location is + * completely white and if none of the pixels match, black, otherwise some gray level in-between. + * You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will + * be set to the 'score' of the similarity between the subimage and the matching position in the larger image, + * bestMatch will contain an associative array with elements x, y, width, height that describe the matching region. + * + * @link https://php.net/manual/en/imagick.subimagematch.php + * @param Imagick $imagick + * @param array &$bestMatch [optional] + * @param float &$similarity [optional] A new image that displays the amount of similarity at each pixel. + * @param float $similarity_threshold [optional] Only used if compiled with ImageMagick (library) > 7 + * @param int $metric [optional] Only used if compiled with ImageMagick (library) > 7 + * @return Imagick + * @throws ImagickException on error. + * @since 3.3.0 + */ + public function subImageMatch(Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) {} + + /** + * Is an alias of Imagick::subImageMatch + * + * @param Imagick $imagick + * @param array &$bestMatch [optional] + * @param float &$similarity [optional] A new image that displays the amount of similarity at each pixel. + * @param float $similarity_threshold [optional] + * @param int $metric [optional] + * @return Imagick + * @throws ImagickException on error. + * @see Imagick::subImageMatch() This function is an alias of subImageMatch() + * @since 3.4.0 + */ + public function similarityImage(Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) {} + + /** + * Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc. + * @return string + * @since 3.4.0 + */ + #[Pure] + public function getConfigureOptions() {} + + /** + * GetFeatures() returns the ImageMagick features that have been compiled into the runtime. + * @return string + * @since 3.4.0 + */ + #[Pure] + public function getFeatures() {} + + /** + * @return int + * @since 3.4.0 + */ + #[Pure] + public function getHDRIEnabled() {} + + /** + * Sets the image channel mask. Returns the previous set channel mask. + * Only works with Imagick >= 7 + * @param int $channel + * @throws ImagickException on error. + * @since 3.4.0 + */ + public function setImageChannelMask($channel) {} + + /** + * Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence + * @param int $EVALUATE_CONSTANT + * @return bool + * @see https://www.imagemagick.org/Usage/layers/#evaluate-sequence + * @throws ImagickException on error. + * @since 3.4.0 + */ + public function evaluateImages($EVALUATE_CONSTANT) {} + + /** + * Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately. + * @param int $channel [optional] Default value Imagick::CHANNEL_ALL + * @return bool + * @throws ImagickException on error. + * @since 3.4.1 + */ + public function autoGammaImage($channel = Imagick::CHANNEL_ALL) {} + + /** + * Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation). + * @return bool + * @throws ImagickException on error. + * @since 3.4.1 + */ + public function autoOrient() {} + + /** + * Composite one image onto another using the specified gravity. + * + * @param Imagick $imagick + * @param int $COMPOSITE_CONSTANT + * @param int $GRAVITY_CONSTANT + * @return bool + * @throws ImagickException on error. + * @since 3.4.1 + */ + public function compositeImageGravity(Imagick $imagick, $COMPOSITE_CONSTANT, $GRAVITY_CONSTANT) {} + + /** + * Attempts to increase the appearance of large-scale light-dark transitions. + * + * @param float $radius + * @param float $strength + * @return bool + * @throws ImagickException on error. + * @since 3.4.1 + */ + public function localContrastImage($radius, $strength) {} + + /** + * Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants + * @return int + * @throws ImagickException on error. + * @since 3.4.3 + */ + public function identifyImageType() {} + + /** + * Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity() + * + * @param float $alpha + * @return bool + * @throws ImagickException on error. + * @since 3.4.3 + */ + public function setImageAlpha($alpha) {} } -class ImagickDrawException extends Exception { -} +/** + * @method ImagickDraw clone() (PECL imagick 2.0.0)
+ * ImagickPixel to use to set the color + *
+ * @return bool No value is returned. + * @throws ImagickDrawException on error. + */ + public function setFillColor(ImagickPixel $fill_pixel) {} + + /** + * (PECL imagick 2.0.0)+ * fill alpha + *
+ * @return bool No value is returned. + */ + #[Deprecated] + public function setFillAlpha($opacity) {} + + /** + * Sets the image resolution + * @param float $x_resolutionThe horizontal resolution.
+ * @param float $y_resolutionThe vertical resolution.
+ * @return bool + * @throws ImagickDrawException on error. + */ + public function setResolution($x_resolution, $y_resolution) {} + + /** + * (PECL imagick 2.0.0)+ * the stroke color + *
+ * @return bool No value is returned. + * @throws ImagickDrawException on error. + */ + public function setStrokeColor(ImagickPixel $stroke_pixel) {} + + /** + * (PECL imagick 2.0.0)+ * opacity + *
+ * @return bool No value is returned. + */ + #[Deprecated] + public function setStrokeAlpha($opacity) {} + + /** + * (PECL imagick 2.0.0)+ * stroke width + *
+ * @return bool No value is returned. + */ + public function setStrokeWidth($stroke_width) {} + + /** + * (PECL imagick 2.0.0)+ * origin x coordinate + *
+ * @param float $oy+ * origin y coordinate + *
+ * @param float $px+ * perimeter x coordinate + *
+ * @param float $py+ * perimeter y coordinate + *
+ * @return bool No value is returned. + */ + public function circle($ox, $oy, $px, $py) {} + + /** + * (PECL imagick 2.0.0)+ * The x coordinate where text is drawn + *
+ * @param float $y+ * The y coordinate where text is drawn + *
+ * @param string $text+ * The text to draw on the image + *
+ * @return bool No value is returned. + * @throws ImagickDrawException on error. + */ + public function annotation($x, $y, $text) {} + + /** + * (PECL imagick 2.0.0)+ * the encoding name + *
+ * @return bool No value is returned. + */ + public function setTextEncoding($encoding) {} + + /** + * (PECL imagick 2.0.0)+ * the font family + *
+ * @return bool TRUE on success. + * @throws ImagickDrawException on error. + * @throws ImagickException on error. + */ + public function setFontFamily($font_family) {} + + /** + * (PECL imagick 2.0.0)+ * the point size + *
+ * @return bool No value is returned. + */ + public function setFontSize($pointsize) {} + + /** + * (PECL imagick 2.0.0)+ * STYLETYPE_ constant + *
+ * @return bool No value is returned. + */ + public function setFontStyle($style) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the top left corner + *
+ * @param float $y1+ * y coordinate of the top left corner + *
+ * @param float $x2+ * x coordinate of the bottom right corner + *
+ * @param float $y2+ * y coordinate of the bottom right corner + *
+ * @return bool No value is returned. + */ + public function rectangle($x1, $y1, $x2, $y2) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the top left corner + *
+ * @param float $y1+ * y coordinate of the top left corner + *
+ * @param float $x2+ * x coordinate of the bottom right + *
+ * @param float $y2+ * y coordinate of the bottom right + *
+ * @param float $rx+ * x rounding + *
+ * @param float $ry+ * y rounding + *
+ * @return bool No value is returned. + */ + public function roundRectangle($x1, $y1, $x2, $y2, $rx, $ry) {} + + /** + * (PECL imagick 2.0.0)+ * degrees to skew + *
+ * @return bool No value is returned. + */ + public function skewX($degrees) {} + + /** + * (PECL imagick 2.0.0)+ * degrees to skew + *
+ * @return bool No value is returned. + */ + public function skewY($degrees) {} + + /** + * (PECL imagick 2.0.0)+ * horizontal translation + *
+ * @param float $y+ * vertical translation + *
+ * @return bool No value is returned. + */ + public function translate($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * starting x coordinate + *
+ * @param float $sy+ * starting y coordinate + *
+ * @param float $ex+ * ending x coordinate + *
+ * @param float $ey+ * ending y coordinate + *
+ * @return bool No value is returned. + */ + public function line($sx, $sy, $ex, $ey) {} + + /** + * (PECL imagick 2.0.0)+ * Starting x ordinate of bounding rectangle + *
+ * @param float $sy+ * starting y ordinate of bounding rectangle + *
+ * @param float $ex+ * ending x ordinate of bounding rectangle + *
+ * @param float $ey+ * ending y ordinate of bounding rectangle + *
+ * @param float $sd+ * starting degrees of rotation + *
+ * @param float $ed+ * ending degrees of rotation + *
+ * @return bool No value is returned. + */ + public function arc($sx, $sy, $ex, $ey, $sd, $ed) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the matte + *
+ * @param float $y+ * y coordinate of the matte + *
+ * @param int $paintMethod+ * PAINT_ constant + *
+ * @return bool TRUE on success or FALSE on failure. + */ + public function matte($x, $y, $paintMethod) {} + + /** + * (PECL imagick 2.0.0)+ * multidimensional array like array( array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) ); + *
+ * @return bool TRUE on success. + * @throws ImagickDrawException on error. + */ + public function polygon(array $coordinates) {} + + /** + * (PECL imagick 2.0.0)+ * point's x coordinate + *
+ * @param float $y+ * point's y coordinate + *
+ * @return bool No value is returned. + */ + public function point($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * STRETCH_ constant + *
+ * @return bool No value is returned. + */ + public function setFontStretch($fontStretch) {} + + /** + * (PECL imagick 2.0.0)+ * the antialias setting + *
+ * @return bool No value is returned. + */ + public function setStrokeAntialias($stroke_antialias) {} + + /** + * (PECL imagick 2.0.0)+ * ALIGN_ constant + *
+ * @return bool No value is returned. + */ + public function setTextAlignment($alignment) {} + + /** + * (PECL imagick 2.0.0)+ * DECORATION_ constant + *
+ * @return bool No value is returned. + */ + public function setTextDecoration($decoration) {} + + /** + * (PECL imagick 2.0.0)+ * the under color + *
+ * @return bool No value is returned. + * @throws ImagickDrawException on error. + */ + public function setTextUnderColor(ImagickPixel $under_color) {} + + /** + * (PECL imagick 2.0.0)+ * left x coordinate + *
+ * @param int $y1+ * left y coordinate + *
+ * @param int $x2+ * right x coordinate + *
+ * @param int $y2+ * right y coordinate + *
+ * @return bool No value is returned. + */ + public function setViewbox($x1, $y1, $x2, $y2) {} + + /** + * (PECL imagick 2.0.0)+ * Affine matrix parameters + *
+ * @return bool No value is returned. + * @throws ImagickDrawException on error. + */ + public function affine(array $affine) {} + + /** + * (PECL imagick 2.0.0)+ * Multidimensional array like array( array( 'x' => 1, 'y' => 2 ), + * array( 'x' => 3, 'y' => 4 ) ) + *
+ * @return bool No value is returned. + * @throws ImagickDrawException on error. + */ + public function bezier(array $coordinates) {} + + /** + * (PECL imagick 2.0.0)+ * composition operator. One of COMPOSITE_ constants + *
+ * @param float $x+ * x coordinate of the top left corner + *
+ * @param float $y+ * y coordinate of the top left corner + *
+ * @param float $width+ * width of the composition image + *
+ * @param float $height+ * height of the composition image + *
+ * @param Imagick $compositeWand+ * the Imagick object where composition image is taken from + *
+ * @return bool TRUE on success. + * @throws ImagickException on error. + */ + public function composite($compose, $x, $y, $width, $height, Imagick $compositeWand) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the paint + *
+ * @param float $y+ * y coordinate of the paint + *
+ * @param int $paintMethod+ * one of the PAINT_ constants + *
+ * @return bool No value is returned. + */ + public function color($x, $y, $paintMethod) {} + + /** + * (PECL imagick 2.0.0)+ * The comment string to add to vector output stream + *
+ * @return bool No value is returned. + */ + public function comment($comment) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the first control point + *
+ * @param float $y1+ * y coordinate of the first control point + *
+ * @param float $x2+ * x coordinate of the second control point + *
+ * @param float $y2+ * y coordinate of the first control point + *
+ * @param float $x+ * x coordinate of the curve end + *
+ * @param float $y+ * y coordinate of the curve end + *
+ * @return bool No value is returned. + */ + public function pathCurveToAbsolute($x1, $y1, $x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of starting control point + *
+ * @param float $y1+ * y coordinate of starting control point + *
+ * @param float $x2+ * x coordinate of ending control point + *
+ * @param float $y2+ * y coordinate of ending control point + *
+ * @param float $x+ * ending x coordinate + *
+ * @param float $y+ * ending y coordinate + *
+ * @return bool No value is returned. + */ + public function pathCurveToRelative($x1, $y1, $x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the control point + *
+ * @param float $y1+ * y coordinate of the control point + *
+ * @param float $x+ * x coordinate of the end point + *
+ * @param float $y+ * y coordinate of the end point + *
+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierAbsolute($x1, $y1, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * starting x coordinate + *
+ * @param float $y1+ * starting y coordinate + *
+ * @param float $x+ * ending x coordinate + *
+ * @param float $y+ * ending y coordinate + *
+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierRelative($x1, $y1, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * ending x coordinate + *
+ * @param float $y+ * ending y coordinate + *
+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierSmoothAbsolute($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * ending x coordinate + *
+ * @param float $y+ * ending y coordinate + *
+ * @return bool No value is returned. + */ + public function pathCurveToQuadraticBezierSmoothRelative($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the second control point + *
+ * @param float $y2+ * y coordinate of the second control point + *
+ * @param float $x+ * x coordinate of the ending point + *
+ * @param float $y+ * y coordinate of the ending point + *
+ * @return bool No value is returned. + */ + public function pathCurveToSmoothAbsolute($x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the second control point + *
+ * @param float $y2+ * y coordinate of the second control point + *
+ * @param float $x+ * x coordinate of the ending point + *
+ * @param float $y+ * y coordinate of the ending point + *
+ * @return bool No value is returned. + */ + public function pathCurveToSmoothRelative($x2, $y2, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * x radius + *
+ * @param float $ry+ * y radius + *
+ * @param float $x_axis_rotation+ * x axis rotation + *
+ * @param bool $large_arc_flag+ * large arc flag + *
+ * @param bool $sweep_flag+ * sweep flag + *
+ * @param float $x+ * x coordinate + *
+ * @param float $y+ * y coordinate + *
+ * @return bool No value is returned. + */ + public function pathEllipticArcAbsolute($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * x radius + *
+ * @param float $ry+ * y radius + *
+ * @param float $x_axis_rotation+ * x axis rotation + *
+ * @param bool $large_arc_flag+ * large arc flag + *
+ * @param bool $sweep_flag+ * sweep flag + *
+ * @param float $x+ * x coordinate + *
+ * @param float $y+ * y coordinate + *
+ * @return bool No value is returned. + */ + public function pathEllipticArcRelative($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * starting x coordinate + *
+ * @param float $y+ * ending x coordinate + *
+ * @return bool No value is returned. + */ + public function pathLineToAbsolute($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * starting x coordinate + *
+ * @param float $y+ * starting y coordinate + *
+ * @return bool No value is returned. + */ + public function pathLineToRelative($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate + *
+ * @return bool No value is returned. + */ + public function pathLineToHorizontalAbsolute($x) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate + *
+ * @return bool No value is returned. + */ + public function pathLineToHorizontalRelative($x) {} + + /** + * (PECL imagick 2.0.0)+ * y coordinate + *
+ * @return bool No value is returned. + */ + public function pathLineToVerticalAbsolute($y) {} + + /** + * (PECL imagick 2.0.0)+ * y coordinate + *
+ * @return bool No value is returned. + */ + public function pathLineToVerticalRelative($y) {} + + /** + * (PECL imagick 2.0.0)+ * x coordinate of the starting point + *
+ * @param float $y+ * y coordinate of the starting point + *
+ * @return bool No value is returned. + */ + public function pathMoveToAbsolute($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * target x coordinate + *
+ * @param float $y+ * target y coordinate + *
+ * @return bool No value is returned. + */ + public function pathMoveToRelative($x, $y) {} + + /** + * (PECL imagick 2.0.0)+ * array of x and y coordinates: array( array( 'x' => 4, 'y' => 6 ), array( 'x' => 8, 'y' => 10 ) ) + *
+ * @return bool TRUE on success. + * @throws ImagickDrawException on error. + */ + public function polyline(array $coordinates) {} + + /** + * (PECL imagick 2.0.0)+ * Clip mask Id + *
+ * @return bool No value is returned. + */ + public function pushClipPath($clip_mask_id) {} + + /** + * (PECL imagick 2.0.0)+ * the pattern Id + *
+ * @param float $x+ * x coordinate of the top-left corner + *
+ * @param float $y+ * y coordinate of the top-left corner + *
+ * @param float $width+ * width of the pattern + *
+ * @param float $height+ * height of the pattern + *
+ * @return bool TRUE on success or FALSE on failure. + */ + public function pushPattern($pattern_id, $x, $y, $width, $height) {} + + /** + * (PECL imagick 2.0.0)+ * degrees to rotate + *
+ * @return bool No value is returned. + */ + public function rotate($degrees) {} -class ImagickPixelIteratorException extends Exception { -} + /** + * (PECL imagick 2.0.0)+ * horizontal factor + *
+ * @param float $y+ * vertical factor + *
+ * @return bool No value is returned. + */ + public function scale($x, $y) {} -class ImagickPixelException extends Exception { -} + /** + * (PECL imagick 2.0.0)+ * the clipping path name + *
+ * @return bool No value is returned. + * @throws ImagickException on error. + */ + public function setClipPath($clip_mask) {} -/** - * @method Imagick clone() (PECL imagick 2.0.0)- * One of the layer method constants. - *
- * @return Imagick TRUE on success. - */ - public function compareImageLayers ($method) {} - - /** - * (PECL imagick 2.0.0)- * A string containing the image. - *
- * @return bool TRUE on success. - */ - public function pingImageBlob ($image) {} - - /** - * (PECL imagick 2.0.0)- * An open filehandle to the image. - *
- * @param string $fileName [optional]- * Optional filename for this image. - *
- * @return bool TRUE on success. - */ - public function pingImageFile ($filehandle, $fileName = null) {} - - /** - * (PECL imagick 2.0.0)- * By default target must match a particular pixel color exactly. - * However, in many cases two colors may differ by a small amount. - * The fuzz member of image defines how much tolerance is acceptable - * to consider two colors as the same. This parameter represents the variation - * on the quantum range. - *
- * @return bool TRUE on success. - */ - public function trimImage ($fuzz) {} - - /** - * (PECL imagick 2.0.0)- * The amplitude of the wave. - *
- * @param float $length- * The length of the wave. - *
- * @return bool TRUE on success. - */ - public function waveImage ($amplitude, $length) {} - - /** - * (PECL imagick 2.0.0)- * The black point. - *
- * @param float $whitePoint- * The white point - *
- * @param int $x- * X offset of the ellipse - *
- * @param int $y- * Y offset of the ellipse - *
- * @return bool TRUE on success. - */ - public function vignetteImage ($blackPoint, $whitePoint, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * True activates the matte channel and false disables it. - *
- * @return bool TRUE on success. - */ - public function setImageMatte ($matte) {} - - /** - * Adaptively resize image with data dependent triangulation - * - * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.- * The radius of the Gaussian, in pixels, not counting the center pixel - *
- * @param float $sigma- * The standard deviation of the Gaussian, in pixels. - *
- * @param float $angle- * Apply the effect along this angle. - *
- * @return bool TRUE on success. - */ - public function sketchImage ($radius, $sigma, $angle) {} - - /** - * (PECL imagick 2.0.0)- * A value other than zero shades the intensity of each pixel. - *
- * @param float $azimuth- * Defines the light source direction. - *
- * @param float $elevation- * Defines the light source direction. - *
- * @return bool TRUE on success. - */ - public function shadeImage ($gray, $azimuth, $elevation) {} - - /** - * (PECL imagick 2.0.0)- * The width in pixels. - *
- * @param int $rows- * The height in pixels. - *
- * @param int $offset- * The image offset. - *
- * @return bool TRUE on success. - */ - public function setSizeOffset ($columns, $rows, $offset) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the Gaussian, in pixels, not counting the center pixel. - * Provide a value of 0 and the radius will be chosen automagically. - *
- * @param float $sigma- * The standard deviation of the Gaussian, in pixels. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return bool TRUE on success. - */ - public function adaptiveBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)- * The black point. - *
- * @param float $white_point- * The white point. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Imagick::CHANNEL_ALL. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function contrastStretchImage ($black_point, $white_point, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select. - *
- * @param float $sigma- * The standard deviation of the Gaussian, in pixels. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return bool TRUE on success. - */ - public function adaptiveSharpenImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)- * The low point - *
- * @param float $high- * The high point - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function randomThresholdImage ($low, $high, $channel = Imagick::CHANNEL_ALL) {} - - /** - * @param $xRounding - * @param $yRounding - * @param $strokeWidth [optional] - * @param $displace [optional] - * @param $sizeCorrection [optional] - */ - public function roundCornersImage ($xRounding, $yRounding, $strokeWidth, $displace, $sizeCorrection) {} - - /** - * (PECL imagick 2.0.0)- * x rounding - *
- * @param float $y_rounding- * y rounding - *
- * @param float $stroke_width [optional]- * stroke width - *
- * @param float $displace [optional]- * image displace - *
- * @param float $size_correction [optional]- * size correction - *
- * @return bool TRUE on success. - */ - public function roundCorners ($x_rounding, $y_rounding, $stroke_width = 10.0, $displace = 5.0, $size_correction = -6.0) {} - - /** - * (PECL imagick 2.0.0)- * The position to set the iterator to - *
- * @return bool TRUE on success. - */ - public function setIteratorIndex ($index) {} - - /** - * (PECL imagick 2.0.0)- * A crop geometry string. This geometry defines a subregion of the image to crop. - *
- * @param string $geometry- * An image geometry string. This geometry defines the final size of the image. - *
- * @return Imagick TRUE on success. - */ - public function transformImage ($crop, $geometry) {} - - /** - * (PECL imagick 2.0.0)- * The level of transparency: 1.0 is fully opaque and 0.0 is fully - * transparent. - *
- * @return bool TRUE on success. - */ - public function setImageOpacity ($opacity) {} - - /** - * (PECL imagick 2.2.2)- * A string containing the name of the threshold dither map to use - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function orderedPosterizeImage ($threshold_map, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The polaroid properties - *
- * @param float $angle- * The polaroid angle - *
- * @return bool TRUE on success. - */ - public function polaroidImage (ImagickDraw $properties, $angle) {} - - /** - * (PECL imagick 2.0.0)- * name of the property (for example Exif:DateTime) - *
- * @return string|false a string containing the image property, false if a - * property with the given name does not exist. - */ - public function getImageProperty ($name) {} - - /** - * (PECL imagick 2.0.0)- * The method is one of the Imagick::INTERPOLATE_* constants - *
- * @return bool TRUE on success. - */ - public function setImageInterpolateMethod ($method) {} - - /** - * (PECL imagick 2.0.0)- * The image black point - *
- * @param float $whitePoint- * The image white point - *
- * @return bool TRUE on success. - */ - public function linearStretchImage ($blackPoint, $whitePoint) {} - - /** - * (PECL imagick 2.0.0)- * The new width - *
- * @param int $height- * The new height - *
- * @param int $x- * X position for the new size - *
- * @param int $y- * Y position for the new size - *
- * @return bool TRUE on success. - */ - public function extentImage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * One of the orientation constants - *
- * @return bool TRUE on success. - */ - public function setImageOrientation ($orientation) {} - - /** - * (PECL imagick 2.1.0)- * ImagickPixel object or a string containing the fill color - *
- * @param float $fuzz- * The amount of fuzz. For example, set fuzz to 10 and the color red at - * intensities of 100 and 102 respectively are now interpreted as the - * same color for the purposes of the floodfill. - *
- * @param mixed $bordercolor- * ImagickPixel object or a string containing the border color - *
- * @param int $x- * X start position of the floodfill - *
- * @param int $y- * Y start position of the floodfill - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return bool TRUE on success. - */ - public function paintFloodfillImage ($fill, $fuzz, $bordercolor, $x, $y, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * Imagick object containing the color lookup table - *
- * @param int $channel [optional]- * The Channeltype - * constant. When not supplied, default channels are replaced. - *
- * @return bool TRUE on success. - * @since 2.0.0 - */ - public function clutImage (Imagick $lookup_table, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)- * The pattern for property names. - *
- * @param bool $only_names [optional]- * Whether to return only property names. If FALSE then also the values are returned - *
- * @return array an array containing the image properties or property names. - */ - public function getImageProperties ($pattern = "*", $only_names = true) {} - - /** - * (PECL imagick 2.2.0)- * The pattern for profile names. - *
- * @param bool $include_values [optional]- * Whether to return only profile names. If FALSE then only profile names will be returned. - *
- * @return array an array containing the image profiles or profile names. - */ - public function getImageProfiles ($pattern = "*", $include_values = true) {} - - /** - * (PECL imagick 2.0.1)- * The method of image distortion. See distortion constants - *
- * @param array $arguments- * The arguments for this distortion method - *
- * @param bool $bestfit- * Attempt to resize destination to fit distorted source - *
- * @return bool TRUE on success. - */ - public function distortImage ($method, array $arguments, $bestfit) {} - - /** - * (No version information available, might only be in SVN)- * Filehandle where to write the image - *
- * @return bool TRUE on success. - */ - public function writeImageFile ($filehandle) {} - - /** - * (No version information available, might only be in SVN)- * Filehandle where to write the images - *
- * @return bool TRUE on success. - */ - public function writeImagesFile ($filehandle) {} - - /** - * (No version information available, might only be in SVN)- * The page definition. For example 7168x5147+0+0 - *
- * @return bool TRUE on success. - */ - public function resetImagePage ($page) {} - - /** - * (No version information available, might only be in SVN)- * The Imagick object containing the clip mask - *
- * @return bool TRUE on success. - */ - public function setImageClipMask (Imagick $clip_mask) {} - - /** - * (No version information available, might only be in SVN)- * X server address - *
- * @return bool TRUE on success. - */ - public function animateImages ($x_server) {} - - /** - * (No version information available, might only be in SVN)- * The matrix containing the color values - *
- * @return bool TRUE on success. - */ - public function recolorImage (array $matrix) {} - - /** - * (PECL imagick 2.1.0)- * Font name or a filename - *
- * @return bool TRUE on success. - */ - public function setFont ($font) {} - - /** - * (PECL imagick 2.1.0)- * Point size - *
- * @return bool TRUE on success. - */ - public function setPointSize ($point_size) {} - - /** - * (No version information available, might only be in SVN)- * One of the Imagick::LAYERMETHOD_* constants - *
- * @return Imagick Returns an Imagick object containing the merged image. - * @throws ImagickException - */ - public function mergeImageLayers ($layer_method) {} - - /** - * (No version information available, might only be in SVN)- * One of the Imagick::ALPHACHANNEL_* constants - *
- * @return bool TRUE on success. - */ - public function setImageAlphaChannel ($mode) {} - - /** - * (No version information available, might only be in SVN)- * ImagickPixel object or a string containing the fill color - *
- * @param float $fuzz- * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. - *
- * @param mixed $target- * ImagickPixel object or a string containing the target color to paint - *
- * @param int $x- * X start position of the floodfill - *
- * @param int $y- * Y start position of the floodfill - *
- * @param bool $invert- * If TRUE paints any pixel that does not match the target color. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return bool TRUE on success. - */ - public function floodFillPaintImage ($fill, $fuzz, $target, $x, $y, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)- * ImagickPixel object or a string containing the color to change - *
- * @param mixed $fill- * The replacement color - *
- * @param float $fuzz- * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. - *
- * @param bool $invert- * If TRUE paints any pixel that does not match the target color. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return bool TRUE on success. - */ - public function opaquePaintImage ($target, $fill, $fuzz, $invert, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)- * The target color to paint - *
- * @param float $alpha- * The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent. - *
- * @param float $fuzz- * The amount of fuzz. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color. - *
- * @param bool $invert- * If TRUE paints any pixel that does not match the target color. - *
- * @return bool TRUE on success. - */ - public function transparentPaintImage ($target, $alpha, $fuzz, $invert) {} - - /** - * (No version information available, might only be in SVN)- * The width of the target size - *
- * @param int $height- * The height of the target size - *
- * @param float $delta_x- * How much the seam can traverse on x-axis. - * Passing 0 causes the seams to be straight. - *
- * @param float $rigidity- * Introduces a bias for non-straight seams. This parameter is - * typically 0. - *
- * @return bool TRUE on success. - */ - public function liquidRescaleImage ($width, $height, $delta_x, $rigidity) {} - - /** - * (No version information available, might only be in SVN)- * The passphrase - *
- * @return bool TRUE on success. - */ - public function encipherImage ($passphrase) {} - - /** - * (No version information available, might only be in SVN)- * The passphrase - *
- * @return bool TRUE on success. - */ - public function decipherImage ($passphrase) {} - - /** - * (No version information available, might only be in SVN)- * The gravity property. Refer to the list of - * gravity constants. - *
- * @return bool No value is returned. - */ - public function setGravity ($gravity) {} - - /** - * (No version information available, might only be in SVN)- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return array an array containing minima and maxima values of the channel(s). - */ - public function getImageChannelRange ($channel) {} - - /** - * (No version information available, might only be in SVN)- * Imagick object containing the reference image - *
- * @param int $metric- * Refer to this list of metric type constants. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return float a double describing the channel distortion. - */ - public function getImageChannelDistortions (Imagick $reference, $metric, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)- * The gravity property. Refer to the list of - * gravity constants. - *
- * @return bool No value is returned. - */ - public function setImageGravity ($gravity) {} - - /** - * (No version information available, might only be in SVN)- * The image x position - *
- * @param int $y- * The image y position - *
- * @param int $width- * The image width - *
- * @param int $height- * The image height - *
- * @param string $map- * Map of pixel ordering as a string. This can be for example RGB. - * The value can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), - * O = opacity (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad. - *
- * @param int $storage- * The pixel storage method. - * Refer to this list of pixel constants. - *
- * @param array $pixels- * The array of pixels - *
- * @return bool TRUE on success. - */ - public function importImagePixels ($x, $y, $width, $height, $map, $storage, array $pixels) {} - - /** - * (No version information available, might only be in SVN)- * Deskew threshold - *
- * @return bool - */ - public function deskewImage ($threshold) {} - - /** - * (No version information available, might only be in SVN)- * One of the COLORSPACE constants. - *
- * @param float $cluster_threshold- * A percentage describing minimum number of pixels - * contained in hexedra before it is considered valid. - *
- * @param float $smooth_threshold- * Eliminates noise from the histogram. - *
- * @param bool $verbose [optional]- * Whether to output detailed information about recognised classes. - *
- * @return bool - */ - public function segmentImage ($COLORSPACE, $cluster_threshold, $smooth_threshold, $verbose = false) {} - - /** - * (No version information available, might only be in SVN)- * Refer to this list of sparse method constants - *
- * @param array $arguments- * An array containing the coordinates. - * The array is in format array(1,1, 2,45) - *
- * @param int $channel [optional] - * @return bool TRUE on success. - */ - public function sparseColorImage ($SPARSE_METHOD, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)- * An Imagick object containing the replacement colors - *
- * @param int $DITHER- * Refer to this list of dither method constants - *
- * @return bool TRUE on success. - */ - public function remapImage (Imagick $replacement, $DITHER) {} - - /** - * (No version information available, might only be in SVN)- * X-coordinate of the exported area - *
- * @param int $y- * Y-coordinate of the exported area - *
- * @param int $width- * Width of the exported aread - *
- * @param int $height- * Height of the exported area - *
- * @param string $map- * Ordering of the exported pixels. For example "RGB". - * Valid characters for the map are R, G, B, A, O, C, Y, M, K, I and P. - *
- * @param int $STORAGE- * Refer to this list of pixel type constants - *
- * @return array an array containing the pixels values. - */ - public function exportImagePixels ($x, $y, $width, $height, $map, $STORAGE) {} - - /** - * (No version information available, might only be in SVN)- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return array an array with kurtosis and skewness - * members. - */ - public function getImageChannelKurtosis ($channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (No version information available, might only be in SVN)- * Refer to this list of function constants - *
- * @param array $arguments- * Array of arguments to pass to this function. - *
- * @param int $channel [optional] - * @return bool TRUE on success. - */ - public function functionImage ($function, array $arguments, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * @param $COLORSPACE - */ - public function transformImageColorspace ($COLORSPACE) {} - - /** - * (No version information available, might only be in SVN)- * Imagick object containing the Hald lookup image. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return bool TRUE on success. - */ - public function haldClutImage (Imagick $clut, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * @param $CHANNEL [optional] - */ - public function autoLevelImage ($CHANNEL) {} - - /** - * @param $factor [optional] - */ - public function blueShiftImage ($factor) {} - - /** - * (No version information available, might only be in SVN)- * The name of the artifact - *
- * @return string the artifact value on success. - */ - public function getImageArtifact ($artifact) {} - - /** - * (No version information available, might only be in SVN)- * The name of the artifact - *
- * @param string $value- * The value of the artifact - *
- * @return bool TRUE on success. - */ - public function setImageArtifact ($artifact, $value) {} - - /** - * (No version information available, might only be in SVN)- * The name of the artifact to delete - *
- * @return bool TRUE on success. - */ - public function deleteImageArtifact ($artifact) {} - - /** - * (PECL imagick 0.9.10-0.9.9)- * One of the COLORSPACE constants - *
- * @return bool TRUE on success. - */ - public function setColorspace ($COLORSPACE) {} - - /** - * @param $CHANNEL [optional] - */ - public function clampImage ($CHANNEL) {} - - /** - * @param $stack - * @param $offset - */ - public function smushImages ($stack, $offset) {} - - /** - * (PECL imagick 2.0.0)- * The path to an image to load or an array of paths. Paths can include - * wildcards for file names, or can be URLs. - *
- * @throws ImagickException Throws ImagickException on error. - */ - public function __construct ($files = null) {} - - /** - * @return string - */ - public function __toString () {} - - public function count () {} - - /** - * (PECL imagick 2.0.0)- * The x-coordinate of the region. - *
- * @param int $y- * The y-coordinate of the region. - *
- * @param int $columns- * The width of the region. - *
- * @param int $rows- * The height of the region. - *
- * @return ImagickPixelIterator an ImagickPixelIterator for an image section. - */ - public function getPixelRegionIterator ($x, $y, $columns, $rows) {} - - /** - * (PECL imagick 0.9.0-0.9.9)- * String presentation of the image format. Format support - * depends on the ImageMagick installation. - *
- * @return bool TRUE on success. - */ - public function setImageFormat ($format) {} - - /** - * Scales the size of an image to the given dimensions. Passing zero as either of the arguments will preserve dimension while scaling.- * Filename where to write the image. The extension of the filename - * defines the type of the file. - * Format can be forced regardless of file extension using format: prefix, - * for example "jpg:test.png". - *
- * @return bool TRUE on success. - */ - public function writeImage ($filename = NULL) {} - - /** - * (PECL imagick 0.9.0-0.9.9)- * Blur radius - *
- * @param float $sigma- * Standard deviation - *
- * @param int $channel [optional]- * The Channeltype - * constant. When not supplied, all channels are blurred. - *
- * @return bool TRUE on success. - */ - public function blurImage ($radius, $sigma, $channel = null) {} - - /** - * Changes the size of an image to the given dimensions and removes any associated profiles.- * Image width - *
- * @param int $rows- * Image height - *
- * @param bool $bestfit [optional]- * Whether to force maximum values - *
- * The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. - * @param bool $fill [optional] - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool TRUE on success. - * @since 2.0.0 - */ - public function thumbnailImage ($columns, $rows, $bestfit = false, $fill = false, $legacy = false) {} - - /** - * Creates a cropped thumbnail at the requested size. - * If legacy is true, uses the incorrect behaviour that was present until Imagick 3.4.0. - * If false it uses the correct behaviour. - * @link https://php.net/manual/en/imagick.cropthumbnailimage.php - * @param int $width The width of the thumbnail - * @param int $height The Height of the thumbnail - * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool TRUE on succes - * @throws ImagickException Throws ImagickException on error - * @since 2.0.0 - */ - public function cropThumbnailImage ($width, $height, $legacy = false) {} - - /** - * (PECL imagick 2.0.0)- * The position to set the iterator to - *
- * @return bool TRUE on success. - */ - public function setImageIndex ($index) {} - - /** - * (PECL imagick 2.0.0)- * The comment to add - *
- * @return bool TRUE on success. - */ - public function commentImage ($comment) {} - - /** - * (PECL imagick 2.0.0)- * The width of the crop - *
- * @param int $height- * The height of the crop - *
- * @param int $x- * The X coordinate of the cropped region's top left corner - *
- * @param int $y- * The Y coordinate of the cropped region's top left corner - *
- * @return bool TRUE on success. - */ - public function cropImage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * The label to add - *
- * @return bool TRUE on success. - */ - public function labelImage ($label) {} - - /** - * (PECL imagick 2.0.0)- * The drawing operations to render on the image. - *
- * @return bool TRUE on success. - */ - public function drawImage (ImagickDraw $draw) {} - - /** - * (No version information available, might only be in SVN)- * The image compression quality as an integer - *
- * @return bool TRUE on success. - */ - public function setImageCompressionQuality ($quality) {} - - /** - * (PECL imagick 2.2.2)- * The ImagickDraw object that contains settings for drawing the text - *
- * @param float $x- * Horizontal offset in pixels to the left of text - *
- * @param float $y- * Vertical offset in pixels to the baseline of text - *
- * @param float $angle- * The angle at which to write the text - *
- * @param string $text- * The string to draw - *
- * @return bool TRUE on success. - */ - public function annotateImage (ImagickDraw $draw_settings, $x, $y, $angle, $text) {} - - /** - * (PECL imagick 2.0.0)- * Imagick object which holds the composite image - *
- * @param int $composite Composite operator - * @param int $x- * The column offset of the composited image - *
- * @param int $y- * The row offset of the composited image - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this list of channel constants. - *
- * @return bool TRUE on success. - */ - public function compositeImage (Imagick $composite_object, $composite, $x, $y, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The font name, size, and color are obtained from this object. - *
- * @param string $tile_geometry- * The number of tiles per row and page (e.g. 6x4+0+0). - *
- * @param string $thumbnail_geometry- * Preferred image size and border size of each thumbnail - * (e.g. 120x120+4+3>). - *
- * @param int $mode- * Thumbnail framing mode, see Montage Mode constants. - *
- * @param string $frame- * Surround the image with an ornamental border (e.g. 15x15+3+3). The - * frame color is that of the thumbnail's matte color. - *
- * @return Imagick TRUE on success. - */ - public function montageImage (ImagickDraw $draw, $tile_geometry, $thumbnail_geometry, $mode, $frame) {} - - /** - * (PECL imagick 2.0.0)- * Width of the local neighborhood. - *
- * @param int $height- * Height of the local neighborhood. - *
- * @param int $offset- * The mean offset - *
- * @return bool TRUE on success. - */ - public function adaptiveThresholdImage ($width, $height, $offset) {} - - /** - * (PECL imagick 2.0.0)- * The threshold below which everything turns black - *
- * @return bool TRUE on success. - */ - public function blackThresholdImage ($threshold) {} - - /** - * (PECL imagick 2.0.0)- * Whether to stack the images vertically. - * By default (or if FALSE is specified) images are stacked left-to-right. - * If stack is TRUE, images are stacked top-to-bottom. - *
- * @return Imagick Imagick instance on success. - */ - public function appendImages ($stack = false) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the Gaussian, in pixels, not counting the center pixel - *
- * @param float $sigma- * The standard deviation of the Gaussian, in pixels - *
- * @return bool TRUE on success. - */ - public function charcoalImage ($radius, $sigma) {} - - /** - * (PECL imagick 2.0.0)- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function normalizeImage ($channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the circular neighborhood. - *
- * @return bool TRUE on success. - */ - public function oilPaintImage ($radius) {} - - /** - * (PECL imagick 2.0.0)- * The X offset. - *
- * @param int $y- * The Y offset. - *
- * @return bool TRUE on success. - */ - public function rollImage ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * The background color - *
- * @param float $degrees- * The number of degrees to rotate the image - *
- * @return bool TRUE on success. - */ - public function rotateImage ($background, $degrees) {} - - /** - * (PECL imagick 2.0.0)- * One of the COMPRESSION constants - *
- * @return bool TRUE on success. - */ - public function setImageCompression ($compression) {} - - /** - * (PECL imagick 2.0.0)- * The amount of time expressed in 'ticks' that the image should be - * displayed for. For animated GIFs there are 100 ticks per second, so a - * value of 20 would be 20/100 of a second aka 1/5th of a second. - *
- * @return bool TRUE on success. - */ - public function setImageDelay ($delay) {} - - /** - * (PECL imagick 2.0.0)- * The number of iterations the image should loop over. Set to '0' to loop - * continuously. - *
- * @return bool TRUE on success. - */ - public function setImageIterations ($iterations) {} - - /** - * (PECL imagick 2.0.0)- * The duration for which an image should be displayed expressed in ticks - * per second. - *
- * @return bool TRUE on success. - */ - public function setImageTicksPerSecond ($ticks_per_second) {} - - /** - * (PECL imagick 2.0.0)- * The background color - *
- * @param float $x_shear- * The number of degrees to shear on the x axis - *
- * @param float $y_shear- * The number of degrees to shear on the y axis - *
- * @return bool TRUE on success. - */ - public function shearImage ($background, $x_shear, $y_shear) {} - - /** - * (PECL imagick 2.0.0)- * The filename to read the information from. - *
- * @return bool TRUE on success. - */ - public function pingImage ($filename) {} - - /** - * (PECL imagick 2.0.0)- * The X server name - *
- * @return bool TRUE on success. - */ - public function displayImage ($servername) {} - - /** - * (PECL imagick 2.0.0)- * The X server name - *
- * @return bool TRUE on success. - */ - public function displayImages ($servername) {} - - /** - * (PECL imagick 2.0.0)- * The query pattern - *
- * @return array an array containing the configured fonts. - */ - public static function queryFonts ($pattern = "*") {} - - /** - * (PECL imagick 2.0.0)- * ImagickDraw object containing font properties - *
- * @param string $text- * The text - *
- * @param bool $multiline [optional]- * Multiline parameter. If left empty it is autodetected - *
- * @return array a multi-dimensional array representing the font metrics. - */ - public function queryFontMetrics (ImagickDraw $properties, $text, $multiline = null) {} - - /** - * (PECL imagick 2.0.0)- * The type of the noise. Refer to this list of - * noise constants. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return bool TRUE on success. - */ - public function addNoiseImage ($noise_type, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the Gaussian, in pixels, not counting the center pixel. - *
- * @param float $sigma- * The standard deviation of the Gaussian, in pixels. - *
- * @param float $angle- * Apply the effect along this angle. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - * The channel argument affects only if Imagick is compiled against ImageMagick version - * 6.4.4 or greater. - *
- * @return bool TRUE on success. - */ - public function motionBlurImage ($radius, $sigma, $angle, $channel = Imagick::CHANNEL_DEFAULT) {} - - /** - * (PECL imagick 2.0.0)- * The number of in-between images to generate. - *
- * @return Imagick This method returns a new Imagick object on success. - * Throw an ImagickException on error. - * @throws ImagickException on error - */ - public function morphImages ($number_frames) {} - - /** - * (PECL imagick 2.0.0)- * The affine matrix - *
- * @return bool TRUE on success. - */ - public function affineTransformImage (ImagickDraw $matrix) {} - - /** - * (PECL imagick 2.0.0)- * ImagickPixel object or a string containing the border color - *
- * @param int $width- * Border width - *
- * @param int $height- * Border height - *
- * @return bool TRUE on success. - */ - public function borderImage ($bordercolor, $width, $height) {} - - /** - * (PECL imagick 2.0.0)- * Width of the chopped area - *
- * @param int $height- * Height of the chopped area - *
- * @param int $x- * X origo of the chopped area - *
- * @param int $y- * Y origo of the chopped area - *
- * @return bool TRUE on success. - */ - public function chopImage ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * The name of the path - *
- * @param bool $inside- * If TRUE later operations take effect inside clipping path. - * Otherwise later operations take effect outside clipping path. - *
- * @return bool TRUE on success. - */ - public function clipPathImage ($pathname, $inside) {} - - /** - * @param $pathname - * @param $inside - */ - public function clipImagePath ($pathname, $inside) {} - - /** - * (PECL imagick 2.0.0)- * ImagickPixel object containing the fill color - *
- * @param float $fuzz- * The amount of fuzz. For example, set fuzz to 10 and the color red at - * intensities of 100 and 102 respectively are now interpreted as the - * same color for the purposes of the floodfill. - *
- * @param mixed $bordercolor- * ImagickPixel object containing the border color - *
- * @param int $x- * X start position of the floodfill - *
- * @param int $y- * Y start position of the floodfill - *
- * @return bool TRUE on success. - */ - public function colorFloodfillImage ($fill, $fuzz, $bordercolor, $x, $y) {} - - /** - * Blends the fill color with each pixel in the image. The 'opacity' color is a per channel strength factor for how strongly the color should be applied.- * ImagickPixel object or a string containing the colorize color - *
- * @param mixed $opacity- * ImagickPixel object or an float containing the opacity value. - * 1.0 is fully opaque and 0.0 is fully transparent. - *
- * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE - * @return bool TRUE on success. - * @throws ImagickException Throws ImagickException on error - * @since 2.0.0 - */ - public function colorizeImage ($colorize, $opacity, $legacy = false) {} - - /** - * (PECL imagick 2.0.0)- * Imagick object containing the image to compare. - *
- * @param int $channelType- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @param int $metricType- * One of the metric type constants. - *
- * @return array Array consisting of new_wand and - * distortion. - */ - public function compareImageChannels (Imagick $image, $channelType, $metricType) {} - - /** - * (PECL imagick 2.0.0)- * An image to compare to. - *
- * @param int $metric- * Provide a valid metric type constant. Refer to this - * list of metric constants. - *
- * @return array Array consisting of an Imagick object of the - * reconstructed image and a double representing the difference. - * @throws ImagickException Throws ImagickException on error. - */ - public function compareImages (Imagick $compare, $metric) {} - - /** - * (PECL imagick 2.0.0)- * The sharpen value - *
- * @return bool TRUE on success. - */ - public function contrastImage ($sharpen) {} - - /** - * (PECL imagick 2.0.0)- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return Imagick TRUE on success. - */ - public function combineImages ($channelType) {} - - /** - * (PECL imagick 2.0.0)- * The convolution kernel - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function convolveImage (array $kernel, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The amount to displace the colormap. - *
- * @return bool TRUE on success. - */ - public function cycleColormapImage ($displace) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the operation. - *
- * @return bool TRUE on success. - */ - public function edgeImage ($radius) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the effect - *
- * @param float $sigma- * The sigma of the effect - *
- * @return bool TRUE on success. - */ - public function embossImage ($radius, $sigma) {} - - /** - * (PECL imagick 2.0.0)- * The evaluation operator - *
- * @param float $constant- * The value of the operator - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function evaluateImage ($op, $constant, $channel = Imagick::CHANNEL_ALL) {} - - /** - * Merges a sequence of images. This is useful for combining Photoshop layers into a single image. - * This is replaced by: - *- * $im = $im->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN) - *- * @link https://php.net/manual/en/imagick.flattenimages.php - * @return Imagick Returns an Imagick object containing the merged image. - * @throws ImagickException Throws ImagickException on error. - * @since 2.0.0 - */ - public function flattenImages () {} - - /** - * (PECL imagick 2.0.0)
- * ImagickPixel object or a string representing the matte color - *
- * @param int $width- * The width of the border - *
- * @param int $height- * The height of the border - *
- * @param int $inner_bevel- * The inner bevel width - *
- * @param int $outer_bevel- * The outer bevel width - *
- * @return bool TRUE on success. - */ - public function frameImage ($matte_color, $width, $height, $inner_bevel, $outer_bevel) {} - - /** - * (PECL imagick 2.0.0)- * The expression. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return Imagick TRUE on success. - */ - public function fxImage ($expression, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The amount of gamma-correction. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function gammaImage ($gamma, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the Gaussian, in pixels, not counting the center pixel. - *
- * @param float $sigma- * The standard deviation of the Gaussian, in pixels. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function gaussianBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_ALL) {} - - /** - * @param $key - */ - public function getImageAttribute ($key) {} - - /** - * (PECL imagick 2.0.0)- * Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channel constants using bitwise operators. Defaults to Imagick::CHANNEL_DEFAULT. Refer to this list of channel constants - *
- * @return int TRUE on success. - */ - public function getImageChannelDepth ($channel) {} - - /** - * (PECL imagick 2.0.0)- * Imagick object to compare to. - *
- * @param int $channel- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @param int $metric- * One of the metric type constants. - *
- * @return float TRUE on success. - */ - public function getImageChannelDistortion (Imagick $reference, $channel, $metric) {} - - /** - * (PECL imagick 2.0.0)- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return array TRUE on success. - */ - public function getImageChannelExtrema ($channel) {} - - /** - * (PECL imagick 2.0.0)- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return array TRUE on success. - */ - public function getImageChannelMean ($channel) {} - - /** - * (PECL imagick 2.0.0)- * The offset into the image colormap. - *
- * @return ImagickPixel TRUE on success. - */ - public function getImageColormapColor ($index) {} - - /** - * (PECL imagick 2.0.0)- * Imagick object to compare to. - *
- * @param int $metric- * One of the metric type constants. - *
- * @return float the distortion metric used on the image (or the best guess - * thereof). - */ - public function getImageDistortion (Imagick $reference, $metric) {} - - /** - * (PECL imagick 2.0.0)- * The x-coordinate of the pixel - *
- * @param int $y- * The y-coordinate of the pixel - *
- * @return ImagickPixel an ImagickPixel instance for the color at the coordinates given. - */ - public function getImagePixelColor ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * The name of the profile to return. - *
- * @return string a string containing the image profile. - */ - public function getImageProfile ($name) {} - - /** - * (PECL imagick 2.0.0)- * The width of the extracted region. - *
- * @param int $height- * The height of the extracted region. - *
- * @param int $x- * X-coordinate of the top-left corner of the extracted region. - *
- * @param int $y- * Y-coordinate of the top-left corner of the extracted region. - *
- * @return Imagick Extracts a region of the image and returns it as a new wand. - */ - public function getImageRegion ($width, $height, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the implode - *
- * @return bool TRUE on success. - */ - public function implodeImage ($radius) {} - - /** - * (PECL imagick 2.0.0)- * The image black point - *
- * @param float $gamma- * The gamma value - *
- * @param float $whitePoint- * The image white point - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function levelImage ($blackPoint, $gamma, $whitePoint, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * The level of transparency: 1.0 is fully opaque and 0.0 is fully - * transparent. - *
- * @param float $fuzz- * The fuzz member of image defines how much tolerance is acceptable to - * consider two colors as the same. - *
- * @param mixed $bordercolor- * An ImagickPixel object or string representing the border color. - *
- * @param int $x- * The starting x coordinate of the operation. - *
- * @param int $y- * The starting y coordinate of the operation. - *
- * @return bool TRUE on success. - */ - public function matteFloodfillImage ($alpha, $fuzz, $bordercolor, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * The radius of the pixel neighborhood. - *
- * @return bool TRUE on success. - */ - public function medianFilterImage ($radius) {} - - /** - * (PECL imagick 2.0.0)- * Whether to only negate grayscale pixels within the image. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function negateImage ($gray, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * Change this target color to the fill color within the image. An - * ImagickPixel object or a string representing the target color. - *
- * @param mixed $fill- * An ImagickPixel object or a string representing the fill color. - *
- * @param float $fuzz- * The fuzz member of image defines how much tolerance is acceptable to - * consider two colors as the same. - *
- * @param int $channel [optional]- * Provide any channel constant that is valid for your channel mode. To - * apply to more than one channel, combine channeltype constants using - * bitwise operators. Refer to this - * list of channel constants. - *
- * @return bool TRUE on success. - */ - public function paintOpaqueImage ($target, $fill, $fuzz, $channel = Imagick::CHANNEL_ALL) {} - - /** - * (PECL imagick 2.0.0)- * Change this target color to specified opacity value within the image. - *
- * @param float $alpha- * The level of transparency: 1.0 is fully opaque and 0.0 is fully - * transparent. - *
- * @param float $fuzz- * The fuzz member of image defines how much tolerance is acceptable to - * consider two colors as the same. - *
- * @return bool TRUE on success. - */ - public function paintTransparentImage ($target, $alpha, $fuzz) {} - - /** - * (PECL imagick 2.0.0)- * Preview type. See Preview type constants - *
- * @return bool TRUE on success. - */ - public function previewImages ($preview) {} - - /** - * (PECL imagick 2.0.0)- * The border color - *
- * @return bool TRUE on success. - */ - public function setImageBorderColor ($border) {} - - /** - * (PECL imagick 2.0.0)- * One of the COLORSPACE constants - *
- * @return bool TRUE on success. - */ - public function setImageColorspace ($colorspace) {} - - /** - * (PECL imagick 2.0.0)- * The source Imagick object - *
- * @return bool TRUE on success. - */ - public function addImage (Imagick $source) {} - - /** - * (PECL imagick 2.0.0)- * The replace Imagick object - *
- * @return bool TRUE on success. - */ - public function setImage (Imagick $replace) {} - - /** - * (PECL imagick 2.0.0)- * Columns in the new image - *
- * @param int $rows- * Rows in the new image - *
- * @param mixed $background- * The background color used for this image - *
- * @param string $format [optional]- * Image format. This parameter was added in Imagick version 2.0.1. - *
- * @return bool TRUE on success. - */ - public function newImage ($cols, $rows, $background, $format = null) {} - - /** - * (PECL imagick 2.0.0)- * columns in the new image - *
- * @param int $rows- * rows in the new image - *
- * @param string $pseudoString- * string containing pseudo image definition. - *
- * @return bool TRUE on success. - */ - public function newPseudoImage ($columns, $rows, $pseudoString) {} - - /** - * (PECL imagick 2.0.0)- * The name of the option - *
- * @return string a value associated with a wand and the specified key. - */ - public function getOption ($key) {} - - /** - * (PECL imagick 2.0.0)- * Refer to the list of resourcetype constants. - *
- * @return int the specified resource's memory usage in megabytes. - */ - public static function getResource ($type) {} - - /** - * (PECL imagick 2.0.0)- * Refer to the list of resourcetype constants. - *
- * @return int the specified resource limit in megabytes. - */ - public static function getResourceLimit ($type) {} - - /** - * (PECL imagick 2.0.0)- * Refer to the list of resourcetype constants. - *
- * @param int $limit- * The resource limit. The unit depends on the type of the resource being limited. - *
- * @return bool TRUE on success. - */ - public static function setResourceLimit ($type, $limit) {} - - /** - * (PECL imagick 2.0.0)- * The horizontal resolution. - *
- * @param float $y_resolution- * The vertical resolution. - *
- * @return bool TRUE on success. - */ - public function setResolution ($x_resolution, $y_resolution) {} - - /** - * (PECL imagick 2.0.0)bool callback ( mixed $offset , mixed $span )- * Caution - * The values passed to the callback function are not consistent. In particular the span parameter can increase during image processing. Because of this calculating the percentage complete of an image operation is not trivial. - * @return void - * @since 3.3.0 - */ - public function setProgressMonitor ($callback) { } - - /** - * Sets the ImageMagick registry entry named key to value. This is most useful for setting "temporary-path" which controls where ImageMagick creates temporary images e.g. while processing PDFs. - * @link https://php.net/manual/en/imagick.setregistry.php - * @param string $key - * @param string $value - * @return void - * @since 3.3.0 - */ - public static function setRegistry ($key, $value) { } - - /** - * Replace each pixel with corresponding statistic from the neighborhood of the specified width and height. - * @link https://php.net/manual/en/imagick.statisticimage.php - * @param int $type - * @param int $width - * @param int $height - * @param int $channel [optional] - * @return void - * @since 3.3.0 - */ - public function statisticImage ($type, $width, $height, $channel = Imagick::CHANNEL_DEFAULT ) { } - - /** - * Searches for a subimage in the current image and returns a similarity image such that an exact match location is - * completely white and if none of the pixels match, black, otherwise some gray level in-between. - * You can also pass in the optional parameters bestMatch and similarity. After calling the function similarity will - * be set to the 'score' of the similarity between the subimage and the matching position in the larger image, - * bestMatch will contain an associative array with elements x, y, width, height that describe the matching region. - * - * @link https://php.net/manual/en/imagick.subimagematch.php - * @param Imagick $imagick - * @param array $bestMatch [optional] - * @param float $similarity [optional] A new image that displays the amount of similarity at each pixel. - * @param float $similarity_threshold [optional] Only used if compiled with ImageMagick (library) > 7 - * @param int $metric [optional] Only used if compiled with ImageMagick (library) > 7 - * @return Imagick - * @since 3.3.0 - */ - public function subImageMatch (Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) { } - - /** - * Is an alias of Imagick::subImageMatch - * - * @param Imagick $imagick - * @param array $bestMatch [optional] - * @param float $similarity [optional] A new image that displays the amount of similarity at each pixel. - * @param float $similarity_threshold [optional] - * @param int $metric [optional] - * @return Imagick - * @see Imagick::subImageMatch() This function is an alias of subImageMatch() - * @since 3.4.0 - */ - public function similarityImage (Imagick $imagick, array &$bestMatch, &$similarity, $similarity_threshold, $metric) { } - - /** - * Returns any ImageMagick configure options that match the specified pattern (e.g. "*" for all). Options include NAME, VERSION, LIB_VERSION, etc. - * @return string - * @since 3.4.0 - */ - public function getConfigureOptions () { } - - /** - * GetFeatures() returns the ImageMagick features that have been compiled into the runtime. - * @return string - * @since 3.4.0 - */ - public function getFeatures () { } - - /** - * @return int - * @since 3.4.0 - */ - public function getHDRIEnabled () { } - - /** - * Sets the image channel mask. Returns the previous set channel mask. - * Only works with Imagick >=7 - * @param int $channel - * @since 3.4.0 - */ - public function setImageChannelMask ($channel) {} - - /** - * Merge multiple images of the same size together with the selected operator. https://www.imagemagick.org/Usage/layers/#evaluate-sequence - * @param int $EVALUATE_CONSTANT - * @return bool - * @see https://www.imagemagick.org/Usage/layers/#evaluate-sequence - * @since 3.4.0 - */ - public function evaluateImages ($EVALUATE_CONSTANT) { } - - /** - * Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriately. - * @param int $channel [optional] Default value Imagick::CHANNEL_ALL - * @return bool - * @since 3.4.1 - */ - public function autoGammaImage ($channel = Imagick::CHANNEL_ALL) { } - - /** - * Adjusts an image so that its orientation is suitable $ for viewing (i.e. top-left orientation). - * @return bool - * @since 3.4.1 - */ - public function autoOrient () { } - - /** - * Composite one image onto another using the specified gravity. - * - * @param Imagick $imagick - * @param int $COMPOSITE_CONSTANT - * @param int $GRAVITY_CONSTANT - * @return bool - * @since 3.4.1 - */ - public function compositeImageGravity(Imagick $imagick, $COMPOSITE_CONSTANT, $GRAVITY_CONSTANT) { } - - /** - * Attempts to increase the appearance of large-scale light-dark transitions. - * - * @param float $radius - * @param float $strength - * @return bool - * @since 3.4.1 - */ - public function localContrastImage($radius, $strength) { } - - /** - * Identifies the potential image type, returns one of the Imagick::IMGTYPE_* constants - * @return int - * @since 3.4.3 - */ - public function identifyImageType() { } - - /** - * Sets the image to the specified alpha level. Will replace ImagickDraw::setOpacity() - * - * @param float $alpha - * @return bool - * @since 3.4.3 - */ - public function setImageAlpha($alpha) { } -} + /** + * (PECL imagick 2.0.0)
+ * FILLRULE_ constant + *
+ * @return bool No value is returned. + */ + public function setClipRule($fill_rule) {} -/** - * @method ImagickDraw clone() (PECL imagick 2.0.0)- * ImagickPixel to use to set the color - *
- * @return bool No value is returned. - */ - public function setFillColor (ImagickPixel $fill_pixel) {} - - /** - * (PECL imagick 2.0.0)- * fill alpha - *
- * @return bool No value is returned. - */ - public function setFillAlpha ($opacity) {} - - /** - * @param $x_resolution - * @param $y_resolution - */ - public function setResolution ($x_resolution, $y_resolution) {} - - /** - * (PECL imagick 2.0.0)- * the stroke color - *
- * @return bool No value is returned. - */ - public function setStrokeColor (ImagickPixel $stroke_pixel) {} - - /** - * (PECL imagick 2.0.0)- * opacity - *
- * @return bool No value is returned. - */ - public function setStrokeAlpha ($opacity) {} - - /** - * (PECL imagick 2.0.0)- * stroke width - *
- * @return bool No value is returned. - */ - public function setStrokeWidth ($stroke_width) {} - - /** - * (PECL imagick 2.0.0)- * origin x coordinate - *
- * @param float $oy- * origin y coordinate - *
- * @param float $px- * perimeter x coordinate - *
- * @param float $py- * perimeter y coordinate - *
- * @return bool No value is returned. - */ - public function circle ($ox, $oy, $px, $py) {} - - /** - * (PECL imagick 2.0.0)- * The x coordinate where text is drawn - *
- * @param float $y- * The y coordinate where text is drawn - *
- * @param string $text- * The text to draw on the image - *
- * @return bool No value is returned. - */ - public function annotation ($x, $y, $text) {} - - /** - * (PECL imagick 2.0.0)- * the encoding name - *
- * @return bool No value is returned. - */ - public function setTextEncoding ($encoding) {} - - /** - * (PECL imagick 2.0.0)- * the font family - *
- * @return bool TRUE on success. - */ - public function setFontFamily ($font_family) {} - - /** - * (PECL imagick 2.0.0)- * the point size - *
- * @return bool No value is returned. - */ - public function setFontSize ($pointsize) {} - - /** - * (PECL imagick 2.0.0)- * STYLETYPE_ constant - *
- * @return bool No value is returned. - */ - public function setFontStyle ($style) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the top left corner - *
- * @param float $y1- * y coordinate of the top left corner - *
- * @param float $x2- * x coordinate of the bottom right corner - *
- * @param float $y2- * y coordinate of the bottom right corner - *
- * @return bool No value is returned. - */ - public function rectangle ($x1, $y1, $x2, $y2) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the top left corner - *
- * @param float $y1- * y coordinate of the top left corner - *
- * @param float $x2- * x coordinate of the bottom right - *
- * @param float $y2- * y coordinate of the bottom right - *
- * @param float $rx- * x rounding - *
- * @param float $ry- * y rounding - *
- * @return bool No value is returned. - */ - public function roundRectangle ($x1, $y1, $x2, $y2, $rx, $ry) {} - - /** - * (PECL imagick 2.0.0)- * degrees to skew - *
- * @return bool No value is returned. - */ - public function skewX ($degrees) {} - - /** - * (PECL imagick 2.0.0)- * degrees to skew - *
- * @return bool No value is returned. - */ - public function skewY ($degrees) {} - - /** - * (PECL imagick 2.0.0)- * horizontal translation - *
- * @param float $y- * vertical translation - *
- * @return bool No value is returned. - */ - public function translate ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * starting x coordinate - *
- * @param float $sy- * starting y coordinate - *
- * @param float $ex- * ending x coordinate - *
- * @param float $ey- * ending y coordinate - *
- * @return bool No value is returned. - */ - public function line ($sx, $sy, $ex, $ey) {} - - /** - * (PECL imagick 2.0.0)- * Starting x ordinate of bounding rectangle - *
- * @param float $sy- * starting y ordinate of bounding rectangle - *
- * @param float $ex- * ending x ordinate of bounding rectangle - *
- * @param float $ey- * ending y ordinate of bounding rectangle - *
- * @param float $sd- * starting degrees of rotation - *
- * @param float $ed- * ending degrees of rotation - *
- * @return bool No value is returned. - */ - public function arc ($sx, $sy, $ex, $ey, $sd, $ed) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the matte - *
- * @param float $y- * y coordinate of the matte - *
- * @param int $paintMethod- * PAINT_ constant - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function matte ($x, $y, $paintMethod) {} - - /** - * (PECL imagick 2.0.0)- * multidimensional array like array( array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) ); - *
- * @return bool TRUE on success. - */ - public function polygon (array $coordinates) {} - - /** - * (PECL imagick 2.0.0)- * point's x coordinate - *
- * @param float $y- * point's y coordinate - *
- * @return bool No value is returned. - */ - public function point ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * STRETCH_ constant - *
- * @return bool No value is returned. - */ - public function setFontStretch ($fontStretch) {} - - /** - * (PECL imagick 2.0.0)- * the antialias setting - *
- * @return bool No value is returned. - */ - public function setStrokeAntialias ($stroke_antialias) {} - - /** - * (PECL imagick 2.0.0)- * ALIGN_ constant - *
- * @return bool No value is returned. - */ - public function setTextAlignment ($alignment) {} - - /** - * (PECL imagick 2.0.0)- * DECORATION_ constant - *
- * @return bool No value is returned. - */ - public function setTextDecoration ($decoration) {} - - /** - * (PECL imagick 2.0.0)- * the under color - *
- * @return bool No value is returned. - */ - public function setTextUnderColor (ImagickPixel $under_color) {} - - /** - * (PECL imagick 2.0.0)- * left x coordinate - *
- * @param int $y1- * left y coordinate - *
- * @param int $x2- * right x coordinate - *
- * @param int $y2- * right y coordinate - *
- * @return bool No value is returned. - */ - public function setViewbox ($x1, $y1, $x2, $y2) {} - - /** - * (PECL imagick 2.0.0)- * Affine matrix parameters - *
- * @return bool No value is returned. - */ - public function affine (array $affine) {} - - /** - * (PECL imagick 2.0.0)- * Multidimensional array like array( array( 'x' => 1, 'y' => 2 ), - * array( 'x' => 3, 'y' => 4 ) ) - *
- * @return bool No value is returned. - */ - public function bezier (array $coordinates) {} - - /** - * (PECL imagick 2.0.0)- * composition operator. One of COMPOSITE_ constants - *
- * @param float $x- * x coordinate of the top left corner - *
- * @param float $y- * y coordinate of the top left corner - *
- * @param float $width- * width of the composition image - *
- * @param float $height- * height of the composition image - *
- * @param Imagick $compositeWand- * the Imagick object where composition image is taken from - *
- * @return bool TRUE on success. - */ - public function composite ($compose, $x, $y, $width, $height, Imagick $compositeWand) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the paint - *
- * @param float $y- * y coordinate of the paint - *
- * @param int $paintMethod- * one of the PAINT_ constants - *
- * @return bool No value is returned. - */ - public function color ($x, $y, $paintMethod) {} - - /** - * (PECL imagick 2.0.0)- * The comment string to add to vector output stream - *
- * @return bool No value is returned. - */ - public function comment ($comment) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the first control point - *
- * @param float $y1- * y coordinate of the first control point - *
- * @param float $x2- * x coordinate of the second control point - *
- * @param float $y2- * y coordinate of the first control point - *
- * @param float $x- * x coordinate of the curve end - *
- * @param float $y- * y coordinate of the curve end - *
- * @return bool No value is returned. - */ - public function pathCurveToAbsolute ($x1, $y1, $x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of starting control point - *
- * @param float $y1- * y coordinate of starting control point - *
- * @param float $x2- * x coordinate of ending control point - *
- * @param float $y2- * y coordinate of ending control point - *
- * @param float $x- * ending x coordinate - *
- * @param float $y- * ending y coordinate - *
- * @return bool No value is returned. - */ - public function pathCurveToRelative ($x1, $y1, $x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the control point - *
- * @param float $y1- * y coordinate of the control point - *
- * @param float $x- * x coordinate of the end point - *
- * @param float $y- * y coordinate of the end point - *
- * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierAbsolute ($x1, $y1, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * starting x coordinate - *
- * @param float $y1- * starting y coordinate - *
- * @param float $x- * ending x coordinate - *
- * @param float $y- * ending y coordinate - *
- * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierRelative ($x1, $y1, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * ending x coordinate - *
- * @param float $y- * ending y coordinate - *
- * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierSmoothAbsolute ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * ending x coordinate - *
- * @param float $y- * ending y coordinate - *
- * @return bool No value is returned. - */ - public function pathCurveToQuadraticBezierSmoothRelative ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the second control point - *
- * @param float $y2- * y coordinate of the second control point - *
- * @param float $x- * x coordinate of the ending point - *
- * @param float $y- * y coordinate of the ending point - *
- * @return bool No value is returned. - */ - public function pathCurveToSmoothAbsolute ($x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the second control point - *
- * @param float $y2- * y coordinate of the second control point - *
- * @param float $x- * x coordinate of the ending point - *
- * @param float $y- * y coordinate of the ending point - *
- * @return bool No value is returned. - */ - public function pathCurveToSmoothRelative ($x2, $y2, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * x radius - *
- * @param float $ry- * y radius - *
- * @param float $x_axis_rotation- * x axis rotation - *
- * @param bool $large_arc_flag- * large arc flag - *
- * @param bool $sweep_flag- * sweep flag - *
- * @param float $x- * x coordinate - *
- * @param float $y- * y coordinate - *
- * @return bool No value is returned. - */ - public function pathEllipticArcAbsolute ($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * x radius - *
- * @param float $ry- * y radius - *
- * @param float $x_axis_rotation- * x axis rotation - *
- * @param bool $large_arc_flag- * large arc flag - *
- * @param bool $sweep_flag- * sweep flag - *
- * @param float $x- * x coordinate - *
- * @param float $y- * y coordinate - *
- * @return bool No value is returned. - */ - public function pathEllipticArcRelative ($rx, $ry, $x_axis_rotation, $large_arc_flag, $sweep_flag, $x, $y) {} - - /** - * (PECL imagick 2.0.0)- * starting x coordinate - *
- * @param float $y- * ending x coordinate - *
- * @return bool No value is returned. - */ - public function pathLineToAbsolute ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * starting x coordinate - *
- * @param float $y- * starting y coordinate - *
- * @return bool No value is returned. - */ - public function pathLineToRelative ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate - *
- * @return bool No value is returned. - */ - public function pathLineToHorizontalAbsolute ($x) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate - *
- * @return bool No value is returned. - */ - public function pathLineToHorizontalRelative ($x) {} - - /** - * (PECL imagick 2.0.0)- * y coordinate - *
- * @return bool No value is returned. - */ - public function pathLineToVerticalAbsolute ($y) {} - - /** - * (PECL imagick 2.0.0)- * y coordinate - *
- * @return bool No value is returned. - */ - public function pathLineToVerticalRelative ($y) {} - - /** - * (PECL imagick 2.0.0)- * x coordinate of the starting point - *
- * @param float $y- * y coordinate of the starting point - *
- * @return bool No value is returned. - */ - public function pathMoveToAbsolute ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * target x coordinate - *
- * @param float $y- * target y coordinate - *
- * @return bool No value is returned. - */ - public function pathMoveToRelative ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * array of x and y coordinates: array( array( 'x' => 4, 'y' => 6 ), array( 'x' => 8, 'y' => 10 ) ) - *
- * @return bool TRUE on success. - */ - public function polyline (array $coordinates) {} - - /** - * (PECL imagick 2.0.0)- * Clip mask Id - *
- * @return bool No value is returned. - */ - public function pushClipPath ($clip_mask_id) {} - - /** - * (PECL imagick 2.0.0)- * the pattern Id - *
- * @param float $x- * x coordinate of the top-left corner - *
- * @param float $y- * y coordinate of the top-left corner - *
- * @param float $width- * width of the pattern - *
- * @param float $height- * height of the pattern - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function pushPattern ($pattern_id, $x, $y, $width, $height) {} - - /** - * (PECL imagick 2.0.0)- * degrees to rotate - *
- * @return bool No value is returned. - */ - public function rotate ($degrees) {} - - /** - * (PECL imagick 2.0.0)- * horizontal factor - *
- * @param float $y- * vertical factor - *
- * @return bool No value is returned. - */ - public function scale ($x, $y) {} - - /** - * (PECL imagick 2.0.0)- * the clipping path name - *
- * @return bool No value is returned. - */ - public function setClipPath ($clip_mask) {} - - /** - * (PECL imagick 2.0.0)- * FILLRULE_ constant - *
- * @return bool No value is returned. - */ - public function setClipRule ($fill_rule) {} - - /** - * (PECL imagick 2.0.0)- * the number of clip units - *
- * @return bool No value is returned. - */ - public function setClipUnits ($clip_units) {} - - /** - * (PECL imagick 2.0.0)- * the fill opacity - *
- * @return bool No value is returned. - */ - public function setFillOpacity ($fillOpacity) {} - - /** - * (PECL imagick 2.0.0)- * URL to use to obtain fill pattern. - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function setFillPatternURL ($fill_url) {} - - /** - * (PECL imagick 2.0.0)- * FILLRULE_ constant - *
- * @return bool No value is returned. - */ - public function setFillRule ($fill_rule) {} - - /** - * (PECL imagick 2.0.0)- * GRAVITY_ constant - *
- * @return bool No value is returned. - */ - public function setGravity ($gravity) {} - - /** - * (PECL imagick 2.0.0)- * stroke URL - *
- * @return bool imagick.imagickdraw.return.success; - */ - public function setStrokePatternURL ($stroke_url) {} - - /** - * (PECL imagick 2.0.0)- * dash offset - *
- * @return bool No value is returned. - */ - public function setStrokeDashOffset ($dash_offset) {} - - /** - * (PECL imagick 2.0.0)- * LINECAP_ constant - *
- * @return bool No value is returned. - */ - public function setStrokeLineCap ($linecap) {} - - /** - * (PECL imagick 2.0.0)- * LINEJOIN_ constant - *
- * @return bool No value is returned. - */ - public function setStrokeLineJoin ($linejoin) {} - - /** - * (PECL imagick 2.0.0)- * the miter limit - *
- * @return bool No value is returned. - */ - public function setStrokeMiterLimit ($miterlimit) {} - - /** - * (PECL imagick 2.0.0)- * stroke opacity. 1.0 is fully opaque - *
- * @return bool No value is returned. - */ - public function setStrokeOpacity ($stroke_opacity) {} - - /** - * (PECL imagick 2.0.0)- * xml containing the vector graphics - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function setVectorGraphics ($xml) {} - - /** - * (PECL imagick 2.0.0)- * array of floats - *
- * @return bool TRUE on success. - */ - public function setStrokeDashArray (array $dashArray) {} + /** + * (PECL imagick 2.0.0)+ * the number of clip units + *
+ * @return bool No value is returned. + */ + public function setClipUnits($clip_units) {} + + /** + * (PECL imagick 2.0.0)+ * the fill opacity + *
+ * @return bool No value is returned. + */ + public function setFillOpacity($fillOpacity) {} + + /** + * (PECL imagick 2.0.0)+ * URL to use to obtain fill pattern. + *
+ * @return bool TRUE on success or FALSE on failure. + * @throws ImagickException on error. + */ + public function setFillPatternURL($fill_url) {} + + /** + * (PECL imagick 2.0.0)+ * FILLRULE_ constant + *
+ * @return bool No value is returned. + */ + public function setFillRule($fill_rule) {} + + /** + * (PECL imagick 2.0.0)+ * GRAVITY_ constant + *
+ * @return bool No value is returned. + */ + public function setGravity($gravity) {} + + /** + * (PECL imagick 2.0.0)+ * stroke URL + *
+ * @return bool imagick.imagickdraw.return.success; + * @throws ImagickException on error. + */ + public function setStrokePatternURL($stroke_url) {} + + /** + * (PECL imagick 2.0.0)+ * dash offset + *
+ * @return bool No value is returned. + */ + public function setStrokeDashOffset($dash_offset) {} + + /** + * (PECL imagick 2.0.0)+ * LINECAP_ constant + *
+ * @return bool No value is returned. + */ + public function setStrokeLineCap($linecap) {} + + /** + * (PECL imagick 2.0.0)+ * LINEJOIN_ constant + *
+ * @return bool No value is returned. + */ + public function setStrokeLineJoin($linejoin) {} + + /** + * (PECL imagick 2.0.0)+ * the miter limit + *
+ * @return bool No value is returned. + */ + public function setStrokeMiterLimit($miterlimit) {} + + /** + * (PECL imagick 2.0.0)+ * stroke opacity. 1.0 is fully opaque + *
+ * @return bool No value is returned. + */ + public function setStrokeOpacity($stroke_opacity) {} + + /** + * (PECL imagick 2.0.0)+ * xml containing the vector graphics + *
+ * @return bool TRUE on success or FALSE on failure. + */ + public function setVectorGraphics($xml) {} + + /** + * (PECL imagick 2.0.0)+ * array of floats + *
+ * @return bool TRUE on success. + */ + public function setStrokeDashArray(array $dashArray) {} /** * Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0. @@ -6219,453 +6722,529 @@ public function setStrokeDashArray (array $dashArray) {} * @return void * @since 3.4.1 */ - public function setOpacity($opacity) { } - - /** - * Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0. - * - * @return float - * @since 3.4.1 - */ - public function getOpacity() { } - - /** - * Sets the image font resolution. - * - * @param float $x - * @param float $y - * @return bool - * @since 3.4.1 - */ - public function setFontResolution($x, $y) { } - - /** - * Gets the image X and Y resolution. - * - * @return array - * @since 3.4.1 - */ - public function getFontResolution() { } - - /** - * Returns the direction that will be used when annotating with text. - * @return bool - * @since 3.4.1 - */ - public function getTextDirection() { } - - /** - * Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option. - * - * @param int $direction - * @return bool - * @since 3.4.1 - */ - public function setTextDirection($direction) { } - - /** - * Returns the border color used for drawing bordered objects. - * - * @return ImagickPixel - * @since 3.4.1 - */ - public function getBorderColor() { } - - /** - * Sets the border color to be used for drawing bordered objects. - * @param ImagickPixel $color - * @return bool - * @since 3.4.1 - */ - public function setBorderColor(ImagickPixel $color) { } - - /** - * Obtains the vertical and horizontal resolution. - * - * @return string|null - * @since 3.4.1 - */ - public function getDensity() { } - - /** - * Sets the vertical and horizontal resolution. - * @param string $density_string - * @return bool - * @since 3.4.1 - */ - public function setDensity($density_string) { } + public function setOpacity($opacity) {} + + /** + * Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0. + * + * @return float + * @since 3.4.1 + */ + #[Pure] + public function getOpacity() {} + + /** + * Sets the image font resolution. + * + * @param float $x + * @param float $y + * @return bool + * @throws ImagickException on error. + * @since 3.4.1 + */ + public function setFontResolution($x, $y) {} + + /** + * Gets the image X and Y resolution. + * + * @return array + * @throws ImagickException on error. + * @since 3.4.1 + */ + #[Pure] + public function getFontResolution() {} + + /** + * Returns the direction that will be used when annotating with text. + * @return bool + * @since 3.4.1 + */ + #[Pure] + public function getTextDirection() {} + + /** + * Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option. + * + * @param int $direction + * @return bool + * @since 3.4.1 + */ + public function setTextDirection($direction) {} + + /** + * Returns the border color used for drawing bordered objects. + * + * @return ImagickPixel + * @since 3.4.1 + */ + #[Pure] + public function getBorderColor() {} + + /** + * Sets the border color to be used for drawing bordered objects. + * @param ImagickPixel $color + * @return bool + * @throws ImagickDrawException on error. + * @since 3.4.1 + */ + public function setBorderColor(ImagickPixel $color) {} + + /** + * Obtains the vertical and horizontal resolution. + * + * @return string|null + * @since 3.4.1 + */ + #[Pure] + public function getDensity() {} + + /** + * Sets the vertical and horizontal resolution. + * @param string $density_string + * @return bool + * @throws ImagickException on error. + * @since 3.4.1 + */ + public function setDensity($density_string) {} } /** * @link https://php.net/manual/en/class.imagickpixeliterator.php */ -class ImagickPixelIterator implements Iterator { - - /** - * (PECL imagick 2.0.0)- * The normalized value for hue, described as a fractional arc - * (between 0 and 1) of the hue circle, where the zero value is - * red. - *
- * @param float $saturation- * The normalized value for saturation, with 1 as full saturation. - *
- * @param float $luminosity- * The normalized value for luminosity, on a scale from black at - * 0 to white at 1, with the full HS value at 0.5 luminosity. - *
- * @return bool TRUE on success. - */ - public function setHSL ($hue, $saturation, $luminosity) {} - - public function getColorValueQuantum () {} - - /** - * @param $color_value - */ - public function setColorValueQuantum ($color_value) {} - - public function getIndex () {} - - /** - * @param $index - */ - public function setIndex ($index) {} - - /** - * (PECL imagick 2.0.0)- * The optional color string to use as the initial value of this object. - *
- */ - public function __construct ($color = null) {} - - /** - * (PECL imagick 2.0.0)- * The color definition to use in order to initialise the - * ImagickPixel object. - *
- * @return bool TRUE if the specified color was set, FALSE otherwise. - */ - public function setColor ($color) {} - - /** - * (PECL imagick 2.0.0)- * One of the Imagick color constants e.g. \Imagick::COLOR_GREEN or \Imagick::COLOR_ALPHA. - *
- * @param float $value- * The value to set this channel to, ranging from 0 to 1. - *
- * @return bool TRUE on success. - */ - public function setColorValue ($color, $value) {} - - /** - * (PECL imagick 2.0.0)- * The color to get the value of, specified as one of the Imagick color - * constants. This can be one of the RGB colors, CMYK colors, alpha and - * opacity e.g (Imagick::COLOR_BLUE, Imagick::COLOR_MAGENTA). - *
- * @return float The value of the channel, as a normalized floating-point number, throwing - * ImagickPixelException on error. - * @throws ImagickPixelException on error - */ - public function getColorValue ($color) {} - - /** - * (PECL imagick 2.0.0)- * The ImagickPixel object to compare this object against. - *
- * @param float $fuzz- * The maximum distance within which to consider these colors as similar. - * The theoretical maximum for this value is the square root of three - * (1.732). - *
- * @return bool TRUE on success. - */ - public function isSimilar (ImagickPixel $color, $fuzz) {} - - /** - * (No version information available, might only be in SVN)- * The ImagickPixel object to compare this object against. - *
- * @param float $fuzz- * The maximum distance within which to consider these colors as similar. - * The theoretical maximum for this value is the square root of three - * (1.732). - *
- * @return bool TRUE on success. - */ - public function isPixelSimilar (ImagickPixel $color, $fuzz) {} - - /** - * (PECL imagick 2.0.0)- * Normalize the color values - *
- * @return array An array of channel values, each normalized if TRUE is given as param. Throws - * ImagickPixelException on error. - * @throws ImagickPixelException on error. - */ - public function getColor ($normalized = false) {} - - /** - * (PECL imagick 2.1.0)+ * The normalized value for hue, described as a fractional arc + * (between 0 and 1) of the hue circle, where the zero value is + * red. + *
+ * @param float $saturation+ * The normalized value for saturation, with 1 as full saturation. + *
+ * @param float $luminosity+ * The normalized value for luminosity, on a scale from black at + * 0 to white at 1, with the full HS value at 0.5 luminosity. + *
+ * @return bool TRUE on success. + * @throws ImagickPixelException on failure + */ + public function setHSL($hue, $saturation, $luminosity) {} + + /** + * @throws ImagickPixelException on failure + */ + #[Pure] + public function getColorValueQuantum() {} + + /** + * @param $color_value + * @throws ImagickPixelException on failure + */ + public function setColorValueQuantum($color_value) {} + + /** + * Gets the colormap index of the pixel wand. + * @throws ImagickPixelException on failure + */ + #[Pure] + public function getIndex() {} + + /** + * @param int $index + * @throws ImagickPixelException on failure + */ + public function setIndex($index) {} + + /** + * (PECL imagick 2.0.0)+ * The optional color string to use as the initial value of this object. + *
+ * @throws ImagickPixelException on failure + */ + public function __construct($color = null) {} + + /** + * (PECL imagick 2.0.0)+ * The color definition to use in order to initialise the + * ImagickPixel object. + *
+ * @return bool TRUE if the specified color was set, FALSE otherwise. + * @throws ImagickPixelException on failure + */ + public function setColor($color) {} + + /** + * (PECL imagick 2.0.0)+ * One of the Imagick color constants e.g. \Imagick::COLOR_GREEN or \Imagick::COLOR_ALPHA. + *
+ * @param float $value+ * The value to set this channel to, ranging from 0 to 1. + *
+ * @return bool TRUE on success. + * @throws ImagickPixelException on failure + */ + public function setColorValue($color, $value) {} + + /** + * (PECL imagick 2.0.0)+ * The color to get the value of, specified as one of the Imagick color + * constants. This can be one of the RGB colors, CMYK colors, alpha and + * opacity e.g (Imagick::COLOR_BLUE, Imagick::COLOR_MAGENTA). + *
+ * @return float The value of the channel, as a normalized floating-point number, throwing + * ImagickPixelException on error. + * @throws ImagickPixelException on error + */ + #[Pure] + public function getColorValue($color) {} + + /** + * (PECL imagick 2.0.0)+ * The ImagickPixel object to compare this object against. + *
+ * @param float $fuzz+ * The maximum distance within which to consider these colors as similar. + * The theoretical maximum for this value is the square root of three + * (1.732). + *
+ * @return bool TRUE on success. + * @throws ImagickPixelException on failure + */ + public function isSimilar(ImagickPixel $color, $fuzz) {} + + /** + * (No version information available, might only be in SVN)+ * The ImagickPixel object to compare this object against. + *
+ * @param float $fuzz+ * The maximum distance within which to consider these colors as similar. + * The theoretical maximum for this value is the square root of three + * (1.732). + *
+ * @return bool TRUE on success. + * @throws ImagickPixelException on failure + */ + public function isPixelSimilar(ImagickPixel $color, $fuzz) {} + + /** + * (PECL imagick 2.0.0)+ * Normalize the color values + *
+ * @return array An array of channel values, each normalized if TRUE is given as param. Throws + * ImagickPixelException on error. + * @throws ImagickPixelException on error. + */ + #[ArrayShape(["r" => "int|float", "g" => "int|float", "b" => "int|float", "a" => "int|float"])] + #[Pure] + public function getColor($normalized = 0) {} + + /** + * (PECL imagick 2.1.0)* The server part is mandatory in all mailbox - * parameters. + * parameters. *
** All names which start with { are remote names, and are * in the form "{" remote_system_name [":" port] [flags] "}" * [mailbox_name] where: * remote_system_name - Internet domain name or - * bracketed IP address of server. - * @param string $username
+ * bracketed IP address of server.
+ * @param string $user* The user name *
* @param string $password* The password associated with the username *
- * @param int $options [optional]+ * @param int $flags [optional]
* The options are a bit mask with one or more of * the following: - * OP_READONLY - Open mailbox read-only - * @param int $n_retries [optional]
+ * OP_READONLY - Open mailbox read-only
+ * @param int $retries [optional]* Number of maximum connect attempts *
- * @param array $params [optional]+ * @param null|array $options
* Connection parameters, the following (string) keys maybe used * to set one or more connection parameters: - * DISABLE_AUTHENTICATOR - Disable authentication properties + * DISABLE_AUTHENTICATOR - Disable authentication properties
* @return resource|false an IMAP stream on success or FALSE on error. - * @since 4.0 - * @since 5.0 */ -function imap_open ($mailbox, $username, $password, $options = 0, $n_retries = 0, array $params = null) {} +#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection|false'], default: 'resource|false')] +function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) {} /** * Reopen IMAP stream to new mailbox * @link https://php.net/manual/en/function.imap-reopen.php - * @param resource $imap_stream + * @param resource $imap * @param string $mailbox* The mailbox name, see imap_open for more * information *
- * @param int $options [optional]+ * @param int $flags [optional]
* The options are a bit mask with one or more of * the following: - * OP_READONLY - Open mailbox read-only - * @param int $n_retries [optional]
+ * OP_READONLY - Open mailbox read-only
+ * @param int $retries [optional]* Number of maximum connect attempts *
* @return bool TRUE if the stream is reopened, FALSE otherwise. - * @since 4.0 - * @since 5.0 */ -function imap_reopen ($imap_stream, $mailbox, $options = 0, $n_retries = 0) {} +function imap_reopen( + #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, + string $mailbox, + int $flags = 0, + int $retries = 0 +): bool {} /** * Close an IMAP stream * @link https://php.net/manual/en/function.imap-close.php - * @param resource $imap_stream - * @param int $flag [optional]+ * @param resource $imap + * @param int $flags [optional]
* If set to CL_EXPUNGE, the function will silently * expunge the mailbox before closing, removing all messages marked for * deletion. You can achieve the same thing by using * imap_expunge *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_close ($imap_stream, $flag = 0) {} +function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0): bool {} /** * Gets the number of messages in the current mailbox * @link https://php.net/manual/en/function.imap-num-msg.php - * @param resource $imap_stream - * @return int Return the number of messages in the current mailbox, as an integer. - * @since 4.0 - * @since 5.0 + * @param resource $imap + * @return int|false Return the number of messages in the current mailbox, as an integer. */ -function imap_num_msg ($imap_stream) {} +function imap_num_msg(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): int|false {} /** * Gets the number of recent messages in current mailbox * @link https://php.net/manual/en/function.imap-num-recent.php - * @param resource $imap_stream + * @param resource $imap * @return int the number of recent messages in the current mailbox, as an * integer. - * @since 4.0 - * @since 5.0 */ -function imap_num_recent ($imap_stream) {} +function imap_num_recent(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): int {} /** * Returns headers for all messages in a mailbox * @link https://php.net/manual/en/function.imap-headers.php - * @param resource $imap_stream - * @return array an array of string formatted with header info. One + * @param resource $imap + * @return array|false an array of string formatted with header info. One * element per mail message. - * @since 4.0 - * @since 5.0 */ -function imap_headers ($imap_stream) {} +function imap_headers(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): array|false {} /** * Read the header of the message * @link https://php.net/manual/en/function.imap-headerinfo.php - * @param resource $stream_id An IMAP stream returned by imap_open(). - * @param int $msg_no The message number + * @param resource|IMAP\Connection $imap An IMAP stream returned by imap_open(). + * @param int $message_num The message number * @param int $from_length [optional] Number of characters for the fetchfrom property. Must be greater than or equal to zero. * @param int $subject_length [optional] Number of characters for the fetchsubject property Must be greater than or equal to zero. * @param $default_host [optional] - * @return object Returns the information in an object with following properties: + * @return stdClass|false Returns the information in an object with following properties: ** The parsed headers data *
- * @param string $defaulthost [optional]+ * @param string $default_hostname [optional]
* The default host name *
- * @return object an object similar to the one returned by + * @return object|stdClass an object similar to the one returned by * imap_header, except for the flags and other * properties that come from the IMAP server. - * @since 4.0 - * @since 5.0 */ -function imap_rfc822_parse_headers ($headers, $defaulthost = "UNKNOWN") {} +function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN"): stdClass {} /** * Returns a properly formatted email address given the mailbox, host, and personal info @@ -195,169 +194,182 @@ function imap_rfc822_parse_headers ($headers, $defaulthost = "UNKNOWN") {} * The mailbox name, see imap_open for more * information * - * @param string $host+ * @param string $hostname
* The email host part *
* @param string $personal* The name of the account owner *
- * @return string a string properly formatted email address as defined in RFC2822. - * @since 4.0 - * @since 5.0 + * @return string|false a string properly formatted email address as defined in RFC2822. */ -function imap_rfc822_write_address ($mailbox, $host, $personal) {} +function imap_rfc822_write_address(string $mailbox, string $hostname, string $personal): string|false {} /** * Parses an address string * @link https://php.net/manual/en/function.imap-rfc822-parse-adrlist.php - * @param string $address+ * @param string $string
* A string containing addresses *
- * @param string $default_host+ * @param string $default_hostname
* The default host name *
* @return array an array of objects. The objects properties are: - * ** mailbox - the mailbox name (username) * host - the host name * personal - the personal name * adl - at domain source route - * @since 4.0 - * @since 5.0 + *
*/ -function imap_rfc822_parse_adrlist ($address, $default_host) {} +function imap_rfc822_parse_adrlist(string $string, string $default_hostname): array {} /** * Read the message body * @link https://php.net/manual/en/function.imap-body.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param int $message_num
* The message number *
- * @param int $options [optional]+ * @param int $flags [optional]
* The optional options are a bit mask * with one or more of the following: - * FT_UID - The msg_number is a UID - * @return string the body of the specified message, as a string. - * @since 4.0 - * @since 5.0 + * FT_UID - The msg_number is a UID
+ * @return string|false the body of the specified message, as a string. */ -function imap_body ($imap_stream, $msg_number, $options = 0) {} +function imap_body( + #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, + int $message_num, + int $flags = 0 +): string|false {} /** * Read the structure of a specified body section of a specific message * @link https://php.net/manual/en/function.imap-bodystruct.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param int $message_num
* The message number *
* @param string $section* The body section to read *
* @return object the information in an object, for a detailed description - * of the object structure and properties see + * of the object structure and properties see * imap_fetchstructure. - * @since 4.0 - * @since 5.0 */ -function imap_bodystruct ($imap_stream, $msg_number, $section) {} +#[LanguageLevelTypeAware(['8.1' => 'stdClass|false'], default: 'object')] +function imap_bodystruct(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $message_num, string $section) {} /** * Fetch a particular section of the body of the message * @link https://php.net/manual/en/function.imap-fetchbody.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param int $message_num
* The message number *
* @param string $section* The part number. It is a string of integers delimited by period which * index into a body part list as per the IMAP4 specification *
- * @param int $options [optional]+ * @param int $flags [optional]
* A bitmask with one or more of the following: - * FT_UID - The msg_number is a UID - * @return string a particular section of the body of the specified messages as a + * FT_UID - The msg_number is a UID
+ * @return string|false a particular section of the body of the specified messages as a * text string. - * @since 4.0 - * @since 5.0 */ -function imap_fetchbody ($imap_stream, $msg_number, $section, $options = 0) {} +function imap_fetchbody( + #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, + int $message_num, + string $section, + int $flags = 0 +): string|false {} /** * Fetch MIME headers for a particular section of the message * @link https://php.net/manual/en/function.imap-fetchmime.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param int $message_num
* The message number *
* @param string $section* The part number. It is a string of integers delimited by period which * index into a body part list as per the IMAP4 specification *
- * @param int $options [optional]+ * @param int $flags [optional]
* A bitmask with one or more of the following: - * FT_UID - The msg_number is a UID - * @return string the MIME headers of a particular section of the body of the specified messages as a + * FT_UID - The msg_number is a UID
+ * @return string|false the MIME headers of a particular section of the body of the specified messages as a * text string. * @since 5.3.6 */ -function imap_fetchmime ($imap_stream, $msg_number, $section, $options = 0) {} +function imap_fetchmime( + #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, + int $message_num, + string $section, + int $flags = 0 +): string|false {} /** * Save a specific body section to a file * @link https://php.net/manual/en/function.imap-savebody.php - * @param resource $imap_stream + * @param resource $imap * @param mixed $file* The path to the saved file as a string, or a valid file descriptor * returned by fopen. *
- * @param int $msg_number+ * @param int $message_num
* The message number *
- * @param string $part_number [optional]+ * @param string $section [optional]
* The part number. It is a string of integers delimited by period which * index into a body part list as per the IMAP4 specification *
- * @param int $options [optional]+ * @param int $flags [optional]
* A bitmask with one or more of the following: - * FT_UID - The msg_number is a UID + * FT_UID - The msg_number is a UID
* @return bool TRUE on success or FALSE on failure. * @since 5.1.3 */ -function imap_savebody ($imap_stream, $file, $msg_number, $part_number = "", $options = 0) {} +function imap_savebody( + #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, + $file, + int $message_num, + string $section = "", + int $flags = 0 +): bool {} /** * Returns header for a message * @link https://php.net/manual/en/function.imap-fetchheader.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param int $message_num
* The message number *
- * @param int $options [optional]+ * @param int $flags [optional]
* The possible options are: * FT_UID - The msgno - * argument is a UID - * @return string the header of the specified message as a text string. - * @since 4.0 - * @since 5.0 + * argument is a UID
+ * @return string|false the header of the specified message as a text string. */ -function imap_fetchheader ($imap_stream, $msg_number, $options = 0) {} +function imap_fetchheader( + #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, + int $message_num, + int $flags = 0 +): string|false {} /** * Read the structure of a particular message * @link https://php.net/manual/en/function.imap-fetchstructure.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param int $message_num
* The message number *
- * @param int $options [optional]- * This optional parameter only has a single option, + * @param int $flags [optional]
+ * This optional parameter only has a single option, * FT_UID, which tells the function to treat the * msg_number argument as a * UID. *
- * @return object an object includes the envelope, internal date, size, flags and + * @return object|stdClass|false an object includes the envelope, internal date, size, flags and * body structure along with a similar object for each mime attachment. The * structure of the returned objects is as follows: * @@ -465,74 +477,69 @@ function imap_fetchheader ($imap_stream, $msg_number, $options = 0) {} *+ * @param resource $imap + * @param int $flags
* Specifies the cache to purge. It may one or a combination - * of the following constants: + * of the following constants: * IMAP_GC_ELT (message cache elements), * IMAP_GC_ENV (enveloppe and bodies), * IMAP_GC_TEXTS (texts). *
* @return bool TRUE on success or FALSE on failure. - * @since 5.3 */ -function imap_gc ($imap_stream, $caches) {} +function imap_gc( + #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $flags = 0, + #[PhpStormStubsElementAvailable(from: '8.0')] int $flags +): bool {} /** * Delete all messages marked for deletion * @link https://php.net/manual/en/function.imap-expunge.php - * @param resource $imap_stream + * @param resource $imap * @return bool TRUE. - * @since 4.0 - * @since 5.0 */ -function imap_expunge ($imap_stream) {} +function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {} /** * Mark a message for deletion from current mailbox * @link https://php.net/manual/en/function.imap-delete.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param string $message_nums
* The message number *
- * @param int $options [optional]+ * @param int $flags [optional]
* You can set the FT_UID which tells the function * to treat the msg_number argument as an * UID. *
* @return bool TRUE. - * @since 4.0 - * @since 5.0 */ -function imap_delete ($imap_stream, $msg_number, $options = 0) {} +function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {} /** * Unmark the message which is marked deleted * @link https://php.net/manual/en/function.imap-undelete.php - * @param resource $imap_stream - * @param int $msg_number+ * @param resource $imap + * @param string $message_nums
* The message number *
* @param int $flags [optional] * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_undelete ($imap_stream, $msg_number, $flags = 0) {} +function imap_undelete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {} /** * Check current mailbox * @link https://php.net/manual/en/function.imap-check.php - * @param resource $imap_stream - * @return object|false the information in an object with following properties: + * @param resource $imap + * @return object|stdClass|false the information in an object with following properties: * Date - current system time formatted according to RFC2822 * Driver - protocol used to access this mailbox: * POP3, IMAP, NNTP @@ -540,18 +547,16 @@ function imap_undelete ($imap_stream, $msg_number, $flags = 0) {} * Nmsgs - number of messages in the mailbox * Recent - number of recent messages in the mailbox * - *+ *
* Returns FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_check ($imap_stream) {} +function imap_check(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): stdClass|false {} /** * Returns the list of mailboxes that matches the given text * @link https://php.net/manual/en/function.imap-listscan.php - * @param resource $imap_stream - * @param string $ref
+ * @param resource $imap + * @param string $reference
* ref should normally be just the server * specification as described in imap_open *
@@ -570,18 +575,16 @@ function imap_check ($imap_stream) {} * @param string $content* The searched string *
- * @return array an array containing the names of the mailboxes that have + * @return array|false an array containing the names of the mailboxes that have * content in the text of the mailbox. - * @since 4.0 - * @since 5.0 */ -function imap_listscan ($imap_stream, $ref, $pattern, $content) {} +function imap_listscan(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $reference, string $pattern, string $content): array|false {} /** * Copy specified messages to a mailbox * @link https://php.net/manual/en/function.imap-mail-copy.php - * @param resource $imap_stream - * @param string $msglist+ * @param resource $imap + * @param string $message_nums
* msglist is a range not just message * numbers (as described in RFC2060). *
@@ -589,20 +592,18 @@ function imap_listscan ($imap_stream, $ref, $pattern, $content) {} * The mailbox name, see imap_open for more * information * - * @param int $options [optional]+ * @param int $flags [optional]
* options is a bitmask of one or more of - * CP_UID - the sequence numbers contain UIDS + * CP_UID - the sequence numbers contain UIDS
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_mail_copy ($imap_stream, $msglist, $mailbox, $options = 0) {} +function imap_mail_copy(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, string $mailbox, int $flags = 0): bool {} /** * Move specified messages to a mailbox * @link https://php.net/manual/en/function.imap-mail-move.php - * @param resource $imap_stream - * @param string $msglist+ * @param resource $imap + * @param string $message_nums
* msglist is a range not just message numbers * (as described in RFC2060). *
@@ -610,14 +611,12 @@ function imap_mail_copy ($imap_stream, $msglist, $mailbox, $options = 0) {} * The mailbox name, see imap_open for more * information * - * @param int $options [optional]+ * @param int $flags [optional]
* options is a bitmask and may contain the single option: - * CP_UID - the sequence numbers contain UIDS + * CP_UID - the sequence numbers contain UIDS
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_mail_move ($imap_stream, $msglist, $mailbox, $options = 0) {} +function imap_mail_move(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, string $mailbox, int $flags = 0): bool {} /** * Create a MIME message based on given envelope and body sections @@ -628,7 +627,7 @@ function imap_mail_move ($imap_stream, $msglist, $mailbox, $options = 0) {} * "to", "cc", "bcc", "message_id" and "custom_headers" (which contains * associative array of other headers). * - * @param array $body+ * @param array $bodies
* An indexed array of bodies *
*@@ -637,92 +636,80 @@ function imap_mail_move ($imap_stream, $msglist, $mailbox, $options = 0) {} * "description", "disposition.type", "disposition", "contents.data", * "lines", "bytes" and "md5". *
- * @return string the MIME message. - * @since 4.0 - * @since 5.0 + * @return string|false the MIME message. */ -function imap_mail_compose (array $envelope, array $body) {} +function imap_mail_compose(array $envelope, array $bodies): string|false {} /** * Create a new mailbox * @link https://php.net/manual/en/function.imap-createmailbox.php - * @param resource $imap_stream + * @param resource $imap * @param string $mailbox* The mailbox name, see imap_open for more * information. Names containing international characters should be * encoded by imap_utf7_encode *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_createmailbox ($imap_stream, $mailbox) {} +function imap_createmailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {} /** * Rename an old mailbox to new mailbox * @link https://php.net/manual/en/function.imap-renamemailbox.php - * @param resource $imap_stream - * @param string $old_mbox+ * @param resource $imap + * @param string $from
* The old mailbox name, see imap_open for more * information *
- * @param string $new_mbox+ * @param string $to
* The new mailbox name, see imap_open for more * information *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_renamemailbox ($imap_stream, $old_mbox, $new_mbox) {} +function imap_renamemailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $from, string $to): bool {} /** * Delete a mailbox * @link https://php.net/manual/en/function.imap-deletemailbox.php - * @param resource $imap_stream + * @param resource $imap * @param string $mailbox* The mailbox name, see imap_open for more * information *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_deletemailbox ($imap_stream, $mailbox) {} +function imap_deletemailbox(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {} /** * Subscribe to a mailbox * @link https://php.net/manual/en/function.imap-subscribe.php - * @param resource $imap_stream + * @param resource $imap * @param string $mailbox* The mailbox name, see imap_open for more * information *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_subscribe ($imap_stream, $mailbox) {} +function imap_subscribe(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {} /** * Unsubscribe from a mailbox * @link https://php.net/manual/en/function.imap-unsubscribe.php - * @param resource $imap_stream + * @param resource $imap * @param string $mailbox* The mailbox name, see imap_open for more * information *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_unsubscribe ($imap_stream, $mailbox) {} +function imap_unsubscribe(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox): bool {} /** * Append a string message to a specified mailbox * @link https://php.net/manual/en/function.imap-append.php - * @param resource $imap_stream - * @param string $mailbox+ * @param resource $imap + * @param string $folder
* The mailbox name, see imap_open for more * information *
@@ -742,32 +729,26 @@ function imap_unsubscribe ($imap_stream, $mailbox) {} * If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a date string that conforms to the rfc2060 specifications for a date_time value. * * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function imap_append ($imap_stream, $mailbox, $message, $options = null, $internal_date = null) {} +function imap_append(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): bool {} /** * Check if the IMAP stream is still active * @link https://php.net/manual/en/function.imap-ping.php - * @param resource $imap_stream + * @param resource $imap * @return bool TRUE if the stream is still alive, FALSE otherwise. - * @since 4.0 - * @since 5.0 */ -function imap_ping ($imap_stream) {} +function imap_ping(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {} /** * Decode BASE64 encoded text * @link https://php.net/manual/en/function.imap-base64.php - * @param string $text+ * @param string $string
* The encoded text *
- * @return string the decoded message as a string. - * @since 4.0 - * @since 5.0 + * @return string|false the decoded message as a string. */ -function imap_base64 ($text) {} +function imap_base64(string $string): string|false {} /** * Convert a quoted-printable string to an 8 bit string @@ -775,11 +756,9 @@ function imap_base64 ($text) {} * @param string $string* A quoted-printable string *
- * @return string an 8 bits string. - * @since 4.0 - * @since 5.0 + * @return string|false an 8 bits string. */ -function imap_qprint ($string) {} +function imap_qprint(string $string): string|false {} /** * Convert an 8bit string to a quoted-printable string @@ -787,11 +766,9 @@ function imap_qprint ($string) {} * @param string $string* The 8bit string to convert *
- * @return string a quoted-printable string. - * @since 4.0 - * @since 5.0 + * @return string|false a quoted-printable string. */ -function imap_8bit ($string) {} +function imap_8bit(string $string): string|false {} /** * Convert an 8bit string to a base64 string @@ -799,61 +776,56 @@ function imap_8bit ($string) {} * @param string $string* The 8bit string *
- * @return string a base64 encoded string. - * @since 4.0 - * @since 5.0 + * @return string|false a base64 encoded string. */ -function imap_binary ($string) {} +function imap_binary(string $string): string|false {} /** * Converts MIME-encoded text to UTF-8 * @link https://php.net/manual/en/function.imap-utf8.php * @param string $mime_encoded_text- * A MIME encoded string. MIME encoding method and the UTF-8 + * A MIME encoded string. MIME encoding method and the UTF-8 * specification are described in RFC2047 and RFC2044 respectively. *
* @return string an UTF-8 encoded string. - * @since 4.0 - * @since 5.0 */ -function imap_utf8 ($mime_encoded_text) {} +function imap_utf8(string $mime_encoded_text): string {} /** * Returns status information on a mailbox * @link https://php.net/manual/en/function.imap-status.php - * @param resource $imap_stream + * @param resource $imap * @param string $mailbox* The mailbox name, see imap_open for more * information *
- * @param int $options+ * @param int $flags
* Valid flags are: * SA_MESSAGES - set $status->messages to the * number of messages in the mailbox * @return object This function returns an object containing status information. * The object has the following properties: messages, - * recent, unseen, - * uidnext, and uidvalidity. + * recent, unseen, + * uidnext, and uidvalidity. *
** flags is also set, which contains a bitmask which can - * be checked against any of the above constants. - * @since 4.0 - * @since 5.0 + * be checked against any of the above constants.
*/ -function imap_status ($imap_stream, $mailbox, $options) {} +#[LanguageLevelTypeAware(['8.1' => 'stdClass|false'], default: 'object')] +function imap_status(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $mailbox, int $flags) {} /** * @param $stream_id * @param $options */ -function imap_status_current ($stream_id, $options) {} +function imap_status_current($stream_id, $options) {} /** * Get information about the current mailbox * @link https://php.net/manual/en/function.imap-mailboxmsginfo.php - * @param resource $imap_stream - * @return object|false the information in an object with following properties: + * @param resource $imap + * @return object|stdClass|false the information in an object with following properties: *Constant | + *Meaning | + *Availability | + *
---|---|---|
JSON_ERROR_NONE |
+ * No error has occurred | + *+ * |
JSON_ERROR_DEPTH |
+ * The maximum stack depth has been exceeded | + *+ * |
JSON_ERROR_STATE_MISMATCH |
+ * Invalid or malformed JSON | + *+ * |
JSON_ERROR_CTRL_CHAR |
+ * Control character error, possibly incorrectly encoded | + *+ * |
JSON_ERROR_SYNTAX |
+ * Syntax error | + *+ * |
JSON_ERROR_UTF8 |
+ * Malformed UTF-8 characters, possibly incorrectly encoded | + *PHP 5.3.3 | + *
JSON_ERROR_RECURSION |
+ * One or more recursive references in the value to be encoded | + *PHP 5.5.0 | + *
JSON_ERROR_INF_OR_NAN |
+ *
+ * One or more
+ * NAN
+ * or INF
+ * values in the value to be encoded
+ * |
+ * PHP 5.5.0 | + *
JSON_ERROR_UNSUPPORTED_TYPE |
+ * A value of a type that cannot be encoded was given | + *PHP 5.5.0 | + *
JSON_ERROR_INVALID_PROPERTY_NAME |
+ * A property name that cannot be encoded was given | + *PHP 7.0.0 | + *
JSON_ERROR_UTF16 |
+ * Malformed UTF-16 characters, possibly incorrectly encoded | + *PHP 7.0.0 | + *
@@ -244,7 +327,7 @@ function json_last_error_msg () {} *
* @link https://php.net/manual/en/json.constants.php */ -define ('JSON_ERROR_RECURSION', 6); +define('JSON_ERROR_RECURSION', 6); /** *@@ -260,7 +343,7 @@ function json_last_error_msg () {} *
* @link https://php.net/manual/en/json.constants.php */ -define ('JSON_ERROR_INF_OR_NAN', 7); +define('JSON_ERROR_INF_OR_NAN', 7); /** *@@ -274,50 +357,47 @@ function json_last_error_msg () {} *
* @link https://php.net/manual/en/json.constants.php */ -define ('JSON_ERROR_UNSUPPORTED_TYPE', 8); +define('JSON_ERROR_UNSUPPORTED_TYPE', 8); /** * No error has occurred. - * @since 5.3 * @link https://php.net/manual/en/json.constants.php */ -define ('JSON_ERROR_NONE', 0); +define('JSON_ERROR_NONE', 0); /** * The maximum stack depth has been exceeded. - * @since 5.3 * @link https://php.net/manual/en/json.constants.php */ -define ('JSON_ERROR_DEPTH', 1); +define('JSON_ERROR_DEPTH', 1); /** * Syntax error. - * @since 5.3 * @link https://php.net/manual/en/json.constants.php */ -define ('JSON_ERROR_SYNTAX', 4); +define('JSON_ERROR_SYNTAX', 4); /** * Decodes JSON objects as PHP array. * @since 5.4 * @link https://php.net/manual/en/json.constants.php */ -define ('JSON_OBJECT_AS_ARRAY', 1); -define ('JSON_PARSER_NOTSTRICT', 4); +define('JSON_OBJECT_AS_ARRAY', 1); +define('JSON_PARSER_NOTSTRICT', 4); /** * Decodes large integers as their original string value. * @since 5.4 * @link https://php.net/manual/en/json.constants.php */ -define ('JSON_BIGINT_AS_STRING', 2); +define('JSON_BIGINT_AS_STRING', 2); /** * Ensures that float values are always encoded as a float value. * @since 5.6.6 * @link https://php.net/manual/en/json.constants.php */ -define ('JSON_PRESERVE_ZERO_FRACTION', 1024); +define('JSON_PRESERVE_ZERO_FRACTION', 1024); /** * The line terminators are kept unescaped when JSON_UNESCAPED_UNICODE is supplied. @@ -345,7 +425,7 @@ function json_last_error_msg () {} * @link https://php.net/manual/en/json.constants.php * @since 7.0 */ -define('JSON_ERROR_INVALID_PROPERTY_NAME',9); +define('JSON_ERROR_INVALID_PROPERTY_NAME', 9); /** * Single unpaired UTF-16 surrogate in unicode escape contained in the JSON string passed to json_encode(). @@ -353,7 +433,7 @@ function json_last_error_msg () {} * @link https://php.net/manual/en/json.constants.php * @since 7.0 */ -define('JSON_ERROR_UTF16',10); +define('JSON_ERROR_UTF16', 10); /** * Throws JsonException if an error occurs instead of setting the global error state @@ -364,6 +444,11 @@ function json_last_error_msg () {} */ define('JSON_THROW_ON_ERROR', 4194304); +/** + * @since 8.1 + */ +define('JSON_ERROR_NON_BACKED_ENUM', 11); + /** * Class JsonException * @@ -377,8 +462,6 @@ function json_last_error_msg () {} * @since 7.3 * @link https://wiki.php.net/rfc/json_throw_on_error */ -class JsonException extends \Exception { -} +class JsonException extends Exception {} // End of json v.1.3.1 -?> diff --git a/judy/judy.php b/judy/judy.php index bc968cc0e..f883bf6db 100644 --- a/judy/judy.php +++ b/judy/judy.php @@ -6,33 +6,38 @@ * Class Judy. * @link https://php.net/manual/en/class.judy.php */ -class Judy implements ArrayAccess { +class Judy implements ArrayAccess +{ /** * Define the Judy Array as a Bitset with keys as Integer and Values as a Boolean. * @link https://php.net/manual/en/class.judy.php#judy.constants.bitset */ - const BITSET = 1; + public const BITSET = 1; + /** * Define the Judy Array with key/values as Integer, and Integer only. * @link https://php.net/manual/en/class.judy.php#judy.constants.int-to-int */ - const INT_TO_INT = 2; + public const INT_TO_INT = 2; + /** * Define the Judy Array with keys as Integer and Values of any type. * @link https://php.net/manual/en/class.judy.php#judy.constants.int-to-mixed */ - const INT_TO_MIXED = 3; + public const INT_TO_MIXED = 3; + /** * Define the Judy Array with keys as a String and Values as Integer, and Integer only. * @link https://php.net/manual/en/class.judy.php#judy.constants.string-to-int */ - const STRING_TO_INT = 4; + public const STRING_TO_INT = 4; + /** * Define the Judy Array with keys as a String and Values of any type. * @link https://php.net/manual/en/class.judy.php#judy.constants.string-to-mixed */ - const STRING_TO_MIXED = 5; - + public const STRING_TO_MIXED = 5; + /** * (PECL judy >= 0.1.1)The index can be an integer or a string corresponding to the index where to start the search.
+ * @param int|string $index [optional]The index can be an integer or a string corresponding to the index where to start the search.
* @return mixedReturn the corresponding index in the array.
*/ public function last($index = -1) {} @@ -113,7 +118,7 @@ public function last($index = -1) {} * (PECL judy >= 0.1.1)The index can be an integer or a string corresponding to the index where to start the search.
+ * @param int|string $index [optional]The index can be an integer or a string corresponding to the index where to start the search.
* @return mixedReturn the corresponding index in the array.
*/ public function lastEmpty($index = -1) {} @@ -139,7 +144,7 @@ public function next($index) {} * (PECL judy >= 0.1.1)The index can be an integer or a string corresponding to the index where to start the search.
+ * @param int|string $indexThe index can be an integer or a string corresponding to the index where to start the search.
* @return mixedReturn the corresponding index in the array.
*/ public function nextEmpty($index) {} @@ -210,5 +215,3 @@ public function size($index_start = 0, $index_end = -1) {} } // End of judy. - -?> diff --git a/ldap/Connection.php b/ldap/Connection.php new file mode 100644 index 000000000..62b519992 --- /dev/null +++ b/ldap/Connection.php @@ -0,0 +1,8 @@ + 'LDAP\Connection'], default: 'resource')] $ldap, + #[Available(from: '7.1', to: '7.1')] string $user = "", + #[Available(from: '7.2', to: '7.2')] string $user, + #[Available(from: '7.3')] string $user = "", + #[Available(from: '7.1', to: '7.1')] string $old_password = "", + #[Available(from: '7.2', to: '7.2')] string $old_password, + #[Available(from: '7.3')] string $old_password = "", + #[Available(from: '7.1', to: '7.1')] string $new_password = "", + #[Available(from: '7.2', to: '7.2')] string $new_password, + #[Available(from: '7.3')] string $new_password = "", + #[Available(from: '7.3')] &$controls = null +): string|bool {} /** * Refresh extended operation helper * @link https://www.php.net/manual/en/function.ldap-exop-refresh.php - * @param resource $link An LDAP link identifier, returned by ldap_connect(). + * @param resource $ldap An LDAP link identifier, returned by ldap_connect(). * @param string $dn dn of the entry to refresh. * @param int $ttl $ttl Time in seconds (between 1 and 31557600) that the client requests that the entry exists in the directory before being automatically removed. - * @return mixed From RFC: The responseTtl field is the time in seconds which the server chooses to have as the time-to-live field for that entry. It must not be any smaller than that which the client requested, and it may be larger. However, to allow servers to maintain a relatively accurate directory, and to prevent clients from abusing the dynamic extensions, servers are permitted to shorten a client-requested time-to-live value, down to a minimum of 86400 seconds (one day). FALSE will be returned on error. + * @return int|false From RFC: The responseTtl field is the time in seconds which the server chooses to have as the time-to-live field for that entry. It must not be any smaller than that which the client requested, and it may be larger. However, to allow servers to maintain a relatively accurate directory, and to prevent clients from abusing the dynamic extensions, servers are permitted to shorten a client-requested time-to-live value, down to a minimum of 86400 seconds (one day). FALSE will be returned on error. * @since 7.3 */ -function ldap_exop_refresh ($link, $dn ,$ttl) {} +function ldap_exop_refresh(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, int $ttl): int|false {} /** * WHOAMI extended operation helper * @link https://www.php.net/manual/en/function.ldap-exop-whoami.php - * @param resource $link An LDAP link identifier, returned by ldap_connect(). - * @return mixed The data returned by the server, or FALSE on error. + * @param resource $ldap An LDAP link identifier, returned by ldap_connect(). + * @return string|false The data returned by the server, or FALSE on error. * @since 7.2 */ -function ldap_exop_whoami ($link) {} +function ldap_exop_whoami(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): string|false {} /** * Performs an extended operation on the specified link with reqoid the OID of the operation and reqdata the data. * @link https://www.php.net/manual/en/function.ldap-exop.php - * @param resource $link An LDAP link identifier, returned by ldap_connect(). - * @param string $reqoid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send. - * @param string $reqdata [optional] The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded. - * @param array $serverctrls [optional] If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request. - * @param string $retdata [optional] Will be filled with the extended operation response data if provided. If not provided you may use ldap_parse_exop on the result object later to get this data. - * @param string $retoid [optional] Will be filled with the response OID if provided, usually equal to the request OID. - * @return mixed When used with retdata, returns TRUE on success or FALSE on error. When used without retdata, returns a result identifier or FALSE on error. + * @param resource $ldap An LDAP link identifier, returned by ldap_connect(). + * @param string $request_oid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send. + * @param string|null $request_data [optional] The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded. + * @param array|null $controls If provided, a password policy request control is send with the request and this is filled with an array of LDAP Controls returned with the request. + * @param string &$response_data [optional] Will be filled with the extended operation response data if provided. If not provided you may use ldap_parse_exop on the result object later to get this data. + * @param string &$response_oid [optional] Will be filled with the response OID if provided, usually equal to the request OID. + * @return resource|bool When used with retdata, returns TRUE on success or FALSE on error. When used without retdata, returns a result identifier or FALSE on error. * @since 7.2 */ -function ldap_exop ($link , $reqoid , $reqdata = null , $serverctrls = [], &$retdata, &$retoid) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|bool'], default: 'resource|bool')] +function ldap_exop(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $request_oid, ?string $request_data, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null, &$response_data, &$response_oid) {} /** * Parse LDAP extended operation data from result object result * @link https://www.php.net/manual/en/function.ldap-parse-exop.php - * @param resource $link An LDAP link identifier, returned by ldap_connect(). + * @param resource $ldap An LDAP link identifier, returned by ldap_connect(). * @param resource $result An LDAP result resource, returned by ldap_exop(). - * @param string $retdata [optional] Will be filled by the response data. - * @param string $retoid [optional] Will be filled by the response OID. + * @param string &$response_data Will be filled by the response data. + * @param string &$response_oid Will be filled by the response OID. * @return bool Returns TRUE on success or FALSE on failure. * @since 7.2 */ -function ldap_parse_exop ($link , $result, &$retdata, &$retoid) {} +function ldap_parse_exop( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result, + #[Available(from: '7.2', to: '7.4')] &$response_data, + #[Available(from: '8.0')] &$response_data = null, + #[Available(from: '7.2', to: '7.4')] &$response_oid, + #[Available(from: '8.0')] &$response_oid = null +): bool {} /** * Translate 8859 characters to t61 characters * @link https://www.php.net/manual/en/function.ldap-8859-to-t61.php * @param string $value * @return string - * @since 4.0.2 - * @since 5.0 - * @since 7.0 */ -function ldap_8859_to_t61($value) {} +function ldap_8859_to_t61(string $value): string {} /** * Translate t61 characters to 8859 characters * @link https://www.php.net/manual/en/function.ldap-t61-to-8859.php * @param string $value * @return string - * @since 4.0.2 - * @since 5.0 - * @since 7.0 */ -function ldap_t61_to_8859($value) {} +function ldap_t61_to_8859(string $value): string {} /** * Connect to an LDAP server * @link https://php.net/manual/en/function.ldap-connect.php - * @param string $hostname [optional]+ * @param string|null $uri [optional]
* If you are using OpenLDAP 2.x.x you can specify a URL instead of the * hostname. To use LDAP with SSL, compile OpenLDAP 2.x.x with SSL * support, configure PHP with SSL, and set this parameter as @@ -105,55 +124,55 @@ function ldap_t61_to_8859($value) {} *
* If no arguments are specified then the link identifier of the already * opened link will be returned. - * @since 4.0 - * @since 5.0 */ -function ldap_connect ($hostname = null, $port = 389) {} +#[PhpVersionAware(['8.1' => 'LDAP\Connection|false'], default: 'resource|false')] +function ldap_connect(?string $uri, int $port = 389) {} /** * Alias of ldap_unbind * @link https://php.net/manual/en/function.ldap-close.php - * @param $link_identifier - * @since 4.0 - * @since 5.0 + * @param resource $ldap + * @return bool */ -function ldap_close ($link_identifier) {} +function ldap_close(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {} /** * Bind to LDAP directory * @link https://php.net/manual/en/function.ldap-bind.php - * @param resource $link_identifier
+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param string $bind_rdn [optional] - * @param string $bind_password [optional] + * @param string|null $dn [optional] + * @param string|null $password [optional] * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function ldap_bind ($link_identifier, $bind_rdn = null, $bind_password = null) {} +function ldap_bind(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, ?string $dn, ?string $password): bool {} /** * Bind to LDAP directory * Does the same thing as ldap_bind() but returns the LDAP result resource to be parsed with ldap_parse_result(). * @link https://php.net/manual/en/function.ldap-bind.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param string $bind_rdn [optional] - * @param string $bind_password [optional] - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource + * @param string|null $dn [optional] + * @param string|null $password [optional] + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return resource|false * @since 7.3 */ -function ldap_bind_ext ($link_identifier, $bind_rdn = null, $bind_password = null, $serverctrls = []) {} - +#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')] +function ldap_bind_ext( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + ?string $dn, + ?string $password, + #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +) {} /** * Bind to LDAP directory using SASL * @link https://php.net/manual/en/function.ldap-sasl-bind.php - * @param resource $link + * @param resource $ldap * @param string $binddn [optional] * @param string $password [optional] * @param string $sasl_mech [optional] @@ -162,39 +181,36 @@ function ldap_bind_ext ($link_identifier, $bind_rdn = null, $bind_password = nul * @param string $sasl_authz_id [optional] * @param string $props [optional] * @return bool TRUE on success or FALSE on failure. - * @since 5.0 */ -function ldap_sasl_bind ($link, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null) {} +function ldap_sasl_bind(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null): bool {} /** * Unbind from LDAP directory * @link https://php.net/manual/en/function.ldap-unbind.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ldap_unbind ($link_identifier) {} +function ldap_unbind(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {} /** * Read an entry * @link https://php.net/manual/en/function.ldap-read.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param string $base_dn+ * @param array|array|string $base
* The base DN for the directory. *
- * @param string $filter+ * @param array|string $filter
* An empty filter is not allowed. If you want to retrieve absolutely all * information for this entry, use a filter of * objectClass=*. If you know which entry types are * used on the directory server, you might use an appropriate filter such * as objectClass=inetOrgPerson. *
- * @param array $attributes [optional]+ * @param array $attributes
* An array of the required attributes, e.g. array("mail", "sn", "cn"). * Note that the "dn" is always returned irrespective of which attributes * types are requested. @@ -205,7 +221,7 @@ function ldap_unbind ($link_identifier) {} * The use of this parameter should therefore be considered good * practice. *
- * @param int $attrsonly [optional]+ * @param int $attributes_only
* Should be set to 1 if only attribute types are wanted. If set to 0 * both attributes types and attribute values are fetched which is the * default behaviour. @@ -232,29 +248,38 @@ function ldap_unbind ($link_identifier) {} * This parameter can NOT override server-side preset timelimit. You can * set it lower though. *
- * @param int $deref [optional]+ * @param int $deref
* Specifies how aliases should be handled during the search. It can be * one of the following: * LDAP_DEREF_NEVER - (default) aliases are never - * dereferenced. - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * dereferenced.
+ * @param array|null $controls Array of LDAP Controls to send with the request. * @return resource|false a search result identifier or FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|array|false'], default: 'resource|false')] +function ldap_read( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + array|string $base, + array|string $filter, + array $attributes = [], + int $attributes_only = 0, + int $sizelimit = -1, + int $timelimit = -1, + int $deref = 0, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +) {} /** * Single-level search * @link https://php.net/manual/en/function.ldap-list.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param string $base_dn+ * @param array|array|string $base
* The base DN for the directory. *
- * @param string $filter - * @param array $attributes [optional]+ * @param array|string $filter + * @param array $attributes
* An array of the required attributes, e.g. array("mail", "sn", "cn"). * Note that the "dn" is always returned irrespective of which attributes * types are requested. @@ -265,7 +290,7 @@ function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = nul * The use of this parameter should therefore be considered good * practice. *
- * @param int $attrsonly [optional]+ * @param int $attributes_only
* Should be set to 1 if only attribute types are wanted. If set to 0 * both attributes types and attribute values are fetched which is the * default behaviour. @@ -292,33 +317,42 @@ function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = nul * This parameter can NOT override server-side preset timelimit. You can * set it lower though. *
- * @param int $deref [optional]+ * @param int $deref
* Specifies how aliases should be handled during the search. It can be * one of the following: * LDAP_DEREF_NEVER - (default) aliases are never - * dereferenced. - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * dereferenced.
+ * @param array|null $controls Array of LDAP Controls to send with the request. * @return resource|false a search result identifier or FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|array|false'], default: 'resource|false')] +function ldap_list( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + array|string $base, + array|string $filter, + array $attributes = [], + int $attributes_only = 0, + int $sizelimit = -1, + int $timelimit = -1, + int $deref = 0, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +) {} /** * Search LDAP tree * @link https://php.net/manual/en/function.ldap-search.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param string $base_dn+ * @param array|string $base
* The base DN for the directory. *
- * @param string $filter+ * @param array|string $filter
* The search filter can be simple or advanced, using boolean operators in * the format described in the LDAP documentation (see the Netscape Directory SDK for full * information on filters). *
- * @param array $attributes [optional]+ * @param array $attributes
* An array of the required attributes, e.g. array("mail", "sn", "cn"). * Note that the "dn" is always returned irrespective of which attributes * types are requested. @@ -329,7 +363,7 @@ function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = nul * The use of this parameter should therefore be considered good * practice. *
- * @param int $attrsonly [optional]+ * @param int $attributes_only
* Should be set to 1 if only attribute types are wanted. If set to 0 * both attributes types and attribute values are fetched which is the * default behaviour. @@ -356,80 +390,96 @@ function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = nul * This parameter can NOT override server-side preset timelimit. You can * set it lower though. *
- * @param int $deref [optional]+ * @param int $deref
* Specifies how aliases should be handled during the search. It can be * one of the following: * LDAP_DEREF_NEVER - (default) aliases are never - * dereferenced. - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * dereferenced.
+ * @param array|null $controls Array of LDAP Controls to send with the request. * @return resource|false a search result identifier or FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ldap_search ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|array|false'], default: 'resource|false')] +function ldap_search( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + array|string $base, + array|string $filter, + array $attributes = [], + int $attributes_only = 0, + int $sizelimit = -1, + int $timelimit = -1, + int $deref = 0, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +) {} /** * Free result memory * @link https://php.net/manual/en/function.ldap-free-result.php - * @param resource $result_identifier + * @param resource|Result $result * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ldap_free_result ($result_identifier) {} +function ldap_free_result( + #[Available(from: '5.3', to: '8.0')] $ldap, + #[Available(from: '8.1')] Result $result +): bool {} /** * Count the number of entries in a search * @link https://php.net/manual/en/function.ldap-count-entries.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_identifier+ * @param resource $result
* The internal LDAP result. *
* @return int|false number of entries in the result or FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ldap_count_entries ($link_identifier, $result_identifier) {} +#[PhpVersionAware(["8.0" => "int"], default: "int|false")] +function ldap_count_entries( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result +) {} /** * Return first result id * @link https://php.net/manual/en/function.ldap-first-entry.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_identifier - * @return resource the result entry identifier for the first entry on success and + * @param resource $result + * @return resource|false the result entry identifier for the first entry on success and * FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ldap_first_entry ($link_identifier, $result_identifier) {} +#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource|false')] +function ldap_first_entry( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result +) {} /** * Get next result entry * @link https://php.net/manual/en/function.ldap-next-entry.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_entry_identifier + * @param resource $entry * @return resource|false entry identifier for the next entry in the result whose entries * are being read starting with ldap_first_entry. If * there are no more entries in the result then it returns FALSE. - * @since 4.0 - * @since 5.0 */ -function ldap_next_entry ($link_identifier, $result_entry_identifier) {} +#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource|false')] +function ldap_next_entry( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry +) {} /** * Get all result entries * @link https://php.net/manual/en/function.ldap-get-entries.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_identifier - * @return array a complete result information in a multi-dimensional array on + * @param resource $result + * @return array|false a complete result information in a multi-dimensional array on * success and FALSE on error. * *@@ -447,60 +497,64 @@ function ldap_next_entry ($link_identifier, $result_entry_identifier) {} * attribute in ith entry * return_value[i]["attribute"][j] = jth value of attribute in ith entry * - * @since 4.0 - * @since 5.0 */ -function ldap_get_entries ($link_identifier, $result_identifier) {} +function ldap_get_entries( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result +): array|false {} /** * Return first attribute * @link https://php.net/manual/en/function.ldap-first-attribute.php - * @param resource $link_identifier
+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_entry_identifier + * @param resource $entry * @return string|false the first attribute in the entry on success and FALSE on * error. - * @since 4.0 - * @since 5.0 */ -function ldap_first_attribute ($link_identifier, $result_entry_identifier) {} +function ldap_first_attribute( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry +): string|false {} /** * Get the next attribute in result * @link https://php.net/manual/en/function.ldap-next-attribute.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_entry_identifier + * @param resource $entry * @return string|false the next attribute in an entry on success and FALSE on * error. - * @since 4.0 - * @since 5.0 */ -function ldap_next_attribute ($link_identifier, $result_entry_identifier) {} +function ldap_next_attribute( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry +): string|false {} /** * Get attributes from a search result entry * @link https://php.net/manual/en/function.ldap-get-attributes.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_entry_identifier + * @param resource $entry * @return array a complete entry information in a multi-dimensional array * on success and FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ldap_get_attributes ($link_identifier, $result_entry_identifier) {} +function ldap_get_attributes( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry +): array {} /** * Get all values from a result entry * @link https://php.net/manual/en/function.ldap-get-values.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_entry_identifier + * @param resource $entry * @param string $attribute * @return array|false an array of values for the attribute on success and FALSE on * error. The number of values can be found by indexing "count" in the @@ -514,40 +568,45 @@ function ldap_get_attributes ($link_identifier, $result_entry_identifier) {} * return_value["count"] = number of values for attribute * return_value[0] = first value of attribute * return_value[i] = ith value of attribute - * @since 4.0 - * @since 5.0 */ -function ldap_get_values ($link_identifier, $result_entry_identifier, $attribute) {} +function ldap_get_values( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry, + string $attribute +): array|false {} /** * Get all binary values from a result entry * @link https://php.net/manual/en/function.ldap-get-values-len.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_entry_identifier + * @param resource $entry * @param string $attribute * @return array|false an array of values for the attribute on success and FALSE on * error. Individual values are accessed by integer index in the array. The * first index is 0. The number of values can be found by indexing "count" * in the resultant array. - * @since 4.0 - * @since 5.0 */ -function ldap_get_values_len ($link_identifier, $result_entry_identifier, $attribute) {} +function ldap_get_values_len( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry, + string $attribute +): array|false {} /** * Get the DN of a result entry * @link https://php.net/manual/en/function.ldap-get-dn.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
- * @param resource $result_entry_identifier + * @param resource $entry * @return string|false the DN of the result entry and FALSE on error. - * @since 4.0 - * @since 5.0 */ -function ldap_get_dn ($link_identifier, $result_entry_identifier) {} +function ldap_get_dn( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry +): string|false {} /** * Splits DN into its component parts @@ -561,14 +620,13 @@ function ldap_get_dn ($link_identifier, $result_entry_identifier) {} * attribute=value format) set with_attrib to 0 * and to get only values set it to 1. * - * @return array an array of all DN components. + * @return array|false an array of all DN components. * The first element in this array has count key and * represents the number of returned values, next elements are numerically * indexed DN components. - * @since 4.0 - * @since 5.0 */ -function ldap_explode_dn ($dn, $with_attrib) {} +#[ArrayShape(["count" => "int"])] +function ldap_explode_dn(string $dn, int $with_attrib): array|false {} /** * Convert DN to User Friendly Naming format @@ -576,16 +634,14 @@ function ldap_explode_dn ($dn, $with_attrib) {} * @param string $dn* The distinguished name of an LDAP entity. *
- * @return string the user friendly name. - * @since 4.0 - * @since 5.0 + * @return string|false the user friendly name. */ -function ldap_dn2ufn ($dn) {} +function ldap_dn2ufn(string $dn): string|false {} /** * Add entries to LDAP directory * @link https://php.net/manual/en/function.ldap-add.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn@@ -602,18 +658,21 @@ function ldap_dn2ufn ($dn) {} * $entree["attribut2"][1] = "value2"; * *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 */ -function ldap_add ($link_identifier, $dn, array $entry, $serverctrls = []) {} +function ldap_add( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $entry, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} /** * Add entries to LDAP directory * Does the same thing as ldap_add() but returns the LDAP result resource to be parsed with ldap_parse_result(). * @link https://www.php.net/manual/en/function.ldap-add-ext.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn@@ -630,183 +689,207 @@ function ldap_add ($link_identifier, $dn, array $entry, $serverctrls = []) {} * $entree["attribut2"][1] = "value2"; * *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource - * @since 7.4 + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return resource|false + * @since 7.3 */ -function ldap_add_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')] +function ldap_add_ext( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $entry, + #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +) {} /** * Delete an entry from a directory * @link https://php.net/manual/en/function.ldap-delete.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function ldap_delete ($link_identifier, $dn, $serverctrls = []) {} +function ldap_delete( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} /** * Delete an entry from a directory * Does the same thing as ldap_delete() but returns the LDAP result resource to be parsed with ldap_parse_result(). * @link https://php.net/manual/en/function.ldap-delete-ext.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return resource|false * @since 7.3 */ -function ldap_delete_ext ($link_identifier, $dn, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')] +function ldap_delete_ext( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +) {} /** * This function is an alias of: ldap_mod_replace(). * Replace attribute values with new ones - * @link https://php.net/manual/en/function.ldap-mod-replace.php - * @param resource $link_identifier+ * @link https://www.php.net/manual/en/function.ldap-modify.php + * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
* @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function ldap_modify ($link_identifier, $dn, array $entry, $serverctrls = []) {} +function ldap_modify( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $entry, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} /** * Add attribute values to current attributes * @link https://php.net/manual/en/function.ldap-mod-add.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
* @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function ldap_mod_add ($link_identifier, $dn, array $entry, $serverctrls = []) {} +function ldap_mod_add( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $entry, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} /** * Add attribute values to current attributes * Does the same thing as ldap_mod_add() but returns the LDAP result resource to be parsed with ldap_parse_result(). * @link https://php.net/manual/en/function.ldap-mod-add-ext.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
* @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource - * @since 4.0 - * @since 5.0 - * @since 7.0 + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return resource|false + * @since 7.3 */ -function ldap_mod_add_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')] +function ldap_mod_add_ext( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $entry, + #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +) {} /** * Replace attribute values with new ones * @link https://php.net/manual/en/function.ldap-mod-replace.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
* @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function ldap_mod_replace ($link_identifier, $dn, array $entry, $serverctrls = []) {} +function ldap_mod_replace( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $entry, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} /** * Replace attribute values with new ones * Does the same thing as ldap_mod_replace() but returns the LDAP result resource to be parsed with ldap_parse_result(). * @link https://php.net/manual/en/function.ldap-mod-replace-ext.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
* @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return resource|false * @since 7.3 */ -function ldap_mod_replace_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')] +function ldap_mod_replace_ext(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null) {} /** * Delete attribute values from current attributes * @link https://php.net/manual/en/function.ldap-mod-del.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
* @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 4.0 - * @since 5.0 - * @since 7.0 */ -function ldap_mod_del ($link_identifier, $dn, array $entry, $serverctrls = []) {} +function ldap_mod_del( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $entry, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} /** * Delete attribute values from current attributes * Does the same thing as ldap_mod_del() but returns the LDAP result resource to be parsed with ldap_parse_result(). * @link https://php.net/manual/en/function.ldap-mod-del-ext.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
* @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return resource|false * @since 7.3 */ -function ldap_mod_del_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')] +function ldap_mod_del_ext(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, array $entry, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null) {} /** * Return the LDAP error number of the last LDAP command * @link https://php.net/manual/en/function.ldap-errno.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @return int Return the LDAP error number of the last LDAP command for this * link. - * @since 4.0 - * @since 5.0 */ -function ldap_errno ($link_identifier) {} +function ldap_errno(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): int {} /** * Convert LDAP error number into string error message @@ -815,27 +898,23 @@ function ldap_errno ($link_identifier) {} * The error number. * * @return string the error message, as a string. - * @since 4.0 - * @since 5.0 */ -function ldap_err2str ($errno) {} +function ldap_err2str(int $errno): string {} /** * Return the LDAP error message of the last LDAP command * @link https://php.net/manual/en/function.ldap-error.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @return string string error message. - * @since 4.0 - * @since 5.0 */ -function ldap_error ($link_identifier) {} +function ldap_error(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): string {} /** * Compare value of attribute found in entry specified with DN * @link https://php.net/manual/en/function.ldap-compare.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn@@ -847,19 +926,22 @@ function ldap_error ($link_identifier) {} * @param string $value
* The compared value. *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return mixed TRUE if value matches otherwise returns + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return int|bool TRUE if value matches otherwise returns * FALSE. Returns -1 on error. - * @since 4.0.2 - * @since 5.0 - * @since 7.0 */ -function ldap_compare ($link_identifier, $dn, $attribute, $value, $serverctrls = []) {} +function ldap_compare( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + string $attribute, + string $value, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): int|bool {} /** * Sort LDAP result entries * @link https://php.net/manual/en/function.ldap-sort.php - * @param resource $link+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param resource $result@@ -869,70 +951,74 @@ function ldap_compare ($link_identifier, $dn, $attribute, $value, $serverctrls = * @param string $sortfilter
* The attribute to use as a key in the sort. *
- * @deprecated 7.0 + * @removed 8.0 * @return bool - * @since 4.2 - * @since 5.0 */ -function ldap_sort ($link, $result, $sortfilter) {} +#[Deprecated(since: "7.0")] +function ldap_sort(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $result, string $sortfilter): bool {} /** * Modify the name of an entry * @link https://php.net/manual/en/function.ldap-rename.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
- * @param string $newrdn+ * @param string $new_rdn
* The new RDN. *
- * @param string $newparent+ * @param string $new_parent
* The new parent/superior entry. *
- * @param bool $deleteoldrdn+ * @param bool $delete_old_rdn
* If TRUE the old RDN value(s) is removed, else the old RDN value(s) * is retained as non-distinguished values of the entry. *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 4.0.5 - * @since 5.0 - * @since 7.0 */ -function ldap_rename ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls = []) {} +function ldap_rename( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + string $new_rdn, + string $new_parent, + bool $delete_old_rdn, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} /** * Modify the name of an entry * Does the same thing as ldap_rename() but returns the LDAP result resource to be parsed with ldap_parse_result(). * @link https://php.net/manual/en/function.ldap-rename-ext.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param string $dn* The distinguished name of an LDAP entity. *
- * @param string $newrdn+ * @param string $new_rdn
* The new RDN. *
- * @param string $newparent+ * @param string $new_parent
* The new parent/superior entry. *
- * @param bool $deleteoldrdn+ * @param bool $delete_old_rdn
* If TRUE the old RDN value(s) is removed, else the old RDN value(s) * is retained as non-distinguished values of the entry. *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource + * @param array|null $controls Array of LDAP Controls to send with the request. + * @return resource|false * @since 7.3 */ -function ldap_rename_ext ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls = []) {} +#[PhpVersionAware(['8.1' => 'LDAP\Result|false'], default: 'resource|false')] +function ldap_rename_ext(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null) {} /** * Get the current value for given option * @link https://php.net/manual/en/function.ldap-get-option.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param int $option@@ -994,19 +1080,22 @@ function ldap_rename_ext ($link_identifier, $dn, $newrdn, $newparent, $deleteold *
+ * @param mixed &$value
* This will be set to the option value. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0.4 - * @since 5.0 */ -function ldap_get_option ($link_identifier, $option, &$retval) {} +function ldap_get_option( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + int $option, + #[Available(from: '5.3', to: '7.4')] &$value, + #[Available(from: '8.0')] &$value = null +): bool {} /** * Set the value of the given option * @link https://php.net/manual/en/function.ldap-set-option.php - * @param resource $link_identifier+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param int $option@@ -1097,90 +1186,100 @@ function ldap_get_option ($link_identifier, $option, &$retval) {} * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt * for details. See also the second example below. *
- * @param mixed $newval+ * @param mixed $value
* The new value for the specified option. *
* @return bool TRUE on success or FALSE on failure. - * @since 4.0.4 - * @since 5.0 */ -function ldap_set_option ($link_identifier, $option, $newval) {} +function ldap_set_option( + #[PhpVersionAware(['8.1' => 'LDAP\Connection|null'], default: 'resource')] $ldap, + int $option, + $value +): bool {} /** * Return first reference * @link https://php.net/manual/en/function.ldap-first-reference.php - * @param resource $link + * @param resource $ldap * @param resource $result * @return resource - * @since 4.0.5 - * @since 5.0 */ -function ldap_first_reference ($link, $result) {} +#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource')] +function ldap_first_reference( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result +) {} /** * Get next reference * @link https://php.net/manual/en/function.ldap-next-reference.php - * @param resource $link + * @param resource $ldap * @param resource $entry * @return resource - * @since 4.0.5 - * @since 5.0 */ -function ldap_next_reference ($link, $entry) {} +#[PhpVersionAware(['8.1' => 'LDAP\ResultEntry|false'], default: 'resource')] +function ldap_next_reference( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry +) {} /** * Extract information from reference entry * @link https://php.net/manual/en/function.ldap-parse-reference.php - * @param resource $link + * @param resource $ldap * @param resource $entry - * @param array $referrals + * @param array &$referrals * @return bool - * @since 4.0.5 - * @since 5.0 */ -function ldap_parse_reference ($link, $entry, array &$referrals) {} +function ldap_parse_reference( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\ResultEntry'], default: 'resource')] $entry, + &$referrals +): bool {} /** * Extract information from result * @link https://php.net/manual/en/function.ldap-parse-result.php - * @param resource $link + * @param resource $ldap * @param resource $result - * @param int $errcode - * @param string $matcheddn [optional] - * @param string $errmsg [optional] - * @param array $referrals [optional] - * @param array $serverctrls [optional] An array of LDAP Controls which have been sent with the response. + * @param int &$error_code + * @param string &$matched_dn [optional] + * @param string &$error_message [optional] + * @param array &$referrals [optional] + * @param array &$controls An array of LDAP Controls which have been sent with the response. * @return bool - * @since 4.0.5 - * @since 5.0 */ -function ldap_parse_result ($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, array &$referrals = null, &$serverctrls = []) {} +function ldap_parse_result( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result, + &$error_code, + &$matched_dn, + &$error_message, + &$referrals, + #[Available(from: '7.3')] &$controls = null +): bool {} /** * Start TLS * @link https://php.net/manual/en/function.ldap-start-tls.php - * @param resource $link + * @param resource $ldap * @return bool - * @since 4.2 - * @since 5.0 */ -function ldap_start_tls ($link) {} +function ldap_start_tls(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap): bool {} /** * Set a callback function to do re-binds on referral chasing * @link https://php.net/manual/en/function.ldap-set-rebind-proc.php - * @param resource $link - * @param callable $callback + * @param resource $ldap + * @param callable|null $callback * @return bool - * @since 4.2 - * @since 5.0 */ -function ldap_set_rebind_proc ($link, callable $callback) {} +function ldap_set_rebind_proc(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, ?callable $callback): bool {} /** * Send LDAP pagination control * @link https://php.net/manual/en/function.ldap-control-paged-result.php - * @param resource $link+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param int $pagesize@@ -1197,28 +1296,30 @@ function ldap_set_rebind_proc ($link, callable $callback) {} *
* @return bool TRUE on success or FALSE on failure. * @since 5.4 - * @deprecated Since 7.4 + * @removed 8.0 */ -function ldap_control_paged_result ($link, $pagesize, $iscritical = false, $cookie = "") {} +#[Deprecated(since: "7.4")] +function ldap_control_paged_result(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, int $pagesize, $iscritical = false, $cookie = ""): bool {} /** * Retrieve the LDAP pagination cookie * @link https://php.net/manual/en/function.ldap-control-paged-result-response.php - * @param resource $link+ * @param resource $ldap
* An LDAP link identifier, returned by ldap_connect. *
* @param resource $result - * @param string $cookie [optional]+ * @param string &$cookie [optional]
* An opaque structure sent by the server. *
- * @param int $estimated [optional]+ * @param int &$estimated [optional]
* The estimated number of entries to retrieve. *
* @return bool TRUE on success or FALSE on failure. * @since 5.4 - * @deprecated Since 7.4 + * @removed 8.0 */ -function ldap_control_paged_result_response ($link, $result, &$cookie = null, &$estimated = null) {} +#[Deprecated(since: "7.4")] +function ldap_control_paged_result_response(#[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, $result, &$cookie = null, &$estimated = null): bool {} /** * Escape a string for use in an LDAP filter or DN @@ -1228,19 +1329,18 @@ function ldap_control_paged_result_response ($link, $result, &$cookie = null, &$ * @return string * @since 5.6 */ - -function ldap_escape ($value, $ignore = "", $flags = 0) {} +function ldap_escape(string $value, string $ignore = "", int $flags = 0): string {} /** * (PHP 5.4 >= 5.4.26, PHP 5.5 >= 5.5.10, PHP 5.6 >= 5.6.0) * Batch and execute modifications on an LDAP entry * @link https://php.net/manual/en/function.ldap-modify-batch.php - * @param $link_identifier+ * @param $ldap
* An LDAP link identifier, returned by * {@see ldap_connect()}. *
- * @param $dnThe distinguished name of an LDAP entity.
- * @param $entryAn array that specifies the modifications to make. Each entry in this + * @param string $dn
The distinguished name of an LDAP entity.
+ * @param array $modifications_infoAn array that specifies the modifications to make. Each entry in this * array is an associative array with two or three keys: * attrib maps to the name of the attribute to modify, * modtype maps to the type of modification to perform, @@ -1249,14 +1349,12 @@ function ldap_escape ($value, $ignore = "", $flags = 0) {} *
** Possible values for modtype include: - *
* Each value specified through values is added (as * an additional value) to the attribute named by @@ -1266,9 +1364,7 @@ function ldap_escape ($value, $ignore = "", $flags = 0) {} * *
* Each value specified through values is removed * from the attribute named by attrib. Any value of @@ -1276,11 +1372,10 @@ function ldap_escape ($value, $ignore = "", $flags = 0) {} * will remain untouched. *
** All values are removed from the attribute named by * attrib. A values entry must @@ -1290,35 +1385,50 @@ function ldap_escape ($value, $ignore = "", $flags = 0) {} * *
* All current values of the attribute named by * attrib are replaced with the values specified * through values. *
** Note that any value for attrib must be a string, any * value for values must be an array of strings, and * any value for modtype must be one of the * LDAP_MODIFY_BATCH_* constants listed above. - *
- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. + * + * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. * @since 5.4 */ -function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) {} +function ldap_modify_batch( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + string $dn, + array $modifications_info, + #[Available(from: '7.3')] #[PhpVersionAware(["8.0" => "null|array"], default: "array")] $controls = null +): bool {} + +/** + * @param resource $ldap + * @param resource $result + * @return int returns the number of reference messages in a search result. + * @since 8.0 + */ +function ldap_count_references( + #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, + #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result +): int {} define('LDAP_ESCAPE_FILTER', 1); -define ('LDAP_ESCAPE_DN', 2); -define ('LDAP_DEREF_NEVER', 0); -define ('LDAP_DEREF_SEARCHING', 1); -define ('LDAP_DEREF_FINDING', 2); -define ('LDAP_DEREF_ALWAYS', 3); -define ('LDAP_MODIFY_BATCH_REMOVE',2); +define('LDAP_ESCAPE_DN', 2); +define('LDAP_DEREF_NEVER', 0); +define('LDAP_DEREF_SEARCHING', 1); +define('LDAP_DEREF_FINDING', 2); +define('LDAP_DEREF_ALWAYS', 3); +define('LDAP_MODIFY_BATCH_REMOVE', 2); define('LDAP_MODIFY_BATCH_ADD', 1); define('LDAP_MODIFY_BATCH_REMOVE_ALL', 18); define('LDAP_MODIFY_BATCH_REPLACE', 3); @@ -1356,7 +1466,7 @@ function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) * Specifies alternative rules for following aliases at the server. * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_DEREF', 2); +define('LDAP_OPT_DEREF', 2); /** *@@ -1368,7 +1478,7 @@ function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) * The lesser of these two settings is the actual size limit. * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_SIZELIMIT', 3); +define('LDAP_OPT_SIZELIMIT', 3); /** * Specifies the number of seconds to wait for search results. @@ -1377,54 +1487,54 @@ function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) * The lesser of these two settings is the actual time limit. * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_TIMELIMIT', 4); +define('LDAP_OPT_TIMELIMIT', 4); /** * Option for ldap_set_option to allow setting network timeout. * (Available as of PHP 5.3.0) * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_NETWORK_TIMEOUT', 20485); +define('LDAP_OPT_NETWORK_TIMEOUT', 20485); /** * Specifies the LDAP protocol to be used (V2 or V3). * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_PROTOCOL_VERSION', 17); -define ('LDAP_OPT_ERROR_NUMBER', 49); +define('LDAP_OPT_PROTOCOL_VERSION', 17); +define('LDAP_OPT_ERROR_NUMBER', 49); /** * Specifies whether to automatically follow referrals returned * by the LDAP server. * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_REFERRALS', 8); -define ('LDAP_OPT_RESTART', 9); -define ('LDAP_OPT_HOST_NAME', 48); -define ('LDAP_OPT_ERROR_STRING', 50); -define ('LDAP_OPT_MATCHED_DN', 51); +define('LDAP_OPT_REFERRALS', 8); +define('LDAP_OPT_RESTART', 9); +define('LDAP_OPT_HOST_NAME', 48); +define('LDAP_OPT_ERROR_STRING', 50); +define('LDAP_OPT_MATCHED_DN', 51); /** * Specifies a default list of server controls to be sent with each request. * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_SERVER_CONTROLS', 18); +define('LDAP_OPT_SERVER_CONTROLS', 18); /** * Specifies a default list of client controls to be processed with each request. * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_CLIENT_CONTROLS', 19); +define('LDAP_OPT_CLIENT_CONTROLS', 19); /** * Specifies a bitwise level for debug traces. * @link https://php.net/manual/en/ldap.constants.php */ -define ('LDAP_OPT_DEBUG_LEVEL', 20481); -define ('LDAP_OPT_X_SASL_MECH', 24832); -define ('LDAP_OPT_X_SASL_REALM', 24833); -define ('LDAP_OPT_X_SASL_AUTHCID', 24834); -define ('LDAP_OPT_X_SASL_AUTHZID', 24835); +define('LDAP_OPT_DEBUG_LEVEL', 20481); +define('LDAP_OPT_X_SASL_MECH', 24832); +define('LDAP_OPT_X_SASL_REALM', 24833); +define('LDAP_OPT_X_SASL_AUTHCID', 24834); +define('LDAP_OPT_X_SASL_AUTHZID', 24835); /** * Specifies the path of the directory containing CA certificates. @@ -1446,177 +1556,174 @@ function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) define('LDAP_OPT_TIMEOUT', 20482); define('LDAP_OPT_DIAGNOSTIC_MESSAGE', 50); - /** * Control Constant - Manage DSA IT (» RFC 3296) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_MANAGEDSAIT", "2.16.840.1.113730.3.4.2"); -echo /** * Control Constant - Proxied Authorization (» RFC 4370) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_PROXY_AUTHZ", "2.16.840.1.113730.3.4.18"); /** * Control Constant - Subentries (» RFC 3672) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_SUBENTRIES", "1.3.6.1.4.1.4203.1.10.1"); /** * Control Constant - Filter returned values (» RFC 3876) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_VALUESRETURNFILTER", "1.2.826.0.1.3344810.2.3"); /** * Control Constant - Assertion (» RFC 4528) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_ASSERT", "1.3.6.1.1.12"); /** * Control Constant - Pre read (» RFC 4527) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_PRE_READ", "1.3.6.1.1.13.1"); /** * Control Constant - Post read (» RFC 4527) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_POST_READ", "1.3.6.1.1.13.2"); /** * Control Constant - Sort request (» RFC 2891) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_SORTREQUEST", "1.2.840.113556.1.4.473"); /** * Control Constant - Sort response (» RFC 2891) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_SORTRESPONSE", "1.2.840.113556.1.4.474"); /** * Control Constant - Paged results (» RFC 2696) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_PAGEDRESULTS", "1.2.840.113556.1.4.319"); /** * Control Constant - Content Synchronization Operation (» RFC 4533) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_SYNC", "1.3.6.1.4.1.4203.1.9.1.1"); /** * Control Constant - Content Synchronization Operation State (» RFC 4533) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_SYNC_STATE", "1.3.6.1.4.1.4203.1.9.1.2"); /** * Control Constant - Content Synchronization Operation Done (» RFC 4533) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_SYNC_DONE", "1.3.6.1.4.1.4203.1.9.1.3"); /** * Control Constant - Don't Use Copy (» RFC 6171) * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_DONTUSECOPY", "1.3.6.1.1.22"); /** * Control Constant - Password Policy Request * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_PASSWORDPOLICYREQUEST", "1.3.6.1.4.1.42.2.27.8.5.1"); /** * Control Constant - Password Policy Response * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_PASSWORDPOLICYRESPONSE", "1.3.6.1.4.1.42.2.27.8.5.1"); /** * Control Constant - Active Directory Incremental Values * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_X_INCREMENTAL_VALUES", "1.2.840.113556.1.4.802"); /** * Control Constant - Active Directory Domain Scope * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_X_DOMAIN_SCOPE", "1.2.840.113556.1.4.1339"); /** * Control Constant - Active Directory Permissive Modify * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_X_PERMISSIVE_MODIFY", "1.2.840.113556.1.4.1413"); /** * Control Constant - Active Directory Search Options * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_X_SEARCH_OPTIONS", "1.2.840.113556.1.4.1340"); /** * Control Constant - Active Directory Tree Delete * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_X_TREE_DELETE", "1.2.840.113556.1.4.805"); /** * Control Constant - Active Directory Extended DN * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_X_EXTENDED_DN", "1.2.840.113556.1.4.529"); /** * Control Constant - Virtual List View Request * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_VLVREQUEST", "2.16.840.1.113730.3.4.9"); /** * Control Constant - Virtual List View Response * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 + * @since 7.2 */ define("LDAP_CONTROL_VLVRESPONSE", "2.16.840.1.113730.3.4.10"); - /** * Extended Operation constant - Modify password */ @@ -1642,5 +1749,14 @@ function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) */ define("LDAP_EXOP_WHO_AM_I", "1.3.6.1.4.1.4203.1.11.3"); +/** + * @since 7.3 + */ +define('LDAP_CONTROL_AUTHZID_REQUEST', '2.16.840.1.113730.3.4.16'); + +/** + * @since 7.3 + */ +define('LDAP_CONTROL_AUTHZID_RESPONSE', '2.16.840.1.113730.3.4.15'); + // End of ldap v. -?> diff --git a/leveldb/LevelDB.php b/leveldb/LevelDB.php index 4661c9af9..063fbd253 100644 --- a/leveldb/LevelDB.php +++ b/leveldb/LevelDB.php @@ -1,158 +1,154 @@ true, // if the specified database does not exist will create a new one - 'error_if_exists' => false, // if the opened database exists will throw exception - 'paranoid_checks' => false, - 'block_cache_size' => 8 * (2 << 20), - 'write_buffer_size' => 4<<20, - 'block_size' => 4096, - 'max_open_files' => 1000, - 'block_restart_interval' => 16, - 'compression' => LEVELDB_SNAPPY_COMPRESSION, - 'comparator' => NULL, // any callable parameter return 0, -1, 1 - ], array $read_options = [ - 'verify_check_sum' => false, //may be set to true to force checksum verification of all data that is read from the file system on behalf of a particular read. By default, no such verification is done. - 'fill_cache' => true, //When performing a bulk read, the application may set this to false to disable the caching so that the data processed by the bulk read does not end up displacing most of the cached contents. - ], array $write_options = [ - //Only one element named sync in the write option array. By default, each write to leveldb is asynchronous. - 'sync' => false - ]){} - - /** - * @param string $key - * @param array $read_options - * - * @return string|bool - */ - public function get($key, array $read_options = []){} - - /** - * Alias of LevelDB::put() - * - * @param string $key - * @param string $value - * @param array $write_options - */ - public function set($key, $value, array $write_options = []){} - - /** - * @param string $key - * @param string $value - * @param array $write_options - */ - public function put($key, $value, array $write_options = []){} - - /** - * @param string $key - * @param array $write_options - * - * @return bool - */ - public function delete($key, array $write_options = []){} - - /** - * Executes all of the operations added in the write batch. - * - * @param LevelDBWriteBatch $batch - * @param array $write_options - */ - public function write(LevelDBWriteBatch $batch, array $write_options = []){} - - /** - * Valid properties: - * - leveldb.stats: returns the status of the entire db - * - leveldb.num-files-at-level: returns the number of files for each level. For example, you can use leveldb.num-files-at-level0 the number of files for zero level. - * - leveldb.sstables: returns current status of sstables - * - * @param string $name - * - * @return mixed - */ - public function getProperty($name){} - - public function getApproximateSizes($start, $limit){} - - public function compactRange($start, $limit){} - - public function close(){} - - /** - * @param array $options - * - * @return LevelDBIterator - */ - public function getIterator(array $options = []){} - - /** - * @return LevelDBSnapshot - */ - public function getSnapshot(){} - - static public function destroy($name, array $options = []){} - - static public function repair($name, array $options = []){} +class LevelDB +{ + /** + * @param string $name Path to database + * @param array $options + * @param array $read_options + * @param array $write_options + */ + public function __construct($name, array $options = [ + 'create_if_missing' => true, // if the specified database does not exist will create a new one + 'error_if_exists' => false, // if the opened database exists will throw exception + 'paranoid_checks' => false, + 'block_cache_size' => 8 * (2 << 20), + 'write_buffer_size' => 4 << 20, + 'block_size' => 4096, + 'max_open_files' => 1000, + 'block_restart_interval' => 16, + 'compression' => LEVELDB_SNAPPY_COMPRESSION, + 'comparator' => null, // any callable parameter return 0, -1, 1 + ], array $read_options = [ + 'verify_check_sum' => false, //may be set to true to force checksum verification of all data that is read from the file system on behalf of a particular read. By default, no such verification is done. + 'fill_cache' => true, //When performing a bulk read, the application may set this to false to disable the caching so that the data processed by the bulk read does not end up displacing most of the cached contents. + ], array $write_options = [ + //Only one element named sync in the write option array. By default, each write to leveldb is asynchronous. + 'sync' => false + ]) {} + + /** + * @param string $key + * @param array $read_options + * + * @return string|false + */ + public function get($key, array $read_options = []) {} + + /** + * Alias of LevelDB::put() + * + * @param string $key + * @param string $value + * @param array $write_options + */ + public function set($key, $value, array $write_options = []) {} + + /** + * @param string $key + * @param string $value + * @param array $write_options + */ + public function put($key, $value, array $write_options = []) {} + + /** + * @param string $key + * @param array $write_options + * + * @return bool + */ + public function delete($key, array $write_options = []) {} + + /** + * Executes all of the operations added in the write batch. + * + * @param LevelDBWriteBatch $batch + * @param array $write_options + */ + public function write(LevelDBWriteBatch $batch, array $write_options = []) {} + + /** + * Valid properties: + * - leveldb.stats: returns the status of the entire db + * - leveldb.num-files-at-level: returns the number of files for each level. For example, you can use leveldb.num-files-at-level0 the number of files for zero level. + * - leveldb.sstables: returns current status of sstables + * + * @param string $name + * + * @return mixed + */ + public function getProperty($name) {} + + public function getApproximateSizes($start, $limit) {} + + public function compactRange($start, $limit) {} + + public function close() {} + + /** + * @param array $options + * + * @return LevelDBIterator + */ + public function getIterator(array $options = []) {} + + /** + * @return LevelDBSnapshot + */ + public function getSnapshot() {} + + public static function destroy($name, array $options = []) {} + + public static function repair($name, array $options = []) {} } -class LevelDBIterator implements Iterator{ - - public function __construct(LevelDB $db, array $read_options = []){} - - public function valid(){} +class LevelDBIterator implements Iterator +{ + public function __construct(LevelDB $db, array $read_options = []) {} - public function rewind(){} + public function valid() {} - public function last(){} + public function rewind() {} - public function seek($key){} + public function last() {} - public function next(){} + public function seek($key) {} - public function prev(){} + public function next() {} - public function key(){} + public function prev() {} - public function current(){} + public function key() {} - public function getError(){} + public function current() {} - public function destroy(){} + public function getError() {} + public function destroy() {} } -class LevelDBWriteBatch{ - public function __construct(){} +class LevelDBWriteBatch +{ + public function __construct() {} - public function set($key, $value, array $write_options = []){} + public function set($key, $value, array $write_options = []) {} - public function put($key, $value, array $write_options = []){} + public function put($key, $value, array $write_options = []) {} - public function delete($key, array $write_options = []){} + public function delete($key, array $write_options = []) {} - public function clear(){} + public function clear() {} } -class LevelDBSnapshot{ - public function __construct(LevelDB $db){} - - public function release(){} +class LevelDBSnapshot +{ + public function __construct(LevelDB $db) {} + public function release() {} } -class LevelDBException extends Exception{ - -} +class LevelDBException extends Exception {} diff --git a/libevent/libevent.php b/libevent/libevent.php index b1d49fed3..1c7849f68 100644 --- a/libevent/libevent.php +++ b/libevent/libevent.php @@ -8,7 +8,6 @@ // PHP Libevent extension documentation: // https://php.net/libevent - // Event flags /** @@ -62,7 +61,6 @@ */ define('EV_PERSIST', 16); - // Event loop modes /** @@ -82,17 +80,16 @@ */ define('EVLOOP_NONBLOCK', 2); - // Buffered event error codes (second argument in buffer's error-callback) /** - * An event occured during a read operation on the + * An event occurred during a read operation on the * bufferevent. See the other flags for which event it was. */ define('EVBUFFER_READ', 1); /** - * An event occured during a write operation on the bufferevent. + * An event occurred during a write operation on the bufferevent. * See the other flags for which event it was. */ define('EVBUFFER_WRITE', 2); @@ -113,9 +110,6 @@ */ define('EVBUFFER_TIMEOUT', 64); - - - /** *
Create and initialize new event base
* @@ -125,7 +119,7 @@ * * @return resource|false returns valid event base resource on success or FALSE on error. */ -function event_base_new(){} +function event_base_new() {} /** *Destroy event base
@@ -210,7 +204,7 @@ function event_base_loopbreak($event_base) {} * Valid event base resource. * * @param int $timeout [optional]- * Optional timeout parameter (in microseconds). If lower then 1, + * Optional timeout parameter (in microseconds). If lower than 1, * the event_base stops looping without a delay. *
* @@ -250,7 +244,6 @@ function event_base_set($event, $base) {} */ function event_base_priority_init($event_base, $npriorities) {} - /** *Creates and returns a new event resource.
*(PECL libevent >= 0.0.1)
@@ -280,7 +273,7 @@ function event_free($event) {} *Schedules the execution of the non-pending event (makes it pending in it's * configured base) when the event specified in {@link event_set}() occurs or in * at least the time specified by the timeout argument. If timeout was not specified, - * not timeout is set. The event must be already initalized by + * not timeout is set. The event must be already initialized by * {@link event_set}() and {@link event_base_set}() functions. * If the event already has a timeout set, * it is replaced by the new one.
@@ -344,7 +337,7 @@ function event_add($event, $timeout = -1) {} * The additional flag EV_PERSIST makes the event to persist until {@link event_del}() is * called, otherwise the callback is invoked only once. * - * @param callback $callback+ * @param callable $callback
* Callback function to be called when the matching event occurs. *
* @param mixed $arg [optional]@@ -370,7 +363,6 @@ function event_set($event, $fd, $events, $callback, $arg = null) {} */ function event_del($event) {} - /** *
Create new buffered event
*(PECL libevent >= 0.0.1)
@@ -393,9 +385,9 @@ function event_del($event) {} * @link https://php.net/event_buffer_new * * @param resource $stream Valid PHP stream resource. Must be castable to file descriptor. - * @param callback|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired. - * @param callback|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired. - * @param callback $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL. + * @param callable|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired. + * @param callable|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired. + * @param callable $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL. * @param mixed $arg An argument that will be passed to each of the callbacks (optional). * * @return resource|false returns new buffered event resource on success or FALSE on error. @@ -600,16 +592,15 @@ function event_buffer_fd_set($bevent, $fd) {} * @link https://php.net/event_buffer_set_callback * * @param resource $bevent Valid buffered event resource. - * @param callback|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired. - * @param callback|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired. - * @param callback $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL. + * @param callable|null $readcb Callback to invoke where there is data to read, or NULL if no callback is desired. + * @param callable|null $writecb Callback to invoke where the descriptor is ready for writing, or NULL if no callback is desired. + * @param callable $errorcb Callback to invoke where there is an error on the descriptor, cannot be NULL. * @param mixed $arg An argument that will be passed to each of the callbacks (optional). * * @return bool returns TRUE on success or FALSE on error. */ function event_buffer_set_callback($bevent, $readcb, $writecb, $errorcb, $arg = null) {} - /** *Alias of {@link event_new}().
* @@ -645,7 +636,7 @@ function event_timer_new() {} * @param resource $event* Valid event resource. *
- * @param callback $callback+ * @param callable $callback
* Callback function to be called when the matching event occurs. *
* @param mixed $arg [optional]
@@ -693,6 +684,4 @@ function event_timer_add($event, $timeout = -1) {}
*/
function event_timer_del($event) {}
-
// End of PECL libevent v.0.0.4
-
diff --git a/libsodium/libsodium.php b/libsodium/libsodium.php
index 6ab2b8a2b..58651eb0c 100644
--- a/libsodium/libsodium.php
+++ b/libsodium/libsodium.php
@@ -1,967 +1,789 @@
dest host control channel Note the less-common spelling that we're stuck with: */
+/* VIR_MIGRATE_TUNNELLED should be VIR_MIGRATE_TUNNELED */
+const VIR_MIGRATE_PEER2PEER = 2;
+/* tunnel migration data over libvirtd connection */
+const VIR_MIGRATE_TUNNELLED = 4;
+/* persist the VM on the destination */
+const VIR_MIGRATE_PERSIST_DEST = 8;
+/* undefine the VM on the source */
+const VIR_MIGRATE_UNDEFINE_SOURCE = 16;
+/* pause on remote side */
+const VIR_MIGRATE_PAUSED = 32;
+/* migration with non-shared storage with full disk copy */
+const VIR_MIGRATE_NON_SHARED_DISK = 64;
+/* migration with non-shared storage with incremental copy (same base image shared between source and destination) */
+const VIR_MIGRATE_NON_SHARED_INC = 128;
+/* protect for changing domain configuration through the whole migration process; this will be used automatically
+ when supported */
+const VIR_MIGRATE_CHANGE_PROTECTION = 256;
+/* force migration even if it is considered unsafe */
+const VIR_MIGRATE_UNSAFE = 512;
+/* offline migrate */
+const VIR_MIGRATE_OFFLINE = 1024;
+/* compress data during migration */
+const VIR_MIGRATE_COMPRESSED = 2048;
+/* abort migration on I/O errors happened during migration */
+const VIR_MIGRATE_ABORT_ON_ERROR = 4096;
+/* force convergence */
+const VIR_MIGRATE_AUTO_CONVERGE = 8192;
+
+/* Modify device allocation based on current domain state */
+const VIR_DOMAIN_DEVICE_MODIFY_CURRENT = 0;
+/* Modify live device allocation */
+const VIR_DOMAIN_DEVICE_MODIFY_LIVE = 1;
+/* Modify persisted device allocation */
+const VIR_DOMAIN_DEVICE_MODIFY_CONFIG = 2;
+/* Forcibly modify device (ex. force eject a cdrom) */
+const VIR_DOMAIN_DEVICE_MODIFY_FORCE = 4;
+
+/* REGISTER_LONG_CONSTANT */
+const VIR_STORAGE_POOL_BUILD_NEW = 0;
+/* Repair / reinitialize */
+const VIR_STORAGE_POOL_BUILD_REPAIR = 1;
+/* Extend existing pool */
+const VIR_STORAGE_POOL_BUILD_RESIZE = 2;
+
+/* Domain flags */
+const VIR_DOMAIN_FLAG_FEATURE_ACPI = 1;
+const VIR_DOMAIN_FLAG_FEATURE_APIC = 2;
+const VIR_DOMAIN_FLAG_FEATURE_PAE = 4;
+const VIR_DOMAIN_FLAG_CLOCK_LOCALTIME = 8;
+const VIR_DOMAIN_FLAG_TEST_LOCAL_VNC = 16;
+const VIR_DOMAIN_FLAG_SOUND_AC97 = 32;
+const VIR_DOMAIN_DISK_FILE = 1;
+const VIR_DOMAIN_DISK_BLOCK = 2;
+const VIR_DOMAIN_DISK_ACCESS_ALL = 4;
+
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE = 1;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE = 2;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER = 4;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_PAUSED = 8;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_PERSISTENT = 16;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_RUNNING = 32;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF = 64;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_TRANSIENT = 128;
+const VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = 2 ^ 31;
+
+const VIR_DOMAIN_MEM_CONFIG = VIR_DOMAIN_AFFECT_CONFIG;
+const VIR_DOMAIN_MEM_CURRENT = VIR_DOMAIN_AFFECT_CURRENT;
+const VIR_DOMAIN_MEM_LIVE = VIR_DOMAIN_AFFECT_LIVE;
+const VIR_DOMAIN_MEM_MAXIMUM = 4;
+
+const VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE = 0;
+const VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT = 1;
+const VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP = VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE;
+
+/* Connect flags */
+const VIR_CONNECT_FLAG_SOUNDHW_GET_NAMES = 1;
+
+/* Keycodeset constants */
+const VIR_KEYCODE_SET_LINUX = 0;
+const VIR_KEYCODE_SET_XT = 1;
+const VIR_KEYCODE_SET_ATSET1 = 6;
+const VIR_KEYCODE_SET_ATSET2 = 2;
+const VIR_KEYCODE_SET_ATSET3 = 3;
+const VIR_KEYCODE_SET_OSX = 4;
+const VIR_KEYCODE_SET_XT_KBD = 5;
+const VIR_KEYCODE_SET_USB = 6;
+const VIR_KEYCODE_SET_WIN32 = 7;
+const VIR_KEYCODE_SET_RFB = 8;
+
+/* virDomainUndefineFlagsValues */
+const VIR_DOMAIN_UNDEFINE_MANAGED_SAVE = 1;
+const VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA = 2;
+const VIR_DOMAIN_UNDEFINE_NVRAM = 4;
+const VIR_DOMAIN_UNDEFINE_KEEP_NVRAM = 8;
+
+/* Connect functions */
+
+/**
+ * Function is used to connect to the specified libvirt daemon using the specified URL, user can also set the readonly
+ * flag and/or set credentials for connection
+ * @param string $url URI for connection
+ * @param bool $readonly [optional] flag whether to use read-only connection or not, default true
+ * @param array $credentials [optional] array of connection credentials
+ * @return resource libvirt connection resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_connect(string $url, bool $readonly = true, array $credentials) {}
+
+/**
+ * Query statistics for all domains on a given connection
+ * @param resource $conn resource for connection
+ * @param int $stats [optional] the statistic groups from VIR_DOMAIN_STATS_*
+ * @param int $flags [optional] the statistic groups from VIR_DOMAIN_STATS_*
+ * @return array|false assoc array with statistics or false on error
+ * @since 0.5.1(-1)
+ */
+function libvirt_connect_get_all_domain_stats($conn, int $stats = 0, int $flags = 0): array|false {}
+
+/**
+ * Function is used to get the capabilities information from the connection
+ * @param resource $conn resource for connection
+ * @param string|null $xpath [optional] xPath query to be applied on the result
+ * @return string capabilities XML from the connection or FALSE for error
+ * @since 0.4.1(-2)
+ */
+function libvirt_connect_get_capabilities($conn, ?string $xpath): string {}
+
+/**
+ * Function is used to get the emulator for requested connection/architecture
+ * @param resource $conn libvirt connection resource
+ * @param string|null $arch [optional] architecture string, can be NULL to get default
+ * @return string path to the emulator
+ * @since 0.4.5
+ */
+function libvirt_connect_get_emulator($conn, ?string $arch): string {}
+
+/**
+ * Function is used to get the information whether the connection is encrypted or not
+ * @param resource $conn resource for connection
+ * @return int 1 if encrypted, 0 if not encrypted, -1 on error
+ * @since 0.4.1(-2)
+ */
+function libvirt_connect_get_encrypted($conn): int {}
+
+/**
+ * Function is used to get the hostname of the guest associated with the connection
+ * @param resource $conn resource for connection
+ * @return string|false hostname of the host node or FALSE for error
+ * @since 0.4.1(-1)
+ */
+function libvirt_connect_get_hostname($conn): string|false {}
+
+/**
+ * Function is used to get the information about the hypervisor on the connection identified by the connection pointer
+ * @param resource $conn libvirt-php: PHP API Reference guide
+ * @return array array of hypervisor information if available
+ */
+function libvirt_connect_get_hypervisor($conn): array {}
+
+/**
+ * Function is used to get the information about the connection
+ * @param resource $conn resource for connection
+ * @return array array of information about the connection
+ * @since 0.4.1(-2)
+ */
+function libvirt_connect_get_information($conn): array {}
+
+/**
+ * Function is used to get machine types supported by hypervisor on the connection
+ * @param resource $conn resource for connection
+ * @return array array of machine types for the connection incl. maxCpus if appropriate
+ * @since 0.4.9
+ */
+function libvirt_connect_get_machine_types($conn): array {}
+
+/**
+ * Function is used to get maximum number of VCPUs per VM on the hypervisor connection
+ * @param resource $conn resource for connection
+ * @return int|false number of VCPUs available per VM on the connection or FALSE for error
+ * @since 0.4.1(-2)
+ */
+function libvirt_connect_get_maxvcpus($conn): int|false {}
+
+/**
+ * Function is used to get NIC models for requested connection/architecture
+ * @param resource $conn libvirt connection resource
+ * @param string|null $arch [optional] architecture string, can be NULL to get default
+ * @return array array of models
+ * @since 0.4.9
+ */
+function libvirt_connect_get_nic_models($conn, ?string $arch): array {}
+
+/**
+ * Function is used to get the information whether the connection is secure or not
+ * @param resource $conn resource for connection
+ * @return int 1 if secure, 0 if not secure, -1 on error
+ * @since 0.4.1(-2)
+ */
+function libvirt_connect_get_secure($conn): int {}
+
+/**
+ * Function is used to get sound hardware models for requested connection/architecture
+ * @param resource $conn libvirt connection resource
+ * @param string|null $arch [optional] architecture string, can be NULL to get default
+ * @param int $flags [optional] flags for getting sound hardware. Can be either 0 or VIR_CONNECT_SOUNDHW_GET_NAMES
+ * @return array array of models
+ * @since 0.4.9
+ */
+function libvirt_connect_get_soundhw_models($conn, ?string $arch, int $flags = 0): array {}
+
+/**
+ * Function is used to get the system information from connection if available
+ * @param resource $conn resource for connection
+ * @return string|false XML description of system information from the connection or FALSE for error
+ * @since 0.4.1(-2)
+ */
+function libvirt_connect_get_sysinfo($conn): string|false {}
+
+/**
+ * Function is used to get the connection URI. This is useful to check the hypervisor type of host machine
+ * when using "null" uri to libvirt_connect()
+ * @param resource $conn resource for connection
+ * @return string|false connection URI string or FALSE for error
+ * @since 0.4.1(-1)
+ */
+function libvirt_connect_get_uri($conn): string|false {}
+
+/* Domain functions */
+
+/**
+ * Function is used to attach a virtual device to a domain
+ * @param resource $res libvirt domain resource
+ * @param string $xml XML description of one device
+ * @param int $flags [optional] flags
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.5.3
+ */
+function libvirt_domain_attach_device($res, string $xml, int $flags = 0): bool {}
+
+/**
+ * Function is used to commit block job
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $disk path to the block device, or device shorthand
+ * @param string|null $base [optional] path to backing file to merge into, or device shorthand, or NULL for default
+ * @param string|null $top [optional] path to file within backing chain that contains data to be merged,
+ * or device shorthand, or NULL to merge all possible data
+ * @param int $bandwidth [optional] specify bandwidth limit; flags determine the unit
+ * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_COMMIT_*
+ * @return bool true on success fail on error
+ * @since 0.5.2(-1)
+ */
+function libvirt_domain_block_commit($res, string $disk, ?string $base, ?string $top, int $bandwidth = 0, int $flags = 0): bool {}
+
+/**
+ * Function is used to abort block job
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $path device path to resize
+ * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_JOB_ABORT_*
+ * @return bool true on success fail on error
+ * @since 0.5.1(-1)
+ */
+function libvirt_domain_block_job_abort($res, string $path, int $flags = 0): bool {}
+
+/**
+ * Function is used to attach a virtual device to a domain
+ * @param resource $res libvirt domain resource
+ * @param string $disk path to the block device, or device shorthand
+ * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_COMMIT_*
+ * @return array Array with status virDomainGetBlockJobInfo and blockjob information
+ * @since 0.5.2(-1)
+ */
+function libvirt_domain_block_job_info($res, string $disk, int $flags = 0): array {}
+
+/**
+ * Function is used to set speed of block job
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $path device path to resize
+ * @param int $bandwidth bandwidth
+ * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_*
+ * @return bool true on success fail on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_block_job_set_speed($res, string $path, int $bandwidth, int $flags = 0): bool {}
+
+/**
+ * Function is used to resize the domain's block device
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $path device path to resize
+ * @param int $size size of device
+ * @param int $flags [optional] bitwise-OR of VIR_DOMAIN_BLOCK_RESIZE_*
+ * @return bool true on success fail on error
+ * @since 0.5.1(-1)
+ */
+function libvirt_domain_block_resize($res, string $path, int $size, int $flags = 0): bool {}
+
+/**
+ * Function is used to get the domain's block stats
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $path device path to get statistics about
+ * @return array domain block stats array, fields are rd_req, rd_bytes, wr_req, wr_bytes and errs
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_block_stats($res, string $path): array {}
+
+/**
+ * Function is used to change the domain boot devices
+ * @param resource $res libvirt domain resource
+ * @param string $first first boot device to be set
+ * @param string $second second boot device to be set
+ * @param int $flags [optional] flags
+ * @return resource new domain resource
+ * @since 0.4.2
+ */
+function libvirt_domain_change_boot_devices($res, string $first, string $second, int $flags = 0) {}
+
+/**
+ * Function is used to change the domain memory allocation
+ * @param resource $res libvirt domain resource
+ * @param int $allocMem number of MiBs to be set as immediate memory value
+ * @param int $allocMax number of MiBs to be set as the maximum allocation
+ * @param int $flags [optional] flags
+ * @return resource new domain resource
+ * @since 0.4.2
+ */
+function libvirt_domain_change_memory($res, int $allocMem, int $allocMax, int $flags = 0) {}
+
+/**
+ * Function is used to change the VCPU count for the domain
+ * @param resource $res libvirt domain resource
+ * @param int $numCpus number of VCPUs to be set for the guest
+ * @param int $flags [optional] flags for virDomainSetVcpusFlags
+ * (available at http://libvirt.org/html/libvirt-libvirt.html#virDomainVcpuFlags)
+ * @return bool true on success, false on error
+ * @since 0.4.2
+ */
+function libvirt_domain_change_vcpus($res, int $numCpus, int $flags = 0): bool {}
+
+/**
+ * Function is used to dump core of the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $to to
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-2)
+ */
+function libvirt_domain_core_dump($res, string $to): bool {}
+
+/**
+ * Function is used to create the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return bool result of domain creation (startup)
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_create($res): bool {}
+
+/**
+ * Function is used to create the domain identified by it's resource
+ * @param resource $conn libvirt connection resource
+ * @param string $xml XML string to create guest from
+ * @param int $flags [optional] flags
+ * @return resource newly started/created domain resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_create_xml($conn, string $xml, int $flags = 0) {}
+
+/**
+ * Function is used to define the domain from XML string
+ * @param resource $conn libvirt connection resource
+ * @param string $xml XML string to define guest from
+ * @return resource newly defined domain resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_define_xml($conn, string $xml) {}
+
+/**
+ * Function is used to destroy the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return bool result of domain destroy
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_destroy($res): bool {}
+
+/**
+ * Function is used to detach a virtual device from a domain
+ * @param resource $res libvirt domain resource
+ * @param string $xml XML description of one device
+ * @param int $flags [optional] flags to control how the device is attached. Defaults to VIR_DOMAIN_AFFECT_LIVE
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.5.3
+ */
+function libvirt_domain_detach_device($res, string $xml, int $flags = VIR_DOMAIN_AFFECT_LIVE): bool {}
+
+/**
+ * Function is used to add the disk to the virtual machine using set of API functions to make it as simple
+ * as possible for the user
+ * @param resource $res libvirt domain resource
+ * @param string $img string for the image file on the host system
+ * @param string $dev string for the device to be presented to the guest (e.g. hda)
+ * @param string $typ bus type for the device in the guest, usually 'ide' or 'scsi'
+ * @param string $driver driver type to be specified, like 'raw' or 'qcow2'
+ * @param int $flags [optional] flags for getting the XML description
+ * @return resource new domain resource
+ * @since 0.4.2
+ */
+function libvirt_domain_disk_add($res, string $img, string $dev, string $typ, string $driver, int $flags = 0) {}
+
+/**
+ * Function is used to remove the disk from the virtual machine using set of API functions to make it
+ * as simple as possible
+ * @param resource $res libvirt domain resource
+ * @param string $dev string for the device to be removed from the guest (e.g. 'hdb')
+ * @param int $flags [optional] flags for getting the XML description
+ * @return resource new domain resource
+ * @since 0.4.2
+ */
+function libvirt_domain_disk_remove($res, string $dev, int $flags = 0) {}
+
+/**
+ * Function is getting the autostart value for the domain
+ * @param resource $res libvirt domain resource
+ * @return int autostart value or -1
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_autostart($res): int {}
+
+/**
+ * Function is used to get the domain's block device information
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $dev device to get block information about
+ * @return array domain block device information array of device, file or partition, capacity,
+ * allocation and physical size
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_block_info($res, string $dev): array {}
+
+/**
+ * Function is used to get the domain's connection resource. This function should *not* be used!
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return resource libvirt connection resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_connect($res) {}
+
+/**
+ * Function is getting domain counts for all, active and inactive domains
+ * @param resource $conn libvirt connection resource from libvirt_connect()
+ * @return array array of total, active and inactive (but defined) domain counts
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_counts($conn): array {}
+
+/**
+ * Function is used to get disk devices for the domain
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return array|false list of domain disk devices
+ * @since 0.4.4
+ */
+function libvirt_domain_get_disk_devices($res): array|false {}
+
+/**
+ * Function is used to get the domain's ID, applicable to running guests only
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return int running domain ID or -1 if not running
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_id($res): int {}
+
+/**
+ * Function is used to get the domain's information
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return array domain information array
+ * @since 0.4.4
+ */
+function libvirt_domain_get_info($res): array {}
+
+/**
+ * Function is used to get network interface devices for the domain
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return array|false list of domain interface devices
+ * @since 0.4.4
+ */
+function libvirt_domain_get_interface_devices($res): array|false {}
+
+/**
+ * Function is used get job information for the domain
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return array job information array of type, time, data, mem and file fields
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_job_info($res): array {}
+
+/**
+ * Function retrieve appropriate domain element given by $type
+ * @param resource $res libvirt domain resource
+ * @param int $type virDomainMetadataType type of description
+ * @param string $uri XML namespace identifier
+ * @param int $flags bitwise-OR of virDomainModificationImpact
+ * @return string|null|false metadata string, NULL on error or FALSE on API not supported
+ * @since 0.4.9
+ */
+function libvirt_domain_get_metadata($res, int $type, string $uri, int $flags = 0): string|null|false {}
+
+/**
+ * Function is used to get domain name from it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return string domain name string
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_name($res): string {}
+
+/**
+ * Function is used to get the domain's network information
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $mac mac address of the network device
+ * @return array domain network info array of MAC address, network name and type of NIC card
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_network_info($res, string $mac): array {}
+
+/**
+ * This functions can be used to get the next free slot if you intend to add a new device identified
+ * by slot to the domain, e.g. NIC device
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return array next free slot number for the domain
+ * @since 0.4.2
+ */
+function libvirt_domain_get_next_dev_ids($res): array {}
+
+/**
+ * Function get screen dimensions of the VNC window
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $server server string of the host machine
+ * @return array|false array of height and width on success, FALSE otherwise
+ * @since 0.4.2
+ */
+function libvirt_domain_get_screen_dimensions($res, string $server): array|false {}
+
+/**
+ * Function uses gvnccapture (if available) to get the screenshot of the running domain
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $server server string for the host machine
+ * @param int $scancode [optional] integer value of the scancode to be send to refresh screen, default is 10
+ * @return string PNG image binary data
+ * @since 0.4.2
+ */
+function libvirt_domain_get_screenshot($res, string $server, int $scancode = 10): string {}
+
+/**
+ * Function is trying to get domain screenshot using libvirt virGetDomainScreenshot() API if available
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_get_by_*()
+ * @param int $screenID [optional] monitor ID from where to take screenshot
+ * @return array array of filename and mime type as type is hypervisor specific,
+ * caller is responsible for temporary file deletion
+ * @since 0.4.5
+ */
+function libvirt_domain_get_screenshot_api($res, int $screenID = 0): array {}
+
+/**
+ * Function is used to get the domain's UUID in binary format
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return string domain UUID in binary format
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_uuid($res): string {}
+
+/**
+ * Function is used to get the domain's UUID in string format
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return string domain UUID string
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_get_uuid_string($res): string {}
+
+/**
+ * Function is used to get the domain's XML description
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string|null $xpath xPath expression string to get just this entry, can be NULL
+ * @param int $flags [optional] flags
+ * @return string domain XML description string or result of xPath expression
+ * @since 0.4.2
+ */
+function libvirt_domain_get_xml_desc($res, ?string $xpath, int $flags = 0): string {}
+
+/**
+ * Function is used to get network interface addresses for the domain
+ * @param resource $res libvirt domain resource
+ * @param int $source one of the VIR_DOMAIN_ADDRESSES_SRC_* flags
+ * @return array|false interface array of a domain holding information about addresses resembling
+ * the virDomainInterface structure, false on error
+ * @since 0.5.5
+ */
+function libvirt_domain_interface_addresses($res, int $source): array|false {}
+
+/**
+ * Function is used to get the domain's interface stats
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $path path to interface device
+ * @return array interface stats array of {tx|rx}_{bytes|packets|errs|drop} fields
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_interface_stats($res, string $path): array {}
+
+/**
+ * Function is getting information whether domain identified by resource is active or not
+ * @param resource $res libvirt domain resource
+ * @return bool virDomainIsActive() result on the domain
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_is_active($res): bool {}
+
+/**
+ * Function to get information whether domain is persistent or not
+ * @param resource $res libvirt domain resource
+ * @return bool TRUE for persistent, FALSE for not persistent, -1 on error
+ * @since 0.4.9
+ */
+function libvirt_domain_is_persistent($res): bool {}
+
+/**
+ * Function is used to get domain by it's ID, applicable only to running guests
+ * @param resource $conn libvirt connection resource from libvirt_connect()
+ * @param string $id domain id to look for
+ * @return resource libvirt domain resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_lookup_by_id($conn, string $id) {}
+
+/**
+ * Function is used to lookup for domain by it's name
+ * @param resource $res libvirt connection resource from libvirt_connect()
+ * @param string $name domain name to look for
+ * @return resource libvirt domain resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_lookup_by_name($res, string $name) {}
+
+/**
+ * Function is used to lookup for domain by it's UUID in the binary format
+ * @param resource $res libvirt connection resource from libvirt_connect()
+ * @param string $uuid binary defined UUID to look for
+ * @return resource libvirt domain resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_lookup_by_uuid($res, string $uuid) {}
+
+/**
+ * Function is used to get the domain by it's UUID that's accepted in string format
+ * @param resource $res libvirt connection resource from libvirt_connect()
+ * @param string $uuid domain UUID [in string format] to look for
+ * @return resource libvirt domain resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_lookup_by_uuid_string($res, string $uuid) {}
+
+/**
+ * Function is used to managed save the domain (domain was unloaded from memory and it state saved to disk)
+ * identified by it's resource
+ * @param resource $res TRUE for success, FALSE on error
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_managedsave($res): bool {}
+
+/**
+ * Function is used to get the domain's memory peek value
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param int $start start
+ * @param int $size size
+ * @param int $flags flags
+ * @return int domain memory peek
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_memory_peek($res, int $start, int $size, int $flags = 0): int {}
+
+/**
+ * Function is used to get the domain's memory stats
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param int $flags [optional] flags
+ * @return array domain memory stats array (same fields as virDomainMemoryStats, please see libvirt documentation)
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_memory_stats($res, int $flags = 0): array {}
+
+/**
+ * Function is used migrate domain to another domain
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $dest_conn destination host connection object
+ * @param int $flags migration flags
+ * @param string $dname [optional] domain name to rename domain to on destination side
+ * @param int $bandwidth [optional] migration bandwidth in Mbps
+ * @return resource libvirt domain resource for migrated domain
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_migrate($res, string $dest_conn, int $flags, string $dname, int $bandwidth = 0) {}
+
+/**
+ * Function is used migrate domain to another libvirt daemon specified by it's URI
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $dest_uri destination URI to migrate to
+ * @param int $flags migration flags
+ * @param string $dname [optional] domain name to rename domain to on destination side
+ * @param int $bandwidth [optional] migration bandwidth in Mbps
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_migrate_to_uri($res, string $dest_uri, int $flags, string $dname, int $bandwidth = 0): bool {}
+
+/**
+ * Function is used migrate domain to another libvirt daemon specified by it's URI
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $dconnuri URI for target libvirtd
+ * @param string $miguri URI for invoking the migration
+ * @param string $dxml XML config for launching guest on target
+ * @param int $flags migration flags
+ * @param string $dname [optional] domain name to rename domain to on destination side
+ * @param int $bandwidth [optional] migration bandwidth in Mbps
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.6(-1)
+ */
+function libvirt_domain_migrate_to_uri2($res, string $dconnuri, string $miguri, string $dxml, int $flags, string $dname, int $bandwidth = 0): bool {}
+
+/**
+ * Function is used to install a new virtual machine to the machine
+ * @param resource $conn libvirt connection resource
+ * @param string $name name of the new domain
+ * @param string|null|false $arch optional architecture string, can be NULL to get default (or false)
+ * @param int $memMB number of megabytes of RAM to be allocated for domain
+ * @param int $maxmemMB maximum number of megabytes of RAM to be allocated for domain
+ * @param int $vcpus number of VCPUs to be allocated to domain
+ * @param string $iso_image installation ISO image for domain
+ * @param array $disks array of disk devices for domain, consist of keys as 'path' (storage location),
+ * 'driver' (image type, e.g. 'raw' or 'qcow2'), 'bus' (e.g. 'ide', 'scsi'),
+ * 'dev' (device to be presented to the guest - e.g. 'hda'),
+ * 'size' (with 'M' or 'G' suffixes, like '10G' for 10 gigabytes image etc.) and
+ * 'flags' (VIR_DOMAIN_DISK_FILE or VIR_DOMAIN_DISK_BLOCK, optionally VIR_DOMAIN_DISK_ACCESS_ALL
+ * to allow access to the disk for all users on the host system)
+ * @param array $networks array of network devices for domain, consists of keys as 'mac' (for MAC address),
+ * 'network' (for network name) and optional 'model' for model of NIC device
+ * @param int $flags [optional] bit array of flags
+ * @return resource a new domain resource
+ * @since 0.4.5
+ */
+function libvirt_domain_new($conn, string $name, string|null|false $arch, int $memMB, int $maxmemMB, int $vcpus, string $iso_image, array $disks, array $networks, int $flags = 0) {}
+
+/**
+ * Function is used to get the VNC server location for the newly created domain (newly started installation)
+ * @return string|null a VNC server for a newly created domain resource (if any)
+ * @since 0.4.5
+ */
+function libvirt_domain_new_get_vnc(): string|null {}
+
+/**
+ * Function is used to add the NIC card to the virtual machine using set of API functions to make it as simple
+ * as possible for the user
+ * @param resource $res libvirt domain resource
+ * @param string $mac libvirt domain resource
+ * @param string $network network name where to connect this NIC
+ * @param string $model string of the NIC model
+ * @param int $flags [optional] flags for getting the XML description
+ * @return resource new domain resource
+ * @since 0.4.2
+ */
+function libvirt_domain_nic_add($res, string $mac, string $network, string $model, int $flags = 0) {}
+
+/**
+ * Function is used to remove the NIC from the virtual machine using set of API functions to make it
+ * as simple as possible
+ * @param resource $res libvirt domain resource
+ * @param string $dev string representation of the IP address to be removed (e.g. 54:52:00:xx:yy:zz)
+ * @param int $flags [optional] flags for getting the XML description
+ * @return resource new domain resource
+ * @since 0.4.2
+ */
+function libvirt_domain_nic_remove($res, string $dev, int $flags = 0) {}
+
+/**
+ * Function is used to send qemu-ga command
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $cmd command
+ * @param int $timeout [optional] timeout
+ * @param int $flags [optional] unknown
+ * @return string|false String on success and FALSE on error
+ * @since 0.5.2(-1)
+ */
+function libvirt_domain_qemu_agent_command($res, string $cmd, $timeout = -1, int $flags = 0): string|false {}
+
+/**
+ * Function is used to reboot the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param int $flags [optional] flags
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_reboot($res, int $flags = 0): bool {}
+
+/**
+ * Function is used to reset the domain identified by its resource
+ * @param resource $res libvirt domain resource
+ * @param int $flags [optional] @flags
+ * @return bool true on success, false on error
+ * @since 0.5.5
+ */
+function libvirt_domain_reset($res, int $flags = 0): bool {}
+
+/**
+ * Function is used to resume the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return resource result of domain resume
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_resume($res) {}
+
+/**
+ * Function sends keys to domain via libvirt API
+ * @param resource $res libvirt domain resource
+ * @param int $codeset the codeset of keycodes, from virKeycodeSet
+ * @param int $holdtime the duration (in milliseconds) that the keys will be held
+ * @param array $keycodes array of keycodes
+ * @param int $flags [optional] extra flags; not used yet so callers should always pass 0
+ * @return bool TRUE for success, FALSE for failure
+ * @since 0.5.3
+ */
+function libvirt_domain_send_key_api($res, int $codeset, int $holdtime, array $keycodes, int $flags = 0): bool {}
+
+/**
+ * Function sends keys to the domain's VNC window
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $server server string of the host machine
+ * @param int $scancode integer scancode to be sent to VNC window
+ * @return bool TRUE on success, FALSE otherwise
+ * @since 0.4.2
+ */
+function libvirt_domain_send_keys($res, string $server, int $scancode): bool {}
+
+/**
+ * Function sends keys to the domain's VNC window
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $server server string of the host machine
+ * @param int $pos_x position on x-axis
+ * @param int $pos_y position on y-axis
+ * @param int $clicked mask of clicked buttons (0 for none, bit 1 for button #1, bit 8 for button #8)
+ * @param bool $release [optional] boolean value (0 or 1) whether to release the buttons automatically once pressed,
+ * default true
+ * @return bool TRUE on success, FALSE otherwise
+ * @since 0.4.2
+ */
+function libvirt_domain_send_pointer_event($res, string $server, int $pos_x, int $pos_y, int $clicked, bool $release = true): bool {}
+
+/**
+ * Function is setting the autostart value for the domain
+ * @param resource $res libvirt domain resource
+ * @param bool $flags flag to enable/disable autostart
+ * @return bool TRUE on success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_set_autostart($res, bool $flags): bool {}
+
+/**
+ * Function to set max memory for domain
+ * @param resource $res libvirt domain resource
+ * @param int $memory memory size in 1024 bytes (Kb)
+ * @return bool TRUE for success, FALSE for failure
+ * @since 0.5.1
+ */
+function libvirt_domain_set_max_memory($res, int $memory): bool {}
+
+/**
+ * Function to set memory for domain
+ * @param resource $res libvirt domain resource
+ * @param int $memory memory size in 1024 bytes (Kb)
+ * @return bool TRUE for success, FALSE for failure
+ * @since 0.5.1
+ */
+function libvirt_domain_set_memory($res, int $memory): bool {}
+
+/**
+ * Function to set max memory for domain
+ * @param resource $res libvirt domain resource
+ * @param int $memory memory size in 1024 bytes (Kb)
+ * @param int $flags [optional] bitwise-OR VIR_DOMAIN_MEM_* flags
+ * @return bool TRUE for success, FALSE for failure
+ * @since 0.5.1
+ */
+function libvirt_domain_set_memory_flags($res, int $memory = 0, int $flags = 0): bool {}
+
+/**
+ * Function sets the appropriate domain element given by $type to the value of $metadata. No new lines are permitted
+ * @param resource $res libvirt domain resource
+ * @param int $type virDomainMetadataType type of description
+ * @param string $metadata new metadata text
+ * @param string $key XML namespace key or empty string (alias of NULL)
+ * @param string $uri XML namespace identifier or empty string (alias of NULL)
+ * @param int $flags bitwise-OR of virDomainModificationImpact
+ * @return int -1 on error, 0 on success
+ * @since 0.4.9
+ */
+function libvirt_domain_set_metadata($res, int $type, string $metadata, string $key, string $uri, int $flags = 0): int {}
+
+/**
+ * Function is used to shutdown the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_shutdown($res): bool {}
+
+/**
+ * Function is used to suspend the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_suspend($res): bool {}
+
+/**
+ * Function is used to undefine the domain identified by it's resource
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_undefine($res): bool {}
+
+/**
+ * Function is used to undefine(with flags) the domain identified by it's resource
+ * @param resource $res libvirt domain resource
+ * @param int $flags [optional] flags
+ * @return bool TRUE if success, FALSE on error
+ * @since 999 https://github.com/yzslab/php-libvirt-client
+ */
+function libvirt_domain_undefine_flags($res, int $flags = 0): bool {}
+
+/**
+ * Function is used to update the domain's devices from the XML string
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $xml XML string for the update
+ * @param int $flags Flags to update the device (VIR_DOMAIN_DEVICE_MODIFY_CURRENT, VIR_DOMAIN_DEVICE_MODIFY_LIVE,
+ * VIR_DOMAIN_DEVICE_MODIFY_CONFIG, VIR_DOMAIN_DEVICE_MODIFY_FORCE)
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_update_device($res, string $xml, int $flags): bool {}
+
+/**
+ * Function is used to convert native configuration data to libvirt domain XML
+ * @param resource $conn libvirt connection resource
+ * @param string $format configuration format converting from
+ * @param string $config_data content of the native config file
+ * @return string|false libvirt domain XML, FALSE on error
+ * @since 0.5.3
+ */
+function libvirt_domain_xml_from_native($conn, string $format, string $config_data): string|false {}
+
+/**
+ * Function is used to convert libvirt domain XML to native configuration
+ * @param resource $conn libvirt connection resource
+ * @param string $format configuration format converting from
+ * @param string $xml_data content of the libvirt domain xml file
+ * @return string|false contents of the native data file, FALSE on error
+ * @since 0.5.3
+ */
+function libvirt_domain_xml_to_native($conn, string $format, string $xml_data): string|false {}
+
+/**
+ * Function is used to get the result of xPath expression that's run against the domain
+ * @param resource $res libvirt domain resource, e.g. from libvirt_domain_lookup_by_*()
+ * @param string $xpath xPath expression to parse against the domain
+ * @param int $flags [optional] flags
+ * @return array result of the expression in an array
+ * @since 0.4.1(-1)
+ */
+function libvirt_domain_xml_xpath($res, string $xpath, int $flags = 0): array {}
+
+/**
+ * Function is used to list active domain IDs on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt active domain ids array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_active_domain_ids($res): array {}
+
+/**
+ * Function is used to list active domain names on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt active domain names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_active_domains($res): array {}
+
+/**
+ * Function is used to list domain resources on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt domain resources array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_domain_resources($res): array {}
+
+/**
+ * Function is used to list domains on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt domain names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_domains($res): array {}
+
+/**
+ * Function is used to list inactive domain names on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt inactive domain names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_inactive_domains($res): array {}
+
+/* Network functions */
+
+/**
+ * Function is used to list networks on the connection
+ * @param resource $conn libvirt connection resource
+ * @param int $flags [optional] flags to filter the results for a smaller list of targeted networks
+ * (bitwise-OR VIR_CONNECT_LIST_NETWORKS_* constants)
+ * @return array libvirt network resources array for the connection
+ * @since 0.5.3
+ */
+function libvirt_list_all_networks($conn, int $flags = VIR_CONNECT_LIST_NETWORKS_ACTIVE|VIR_CONNECT_LIST_NETWORKS_INACTIVE): array {}
+
+/**
+ * Function is used to list networks on the connection
+ * @param resource $res libvirt connection resource
+ * @param int $flags [optional] flags whether to list active,
+ * inactive or all networks (VIR_NETWORKS_{ACTIVE|INACTIVE|ALL} constants)
+ * @return array libvirt network names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_networks($res, int $flags = 0): array {}
+
+/**
+ * Function is used to define a new virtual network based on the XML description
+ * @param resource $res libvirt connection resource
+ * @param string $xml XML string definition of network to be defined
+ * @return resource libvirt network resource of newly defined network
+ * @since 0.4.2
+ */
+function libvirt_network_define_xml($res, string $xml) {}
+
+/**
+ * Function is used to get the network resource from name
+ * @param resource $res libvirt connection resource
+ * @param string $name network name string
+ * @return resource libvirt network resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_network_get($res, string $name) {}
+
+/**
+ * Function is used to get the activity state of the network
+ * @param resource $res libvirt network resource
+ * @return int|false 1 when active, 0 when inactive, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_network_get_active($res): int|false {}
+
+/**
+ * Function is getting the autostart value for the network
+ * @param resource $res libvirt network resource
+ * @return int autostart value or -1 on error
+ * @since 0.5.4
+ */
+function libvirt_network_get_autostart($res): int {}
+
+/**
+ * Function is used to get the bridge associated with the network
+ * @param resource $res libvirt network resource
+ * @return string bridge name string
+ * @since 0.4.1(-1)
+ */
+function libvirt_network_get_bridge($res): string {}
+
+/**
+ * Function is used to get the network information
+ * @param resource $res libvirt network resource
+ * @return array network information array
+ * @since 0.4.1(-1)
+ */
+function libvirt_network_get_information($res): array {}
+
+/**
+ * Function is used to get network's name
+ * @param resource $res libvirt network resource
+ * @return string|false network name string or FALSE on failure
+ * @since 0.5.3
+ */
+function libvirt_network_get_name($res): string|false {}
+
+/**
+ * Function is used to get network's UUID in binary format
+ * @param resource $res libvirt network resource
+ * @return string|false network UUID in binary format or FALSE on failure
+ * @since 0.5.3
+ */
+function libvirt_network_get_uuid($res): string|false {}
+
+/**
+ * Function is used to get network's UUID in string format
+ * @param resource $res libvirt network resource
+ * @return string|false network UUID string or FALSE on failure
+ * @since 0.5.3
+ */
+function libvirt_network_get_uuid_string($res): string|false {}
+
+/**
+ * Function is used to get the XML description for the network
+ * @param resource $res libvirt network resource
+ * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
+ * @return string|false network XML string or result of xPath expression
+ * @since 0.4.1(-1)
+ */
+function libvirt_network_get_xml_desc($res, ?string $xpath): string|false {}
+
+/**
+ * Function is used to set the activity state of the network
+ * @param resource $res libvirt network resource
+ * @param int $flags active
+ * @return bool TRUE if success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_network_set_active($res, int $flags): bool {}
+
+/**
+ * Function is setting the autostart value for the network
+ * @param resource $res libvirt network resource
+ * @param int $flags flag to enable/disable autostart
+ * @return bool TRUE on success, FALSE on error
+ * @since 0.5.4
+ */
+function libvirt_network_set_autostart($res, int $flags): bool {}
+
+/**
+ * Function is used to undefine already defined network
+ * @param resource $res libvirt network resource
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.2
+ */
+function libvirt_network_undefine($res): bool {}
+
+/* Node functions */
+
+/**
+ * Function is used to get the CPU stats per nodes
+ * @param resource $conn resource for connection
+ * @param int $cpunr [optional] CPU number to get information about,
+ * defaults to VIR_NODE_CPU_STATS_ALL_CPUS to get information about all CPUs
+ * @return array|false array of node CPU statistics including time (in seconds since UNIX epoch),
+ * cpu number and total number of CPUs on node or FALSE for error
+ * @since 0.4.6
+ */
+function libvirt_node_get_cpu_stats($conn, int $cpunr = VIR_NODE_CPU_STATS_ALL_CPUS): array|false {}
+
+/**
+ * Function is used to get the CPU stats for each CPU on the host node
+ * @param resource $conn resource for connection
+ * @param int $time [optional] time in seconds to get the information about, without aggregation for further processing
+ * @return array|false array of node CPU statistics for each CPU including time (in seconds since UNIX epoch),
+ * cpu number and total number of CPUs on node or FALSE for error
+ * @since 0.4.6
+ */
+function libvirt_node_get_cpu_stats_for_each_cpu($conn, int $time = 0): array|false {}
+
+/**
+ * Function is used to get free memory available on the node
+ * @param resource $conn libvirt connection resource
+ * @return string|false The available free memory in bytes as string or FALSE for error
+ * @since 0.5.3
+ */
+function libvirt_node_get_free_memory($conn): string|false {}
+
+/**
+ * Function is used to get the information about host node, mainly total memory installed,
+ * total CPUs installed and model information are useful
+ * @param resource $conn resource for connection
+ * @return array|false array of node information or FALSE for error
+ * @since 0.4.1(-1)
+ */
+function libvirt_node_get_info($conn): array|false {}
+
+/**
+ * Function is used to get the memory stats per node
+ * @param resource $conn resource for connection
+ * @return array array of node memory statistics including time (in seconds since UNIX epoch) or FALSE for error
+ * @since 0.4.6
+ */
+function libvirt_node_get_mem_stats($conn): array {}
+
+/* Nodedev functions */
+
+/**
+ * Function is used to list node devices on the connection
+ * @param resource $res libvirt connection resource
+ * @param string|null $cap [optional] capability string
+ * @return array libvirt nodedev names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_nodedevs($res, ?string $cap): array {}
+
+/**
+ * Function is used to list node devices by capabilities
+ * @param resource $res libvirt nodedev resource
+ * @return array nodedev capabilities array
+ * @since 0.4.1(-1)
+ */
+function libvirt_nodedev_capabilities($res): array {}
+
+/**
+ * Function is used to get the node device by it's name
+ * @param resource $res libvirt connection resource
+ * @param string $name name of the nodedev to get resource
+ * @return resource libvirt nodedev resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_nodedev_get($res, string $name) {}
+
+/**
+ * Function is used to get the node device's information
+ * @param resource $res libvirt nodedev resource
+ * @return array nodedev information array
+ * @since 0.4.1(-1)
+ */
+function libvirt_nodedev_get_information($res): array {}
+
+/**
+ * Function is used to get the node device's XML description
+ * @param resource $res libvirt nodedev resource
+ * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
+ * @return string nodedev XML description string or result of xPath expression
+ * @since 0.4.2
+ */
+function libvirt_nodedev_get_xml_desc($res, ?string $xpath): string {}
+
+/* Nwfilter functions */
+
+/**
+ * Function is used to list nwfilters on the connection
+ * @param resource $res libvirt domain resource
+ * @return array libvirt nwfilter resources array for the connection
+ * @since 0.5.4
+ */
+function libvirt_list_all_nwfilters($res): array {}
+
+/**
+ * Function is used to list nwfilters on the connection
+ * @param resource $conn libvirt connection resource
+ * @return array libvirt nwfilter names array for the connection
+ * @since 0.5.4
+ */
+function libvirt_list_nwfilters($conn): array {}
+
+/**
+ * Function is used to define a new nwfilter based on the XML description
+ * @param resource $conn libvirt connection resource
+ * @param string $xml XML string definition of nwfilter to be defined
+ * @return resource|false libvirt nwfilter resource of newly defined nwfilter or false on error
+ * @since 0.5.4
+ */
+function libvirt_nwfilter_define_xml($conn, string $xml) {}
+
+/**
+ * Function is used to get nwfilter's name
+ * @param resource $res libvirt nwfilter resource
+ * @return string|false nwfilter name string or FALSE on failure
+ * @since 0.5.4
+ */
+function libvirt_nwfilter_get_name($res): string|false {}
+
+/**
+ * Function is used to get nwfilter's UUID in binary format
+ * @param resource $res libvirt nwfilter resource
+ * @return string|false nwfilter UUID in binary format or FALSE on failure
+ * @since 0.5.3
+ */
+function libvirt_nwfilter_get_uuid($res): string|false {}
+
+/**
+ * Function is used to get nwfilter's UUID in string format
+ * @param resource $res libvirt nwfilter resource
+ * @return string|false nwfilter UUID string or FALSE on failure
+ * @since 0.5.4
+ */
+function libvirt_nwfilter_get_uuid_string($res): string|false {}
+
+/**
+ * Function is used to lookup for nwfilter identified by UUID string
+ * @param resource $res libvirt nwfilter resource
+ * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
+ * @return string nwfilter XML string or result of xPath expression
+ * @since 0.5.4
+ */
+function libvirt_nwfilter_get_xml_desc($res, ?string $xpath): string {}
+
+/**
+ * This functions is used to lookup for the nwfilter by it's name
+ * @param resource $conn libvirt connection resource
+ * @param string $name name of the nwfilter to get the resource
+ * @return resource|false libvirt nwfilter resource
+ * @since 0.5.4
+ */
+function libvirt_nwfilter_lookup_by_name($conn, string $name) {}
+
+/**
+ * Function is used to lookup for nwfilter identified by UUID string
+ * @param resource $conn libvirt connection resource
+ * @param string $uuid UUID string to look for nwfilter
+ * @return resource|false libvirt nwfilter resource
+ * @since 0.5.4
+ */
+function libvirt_nwfilter_lookup_by_uuid_string($conn, string $uuid) {}
+
+/**
+ * Function is used to undefine already defined nwfilter
+ * @param resource $res libvirt nwfilter resource
+ * @return bool true on success, false on error
+ * @since 0.5.4
+ */
+function libvirt_nwfilter_undefine($res): bool {}
+
+/* Libvirt functions */
+
+/**
+ * Function is used to check major, minor and micro (also sometimes called release) versions of libvirt-php
+ * or libvirt itself. This could useful when you want your application to support only versions of libvirt
+ * or libvirt-php higher than some version specified
+ * @param int $major major version number to check for
+ * @param int $minor minor version number to check for
+ * @param int $micro micro (also release) version number to check for
+ * @param int $type type of checking, VIR_VERSION_BINDING to check against libvirt-php binding or
+ * VIR_VERSION_LIBVIRT to check against libvirt version
+ * @return bool TRUE if version is equal or higher than required, FALSE if not,
+ * FALSE with error [for libvirt_get_last_error()] on unsupported version type check
+ * @since 0.4.1(-1)
+ */
+function libvirt_check_version(int $major, int $minor, int $micro, int $type): bool {}
+
+/**
+ * Function to get the ISO images on path and return them in the array
+ * @param string $path string of path where to look for the ISO images
+ * @return array|false ISO image array on success, FALSE otherwise
+ */
+function libvirt_get_iso_images(string $path): array|false {}
+
+/**
+ * This function is used to get the last error coming either from libvirt or the PHP extension itself
+ * @return string last error string
+ */
+function libvirt_get_last_error(): string {}
+
+/**
+ * This function is used to get the last error code coming either from libvirt or the PHP extension itself
+ * @since 999 https://github.com/yzslab/php-libvirt-client
+ * @return int last error code
+ */
+function libvirt_get_last_error_code(): int {}
+
+/**
+ * This function is used to get the what part of the library raised the last error
+ * @since 999 https://github.com/yzslab/php-libvirt-client
+ * @return int last error domain
+ */
+function libvirt_get_last_error_domain(): int {}
+
+/**
+ * Function to check for feature existence for working libvirt instance
+ * @param string $name feature name
+ * @return bool TRUE if feature is supported, FALSE otherwise
+ * @since 0.4.1(-3)
+ */
+function libvirt_has_feature(string $name): bool {}
+
+/**
+ * Function is used to create the image of desired name, size and format.
+ * The image will be created in the image path (libvirt.image_path INI variable). Works only o
+ * @param resource $conn libvirt connection resource
+ * @param string $name name of the image file that will be created in the libvirt.image_path directory
+ * @param int $size size of the image in MiBs
+ * @param string $format format of the image, may be raw, qcow or qcow2
+ * @return string|false hostname of the host node or FALSE for error
+ * @since 0.4.2
+ */
+function libvirt_image_create($conn, string $name, int $size, string $format): string|false {}
+
+/**
+ * Function is used to create the image of desired name, size and format.
+ * The image will be created in the image path (libvirt.image_path INI variable). Works only on local systems!
+ * @param resource $conn libvirt connection resource
+ * @param string $image name of the image file that should be deleted
+ * @return string|false hostname of the host node or FALSE for error
+ * @since 0.4.2
+ */
+function libvirt_image_remove($conn, string $image): string|false {}
+
+/**
+ * Function to set the log file for the libvirt module instance
+ * @param string|null $filename log filename or NULL to disable logging
+ * @param int $maxsize [optional] maximum log file size argument in KiB, default value can be found in PHPInfo() output
+ * @return bool TRUE if log file has been successfully set, FALSE otherwise
+ * @since 0.4.2
+ */
+function libvirt_logfile_set(?string $filename, int $maxsize): bool {}
+
+/**
+ * Function to print the binding resources, although the resource information are printed,
+ * they are returned in the return_value
+ * @return resource bindings resource information
+ * @since 0.4.2
+ */
+function libvirt_print_binding_resources() {}
+
+/**
+ * Function is used to get libvirt, driver and libvirt-php version numbers. Can be used for information purposes,
+ * for version checking please use libvirt_check_version() defined below
+ * @param string $type [optional] type string to identify driver to look at
+ * @return array libvirt, type (driver) and connector (libvirt-php) version numbers array
+ * @since 0.4.1(-1)
+ */
+function libvirt_version(string $type): array {}
+
+/* Snapshot functions */
+
+/**
+ * Function is used to get the information whether domain has the current snapshot
+ * @param resource $res libvirt domain resource
+ * @param int $flags [optional] extra flags; not used yet so callers should always pass 0
+ * @return bool TRUE is domain has the current snapshot, otherwise FALSE (you may need to check
+ * for error using libvirt_get_last_error())
+ * @since 0.4.1(-2)
+ */
+function libvirt_domain_has_current_snapshot($res, int $flags = 0): bool {}
+
+/**
+ * This function creates the domain snapshot for the domain identified by it's resource
+ * @param resource $res libvirt domain resource
+ * @param int $flags [optional] libvirt snapshot flags
+ * @return resource domain snapshot resource
+ * @since 0.4.1(-2)
+ */
+function libvirt_domain_snapshot_create($res, int $flags = 0) {}
+
+/**
+ * Function is used to lookup the current snapshot for given domain
+ * @param resource $res libvirt domain resource
+ * @param int $flags [optional] libvirt snapshot flags
+ * @return resource domain snapshot resource
+ * @since 0.5.6
+ */
+function libvirt_domain_snapshot_current($res, int $flags = 0) {}
+
+/**
+ * Function is used to revert the domain state to the state identified by the snapshot
+ * @param resource $res libvirt domain resource
+ * @param int $flags [optional] 0 to delete just snapshot,
+ * VIR_SNAPSHOT_DELETE_CHILDREN to delete snapshot children as well
+ * @return bool TRUE on success, FALSE on error
+ * @since 0.4.1(-2)
+ */
+function libvirt_domain_snapshot_delete($res, int $flags = 0): bool {}
+
+/**
+ * Function is used to get the XML description of the snapshot identified by it's resource
+ * @param resource $res libvirt snapshot resource
+ * @param int $flags [optional] libvirt snapshot flags
+ * @return string XML description string for the snapshot
+ * @since 0.4.1(-2)
+ */
+function libvirt_domain_snapshot_get_xml($res, int $flags = 0): string {}
+
+/**
+ * This functions is used to lookup for the snapshot by it's name
+ * @param resource $res libvirt domain resource
+ * @param string $name name of the snapshot to get the resource
+ * @param int $flags [optional] libvirt snapshot flags
+ * @return resource domain snapshot resource
+ * @since 0.4.1(-2)
+ */
+function libvirt_domain_snapshot_lookup_by_name($res, string $name, int $flags = 0) {}
+
+/**
+ * Function is used to revert the domain state to the state identified by the snapshot
+ * @param resource $res libvirt snapshot resource
+ * @param int $flags [optional] libvirt snapshot flags
+ * @return bool TRUE on success, FALSE on error
+ * @since 0.4.1(-2)
+ */
+function libvirt_domain_snapshot_revert($res, int $flags = 0): bool {}
+
+/**
+ * Function is used to list domain snapshots for the domain specified by it's resource
+ * @param resource $res libvirt domain resource
+ * @param int $flags [optional] libvirt snapshot flags
+ * @return array libvirt domain snapshot names array
+ * @since 0.4.1(-2)
+ */
+function libvirt_list_domain_snapshots($res, int $flags = 0): array {}
+
+/* Storage functions */
+
+/**
+ * Function is used to list active storage pools on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt storagepool names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_active_storagepools($res): array {}
+
+/**
+ * Function is used to list inactive storage pools on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt storagepool names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_inactive_storagepools($res): array {}
+
+/**
+ * Function is used to list storage pools on the connection
+ * @param resource $res libvirt connection resource
+ * @return array libvirt storagepool names array for the connection
+ * @since 0.4.1(-1)
+ */
+function libvirt_list_storagepools($res): array {}
+
+/**
+ * Function is used to Build the underlying storage pool, e.g. create the destination directory for NFS
+ * @param resource $res libvirt storagepool resource
+ * @return bool TRUE if success, FALSE on error
+ * @since 0.4.2
+ */
+function libvirt_storagepool_build($res): bool {}
+
+/**
+ * Function is used to create/start the storage pool
+ * @param resource $res libvirt storagepool resource
+ * @return bool TRUE if success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_create($res): bool {}
+
+/**
+ * Function is used to define the storage pool from XML string and return it's resource
+ * @param resource $res libvirt connection resource
+ * @param string $xml XML string definition of storagepool
+ * @param int $flags [optional] flags to define XML
+ * @return resource libvirt storagepool resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_define_xml($res, string $xml, int $flags = 0) {}
+
+/**
+ * Function is used to Delete the underlying storage pool, e.g. remove the destination directory for NFS
+ * @param resource $res libvirt storagepool resource
+ * @return bool TRUE if success, FALSE on error
+ * @since 0.4.6
+ */
+function libvirt_storagepool_delete($res): bool {}
+
+/**
+ * Function is used to destroy the storage pool
+ * @param resource $res libvirt storagepool resource
+ * @return bool TRUE if success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_destroy($res): bool {}
+
+/**
+ * Function is used to get autostart of the storage pool
+ * @param resource $res libvirt storagepool resource
+ * @return bool TRUE for autostart enabled, FALSE for autostart disabled, FALSE with last_error set for error
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_get_autostart($res): bool {}
+
+/**
+ * Function is used to get information about the storage pool
+ * @param resource $res libvirt storagepool resource
+ * @return array storage pool information array of state, capacity, allocation and available space
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_get_info($res): array {}
+
+/**
+ * Function is used to get storage pool name from the storage pool resource
+ * @param resource $res libvirt storagepool resource
+ * @return string storagepool name string
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_get_name($res): string {}
+
+/**
+ * Function is used to get storage pool by UUID string
+ * @param resource $res libvirt storagepool resource
+ * @return string storagepool UUID string
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_get_uuid_string($res): string {}
+
+/**
+ * Function is used to get storage volume count in the storage pool
+ * @param resource $res libvirt storagepool resource
+ * @return int number of volumes in the pool
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_get_volume_count($res): int {}
+
+/**
+ * Function is used to get the XML description for the storage pool identified by res
+ * @param resource $res libvirt storagepool resource
+ * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
+ * @return string storagepool XML description string or result of xPath expression
+ * @since 0.4.2
+ */
+function libvirt_storagepool_get_xml_desc($res, ?string $xpath): string {}
+
+/**
+ * Function is used to get information whether storage pool is active or not
+ * @param resource $res libvirt storagepool resource
+ * @return bool result of virStoragePoolIsActive
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_is_active($res): bool {}
+
+/**
+ * Function is used to list volumes in the specified storage pool
+ * @param resource $res libvirt storagepool resource
+ * @return array list of storage volume names in the storage pool in an array using default keys (indexes)
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_list_volumes($res): array {}
+
+/**
+ * Function is used to lookup for storage pool by it's name
+ * @param resource $res volume resource of storage pool
+ * @param string $name storage pool name
+ * @return resource libvirt storagepool resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_lookup_by_name($res, string $name) {}
+
+/**
+ * Function is used to lookup for storage pool identified by UUID string
+ * @param resource $res libvirt connection resource
+ * @param string $uuid UUID string to look for storagepool
+ * @return resource libvirt storagepool resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_lookup_by_uuid_string($res, string $uuid) {}
+
+/**
+ * Function is used to lookup for storage pool by a volume
+ * @param resource $res volume resource of storage pool
+ * @return resource libvirt storagepool resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_lookup_by_volume($res) {}
+
+/**
+ * Function is used to refresh the storage pool information
+ * @param resource $res libvirt storagepool resource
+ * @param int $flags [optional] refresh flags
+ * @return bool TRUE if success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_refresh($res, int $flags = 0): bool {}
+
+/**
+ * Function is used to set autostart of the storage pool
+ * @param resource $res libvirt storagepool resource
+ * @param bool $flags flags to set autostart
+ * @return bool result on setting storagepool autostart value
+ */
+function libvirt_storagepool_set_autostart($res, bool $flags): bool {}
+
+/**
+ * Function is used to undefine the storage pool identified by it's resource
+ * @param resource $res libvirt storagepool resource
+ * @return bool TRUE if success, FALSE on error
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagepool_undefine($res): bool {}
+
+/**
+ * Function is used to create the new storage pool and return the handle to new storage pool
+ * @param resource $res libvirt storagepool resource
+ * @param string $xml XML string to create the storage volume in the storage pool
+ * @param int $flags [optional] virStorageVolCreateXML flags
+ * @return resource libvirt storagevolume resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagevolume_create_xml($res, string $xml, int $flags = 0) {}
+
+/**
+ * Function is used to clone the new storage volume into pool from the original volume
+ * @param resource $pool libvirt storagepool resource
+ * @param string $xml XML string to create the storage volume in the storage pool
+ * @param resource $original_volume libvirt storagevolume resource
+ * @return resource libvirt storagevolume resource
+ * @since 0.4.1(-2)
+ */
+function libvirt_storagevolume_create_xml_from($pool, string $xml, $original_volume) {}
+
+/**
+ * Function is used to delete to volume identified by it's resource
+ * @param resource $res libvirt storagevolume resource
+ * @param int $flags [optional] flags for the storage volume deletion for virStorageVolDelete()
+ * @return bool TRUE for success, FALSE on error
+ * @since 0.4.2
+ */
+function libvirt_storagevolume_delete($res, int $flags = 0): bool {}
+
+/**
+ * Function is used to download volume identified by it's resource
+ * @param resource $res libvirt storagevolume resource
+ * @param resource $stream stream to use as output
+ * @param int $offset [optional] position to start reading from
+ * @param int $length [optional] limit on amount of data to download
+ * @param int $flags [optional] flags for the storage volume download for virStorageVolDownload()
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_storagevolume_download($res, $stream, int $offset = 0, int $length = 0, int $flags = 0): int {}
+
+/**
+ * Function is used to get the storage volume information
+ * @param resource $res libvirt storagevolume resource
+ * @return array storage volume information array of type, allocation and capacity
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagevolume_get_info($res): array {}
+
+/**
+ * Function is used to get the storage volume name
+ * @param resource $res libvirt storagevolume resource
+ * @return string storagevolume name
+ * @since 0.4.1(-2)
+ */
+function libvirt_storagevolume_get_name($res): string {}
+
+/**
+ * Function is used to get the storage volume path
+ * @param resource $res libvirt storagevolume resource
+ * @return string storagevolume path
+ * @since 0.4.1(-2)
+ */
+function libvirt_storagevolume_get_path($res): string {}
+
+/**
+ * Function is used to get the storage volume XML description
+ * @param resource $res libvirt storagevolume resource
+ * @param string|null $xpath [optional] xPath expression string to get just this entry, can be NULL
+ * @param int $flags [optional] flags
+ * @return string storagevolume XML description or result of xPath expression
+ * @since 0.4.2
+ */
+function libvirt_storagevolume_get_xml_desc($res, ?string $xpath, int $flags = 0): string {}
+
+/**
+ * Function is used to lookup for storage volume by it's name
+ * @param resource $res libvirt storagepool resource
+ * @param string $name name of the storage volume to look for
+ * @return resource libvirt storagevolume resource
+ * @since 0.4.1(-1)
+ */
+function libvirt_storagevolume_lookup_by_name($res, string $name) {}
+
+/**
+ * Function is used to lookup for storage volume by it's path
+ * @param resource $res libvirt connection resource
+ * @param string $path path of the storage volume to look for
+ * @return resource libvirt storagevolume resource
+ * @since 0.4.1(-2)
+ */
+function libvirt_storagevolume_lookup_by_path($res, string $path) {}
+
+/**
+ * Function is used to resize volume identified by it's resource
+ * @param resource $res libvirt storagevolume resource
+ * @param int $capacity capacity for the storage volume
+ * @param int $flags [optional] flags for the storage volume resize for virStorageVolResize()
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_storagevolume_resize($res, int $capacity, int $flags = 0): int {}
+
+/**
+ * Function is used to upload volume identified by it's resource
+ * @param resource $res libvirt storagevolume resource
+ * @param resource $stream stream to use as input
+ * @param int $offset [optional] position to start writing to
+ * @param int $length [optional] limit on amount of data to upload
+ * @param int $flags [optional] flags for the storage volume upload for virStorageVolUpload()
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_storagevolume_upload($res, $stream, int $offset = 0, int $length = 0, int $flags = 0): int {}
+
+/* Stream functions */
+
+/**
+ * Function is used to abort transfer
+ * @param resource $res libvirt stream resource from libvirt_stream_create()
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_stream_abort($res): int {}
+
+/**
+ * Function is used to close stream
+ * @param resource $res libvirt stream resource from libvirt_stream_create()
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_stream_close($res): int {}
+
+/**
+ * Function is used to create new stream from libvirt conn
+ * @param resource $res libvirt connection resource from libvirt_connect()
+ * @return resource resource libvirt stream resource
+ * @since 0.5.0
+ */
+function libvirt_stream_create($res) {}
+
+/**
+ * Function is used to finish transfer
+ * @param resource $res libvirt stream resource from libvirt_stream_create()
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_stream_finish($res): int {}
+
+/**
+ * Function is used to close stream from libvirt conn
+ * @param resource $res libvirt stream resource from libvirt_stream_create()
+ * @param string $data buffer
+ * @param int $len [optional] amount of data to receive
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_stream_recv($res, string $data, int $len = 0): int {}
+
+/**
+ * Function is used to close stream from libvirt conn
+ * @param resource $res libvirt stream resource from libvirt_stream_create()
+ * @param string $data buffer
+ * @param int $length [optional] amount of data to send
+ * @return int
+ * @since 0.5.0
+ */
+function libvirt_stream_send($res, string $data, int $length = 0): int {}
diff --git a/libxml/libxml.php b/libxml/libxml.php
index 539443860..16b6694d5 100644
--- a/libxml/libxml.php
+++ b/libxml/libxml.php
@@ -1,6 +1,9 @@
- * the severity of the error (one of the following constants:
- * LIBXML_ERR_WARNING
,
- * LIBXML_ERR_ERROR
or
- * LIBXML_ERR_FATAL
)
- *
- * The error's code. - *
- * @var int - */ - public $code; - /** - *- * The column where the error occurred. - *
- *Note: - *
- * This property isn't entirely implemented in libxml and therefore - * 0 is often returned. - *
- * @var int - */ - public $column; - /** - *- * The error message, if any. - *
- * @var string - */ - public $message; - /** - *The filename, or empty if the XML was loaded from a string.
- * @var string - */ - public $file; - /** - *- * The line where the error occurred. - *
- * @var int - */ - public $line; - +class LibXMLError +{ + /** + *
+ * the severity of the error (one of the following constants:
+ * LIBXML_ERR_WARNING
,
+ * LIBXML_ERR_ERROR
or
+ * LIBXML_ERR_FATAL
)
+ *
+ * The error's code. + *
+ * @var int + */ + public int $code; + + /** + *+ * The column where the error occurred. + *
+ *Note: + *
+ * This property isn't entirely implemented in libxml and therefore + * 0 is often returned. + *
+ * @var int + */ + public int $column; + + /** + *+ * The error message, if any. + *
+ * @var string + */ + public string $message; + + /** + *The filename, or empty if the XML was loaded from a string.
+ * @var string + */ + public string $file; + + /** + *+ * The line where the error occurred. + *
+ * @var int + */ + public int $line; } /** * Set the streams context for the next libxml document load or write * @link https://php.net/manual/en/function.libxml-set-streams-context.php - * @param resource $streams_context+ * @param resource $context
* The stream context resource (created with * stream_context_create) *
* @return void No value is returned. - * @since 5.0 */ -function libxml_set_streams_context ($streams_context) {} +function libxml_set_streams_context($context): void {} /** * Disable libxml errors and allow user to fetch error information as needed * @link https://php.net/manual/en/function.libxml-use-internal-errors.php - * @param bool $use_errors [optional]+ * @param bool|null $use_errors
* Enable (TRUE) user error handling or disable (FALSE) user error handling. Disabling will also clear any existing libxml errors. *
* @return bool This function returns the previous value of * use_errors. - * @since 5.1 */ -function libxml_use_internal_errors ($use_errors = false) {} +function libxml_use_internal_errors( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] bool $use_errors = false, + #[PhpStormStubsElementAvailable(from: '8.0')] ?bool $use_errors = null +): bool {} /** * Retrieve last error from libxml * @link https://php.net/manual/en/function.libxml-get-last-error.php - * @return LibXMLError a LibXMLError object if there is any error in the + * @return LibXMLError|false a LibXMLError object if there is any error in the * buffer, FALSE otherwise. - * @since 5.1 */ -function libxml_get_last_error () {} +#[Pure(true)] +function libxml_get_last_error(): LibXMLError|false {} /** * Clear libxml error buffer * @link https://php.net/manual/en/function.libxml-clear-errors.php * @return void No value is returned. - * @since 5.1 */ -function libxml_clear_errors () {} +function libxml_clear_errors(): void {} /** * Retrieve array of errors * @link https://php.net/manual/en/function.libxml-get-errors.php - * @return array an array with LibXMLError objects if there are any + * @return LibXMLError[] an array with LibXMLError objects if there are any * errors in the buffer, or an empty array otherwise. - * @since 5.1 */ -function libxml_get_errors () {} +#[Pure(true)] +function libxml_get_errors(): array {} /** * Disable the ability to load external entities @@ -121,108 +129,119 @@ function libxml_get_errors () {} * @return bool the previous value. * @since 5.2.11 */ -function libxml_disable_entity_loader ($disable = true) {} +#[Deprecated(since: "8.0")] +function libxml_disable_entity_loader(bool $disable = true): bool {} /** * Changes the default external entity loader * @link https://php.net/manual/en/function.libxml-set-external-entity-loader.php - * @param callable $resolver_function+ * @param callable|null $resolver_function
* A callable that takes three arguments. Two strings, a public id * and system id, and a context (an array with four keys) as the third argument. * This callback should return a resource, a string from which a resource can be * opened, or NULL. *
- * @return void No value is returned. + * @return bool * @since 5.4 */ -function libxml_set_external_entity_loader (callable $resolver_function) {} +function libxml_set_external_entity_loader(?callable $resolver_function): bool {} +/** + * Returns the currently installed external entity loader, i.e. the value which was passed to + * libxml_set_external_entity_loader() or null if no loader was installed and the default entity loader will be used. + * This allows libraries to save and restore the loader, controlling entity expansion without interfering with the rest + * of the application. + * + * @return callable|null + * @since 8.2 + */ +function libxml_get_external_entity_loader(): ?callable {} /** * libxml version like 20605 or 20617 * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_VERSION', 20901); +define('LIBXML_VERSION', 20901); /** * libxml version like 2.6.5 or 2.6.17 * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_DOTTED_VERSION', "2.9.1"); -define ('LIBXML_LOADED_VERSION', 20901); +define('LIBXML_DOTTED_VERSION', "2.9.1"); +define('LIBXML_LOADED_VERSION', 20901); /** * Substitute entities * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NOENT', 2); +define('LIBXML_NOENT', 2); /** * Load the external subset * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_DTDLOAD', 4); +define('LIBXML_DTDLOAD', 4); /** * Default DTD attributes * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_DTDATTR', 8); +define('LIBXML_DTDATTR', 8); /** * Validate with the DTD * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_DTDVALID', 16); +define('LIBXML_DTDVALID', 16); /** * Suppress error reports * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NOERROR', 32); +define('LIBXML_NOERROR', 32); /** * Suppress warning reports * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NOWARNING', 64); +define('LIBXML_NOWARNING', 64); /** * Remove blank nodes * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NOBLANKS', 256); +define('LIBXML_NOBLANKS', 256); /** * Implement XInclude substitution * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_XINCLUDE', 1024); +define('LIBXML_XINCLUDE', 1024); /** * Remove redundant namespaces declarations * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NSCLEAN', 8192); +define('LIBXML_NSCLEAN', 8192); /** * Merge CDATA as text nodes * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NOCDATA', 16384); +define('LIBXML_NOCDATA', 16384); /** * Disable network access when loading documents * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NONET', 2048); +define('LIBXML_NONET', 2048); /** * Sets XML_PARSE_PEDANTIC flag, which enables pedentic error reporting. * @link https://php.net/manual/en/libxml.constants.php * @since 5.4 */ -define ('LIBXML_PEDANTIC', 128); +define('LIBXML_PEDANTIC', 128); /** * Activate small nodes allocation optimization. This may speed up your @@ -232,7 +251,7 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_COMPACT', 65536); +define('LIBXML_COMPACT', 65536); /** * Allows line numbers greater than 65535 to be reported correctly. @@ -241,8 +260,7 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_BIGLINES', 65535); - +define('LIBXML_BIGLINES', 65535); /** * Drop the XML declaration when saving a document @@ -251,7 +269,7 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NOXMLDECL', 2); +define('LIBXML_NOXMLDECL', 2); /** * Sets XML_PARSE_HUGE flag, which relaxes any hardcoded limit from the parser. This affects @@ -262,7 +280,7 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_PARSEHUGE', 524288); +define('LIBXML_PARSEHUGE', 524288); /** * Expand empty tags (e.g. <br/> to @@ -274,7 +292,7 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_NOEMPTYTAG', 4); +define('LIBXML_NOEMPTYTAG', 4); /** * Create default/fixed value nodes during XSD schema validation @@ -283,7 +301,7 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_SCHEMA_CREATE', 1); +define('LIBXML_SCHEMA_CREATE', 1); /** * Sets HTML_PARSE_NOIMPLIED flag, which turns off the @@ -293,7 +311,7 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_HTML_NOIMPLIED', 8192); +define('LIBXML_HTML_NOIMPLIED', 8192); /** * Sets HTML_PARSE_NODEFDTD flag, which prevents a default doctype @@ -303,30 +321,30 @@ function libxml_set_external_entity_loader (callable $resolver_function) {} * * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_HTML_NODEFDTD', 4); +define('LIBXML_HTML_NODEFDTD', 4); /** * No errors * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_ERR_NONE', 0); +define('LIBXML_ERR_NONE', 0); /** * A simple warning * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_ERR_WARNING', 1); +define('LIBXML_ERR_WARNING', 1); /** * A recoverable error * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_ERR_ERROR', 2); +define('LIBXML_ERR_ERROR', 2); /** * A fatal error * @link https://php.net/manual/en/libxml.constants.php */ -define ('LIBXML_ERR_FATAL', 3); +define('LIBXML_ERR_FATAL', 3); // End of libxml v. diff --git a/lua/lua.php b/lua/lua.php index d75480778..f6bbb377e 100644 --- a/lua/lua.php +++ b/lua/lua.php @@ -6,74 +6,74 @@ /** * @link https://secure.php.net/manual/en/class.lua.php */ -class Lua { +class Lua +{ /** * @var string - * + * * @link https://secure.php.net/manual/en/class.lua.php#lua.constants.lua-version */ - const LUA_VERSION = '5.1.4'; + public const LUA_VERSION = '5.1.4'; /** + * @param null|string $lua_script_file * @link https://secure.php.net/manual/en/lua.construct.php */ public function __construct(?string $lua_script_file = null) {} /** * @link https://secure.php.net/manual/en/lua.assign.php - * + * * @param string $name * @param mixed $value * * @return $this|null Returns $this or NULL on failure. */ public function assign(string $name, $value) {} - + /** * @link https://secure.php.net/manual/en/lua.call.php - * + * * @param callable $lua_func Function name in lua * @param array $args Arguments passed to the Lua function * @param bool $use_self Whether to use self - * - * @return mixed Returns result of the called function, null for wrong arguments or FALSE on other failure. + * + * @return mixed|false Returns result of the called function, null for wrong arguments or FALSE on other failure. */ public function call(callable $lua_func, array $args = [], bool $use_self = false) {} - + /** * @link https://secure.php.net/manual/en/lua.eval.php - * - * @param string $statements - * - * @return mixed Returns result of evaled code, NULL for wrong arguments or FALSE on other failure. + * + * @param string $statements + * + * @return mixed|false Returns result of evaled code, NULL for wrong arguments or FALSE on other failure. */ public function eval(string $statements) {} /** * @link https://secure.php.net/manual/en/lua.include.php - * + * * @param string $file - * - * @return mixed Returns result of included code, NULL for wrong arguments or FALSE on other failure. + * + * @return mixed|false Returns result of included code, NULL for wrong arguments or FALSE on other failure. */ public function include(string $file) {} /** * @link https://secure.php.net/manual/en/lua.getversion.php - * + * * @return string Returns Lua::LUA_VERSION */ public function getVersion(): string {} /** * @link https://secure.php.net/manual/en/lua.registercallback.php - * + * * @param string $name * @param callable $function A valid PHP function callback - * + * * @return $this|null|false Returns $this, NULL for wrong arguments or FALSE on other failure. */ public function registerCallback(string $name, callable $function) {} } - -?> \ No newline at end of file diff --git a/lzf/lzf.php b/lzf/lzf.php new file mode 100644 index 000000000..566960a5b --- /dev/null +++ b/lzf/lzf.php @@ -0,0 +1,38 @@ += 0.9.0) + * (PECL mailparse >= 0.9.0)
@@ -12,18 +12,18 @@
* @return string Returns one of the character encodings supported by the
* {@link https://php.net/manual/en/ref.mbstring.php mbstring} module.
*/
-function mailparse_determine_best_xfer_encoding ($fp) {}
+function mailparse_determine_best_xfer_encoding($fp) {}
/**
- * (PECL mailparse >= 0.9.0)
+ * (PECL mailparse >= 0.9.0)
* Create a MIME mail resource.
* @link https://php.net/manual/en/function.mailparse-msg-create.php
* @return resource Returns a handle that can be used to parse a message.
*/
-function mailparse_msg_create () {}
+function mailparse_msg_create() {}
/**
- * (PECL mailparse >= 0.9.0)
+ * (PECL mailparse >= 0.9.0)
* Extracts/decodes a message section from the supplied filename.
* The contents of the section will be decoded according to their transfer encoding - base64, quoted-printable and
* uuencoded text are supported.
@@ -41,7 +41,7 @@ function mailparse_msg_create () {}
*
* If not specified, the contents will be sent to "stdout". *
- * @return string+ * @return string|bool
* If callbackfunc is not NULL returns TRUE on success. *
*@@ -51,10 +51,10 @@ function mailparse_msg_create () {} * Returns FALSE on error. *
*/ -function mailparse_msg_extract_part_file ($mimemail, $filename, $callbackfunc) {} +function mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc) {} /** - * (PECL mailparse >= 0.9.0) + * (PECL mailparse >= 0.9.0)
@@ -64,10 +64,10 @@ function mailparse_msg_extract_part_file ($mimemail, $filename, $callbackfunc) {
* @param callable $callbackfunc [optional]
* @return void
*/
-function mailparse_msg_extract_part ($mimemail, $msgbody, $callbackfunc) {}
+function mailparse_msg_extract_part($mimemail, $msgbody, $callbackfunc) {}
/**
- * (PECL mailparse >= 0.9.0)
+ * (PECL mailparse >= 0.9.0)
* Extracts a message section including headers without decoding the transfer encoding
* @link https://php.net/manual/en/function.mailparse-msg-extract-whole-part-file.php
* @param resource $mimemail
@@ -77,10 +77,10 @@ function mailparse_msg_extract_part ($mimemail, $msgbody, $callbackfunc) {}
* @param callable $callbackfunc [optional]
* @return string
*/
-function mailparse_msg_extract_whole_part_file ($mimemail, $filename, $callbackfunc) {}
+function mailparse_msg_extract_whole_part_file($mimemail, $filename, $callbackfunc) {}
/**
- * (PECL mailparse >= 0.9.0)
+ * (PECL mailparse >= 0.9.0)
* Frees a MIME resource.
* @link https://php.net/manual/en/function.mailparse-msg-free.php
* @param resource $mimemail
@@ -90,10 +90,10 @@ function mailparse_msg_extract_whole_part_file ($mimemail, $filename, $callbackf *
* @return bool Returns TRUE on success or FALSE on failure. */ -function mailparse_msg_free ($mimemail) {} +function mailparse_msg_free($mimemail) {} /** - * (PECL mailparse >= 0.9.0) + * (PECL mailparse >= 0.9.0)@@ -101,22 +101,22 @@ function mailparse_msg_free ($mimemail) {} *
* @return array */ -function mailparse_msg_get_part_data ($mimemail) {} +function mailparse_msg_get_part_data($mimemail) {} /** - * (PECL mailparse >= 0.9.0) + * (PECL mailparse >= 0.9.0)* A valid MIME resource. *
* @param string $mimesection - * @return resource + * @return resource|false */ -function mailparse_msg_get_part ($mimemail, $mimesection) {} +function mailparse_msg_get_part($mimemail, $mimesection) {} /** - * (PECL mailparse >= 0.9.0) + * (PECL mailparse >= 0.9.0)@@ -124,21 +124,21 @@ function mailparse_msg_get_part ($mimemail, $mimesection) {} *
* @return array */ -function mailparse_msg_get_structure ($mimemail) {} +function mailparse_msg_get_structure($mimemail) {} /** - * (PECL mailparse >= 0.9.0) + * (PECL mailparse >= 0.9.0)* Path to the file holding the message. The file is opened and streamed through the parser. *
- * @return resource|false Returns a MIME resource representing the structure, or
- * A string containing addresses, like in: Wez Furlong Wez Furlong
* Note: This string must not include the header name.
*
@@ -176,10 +176,10 @@ function mailparse_msg_parse ($mimemail, $data) {} * *
@@ -193,10 +193,10 @@ function mailparse_rfc822_parse_addresses ($addresses) {} *
* @return bool Returns TRUE on success or FALSE on failure. */ -function mailparse_stream_encode ($sourcefp, $destfp, $encoding) {} +function mailparse_stream_encode($sourcefp, $destfp, $encoding) {} /** - * (PECL mailparse >= 0.9.0) + * (PECL mailparse >= 0.9.0)@@ -219,11 +219,10 @@ function mailparse_stream_encode ($sourcefp, $destfp, $encoding) {} * The first filename entry is the message body. The next entries are the decoded uuencoded files. *
*/ -function mailparse_uudecode_all ($fp) {} +function mailparse_uudecode_all($fp) {} -define ('MAILPARSE_EXTRACT_OUTPUT', 0); -define ('MAILPARSE_EXTRACT_STREAM', 1); -define ('MAILPARSE_EXTRACT_RETURN', 2); +define('MAILPARSE_EXTRACT_OUTPUT', 0); +define('MAILPARSE_EXTRACT_STREAM', 1); +define('MAILPARSE_EXTRACT_RETURN', 2); // End of mailparse v. -?> diff --git a/mapscript/mapscript.php b/mapscript/mapscript.php index c525dc92c..3d4ee569a 100644 --- a/mapscript/mapscript.php +++ b/mapscript/mapscript.php @@ -278,7 +278,7 @@ final class classObj public $label; /** - * @var double + * @var float */ public $maxscaledenom; @@ -288,7 +288,7 @@ final class classObj public $metadata; /** - * @var double + * @var float */ public $minscaledenom; @@ -505,7 +505,7 @@ final public function removeMetaData($name) {} * @param $new_value * @return int */ - final public function set($property_name, $new_value) {} + final public function set($property_name, $new_value) {} /** * Set the :ref:`expression+ * @param string $string
* The string being converted. *
* @param int $mode- * The mode of the conversion. It can be one of - * MB_CASE_UPPER, - * MB_CASE_LOWER, or + * The mode of the conversion. It can be one of + * MB_CASE_UPPER, + * MB_CASE_LOWER, or * MB_CASE_TITLE. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return string A case folded version of string converted in the * way specified by mode. - * @since 4.3 - * @since 5.0 */ -function mb_convert_case ($str, $mode, $encoding = null) {} +#[Pure] +function mb_convert_case(string $string, int $mode, ?string $encoding): string {} /** * Make a string uppercase * @link https://php.net/manual/en/function.mb-strtoupper.php - * @param string $str+ * @param string $string
* The string being uppercased. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return string str with all alphabetic characters converted to uppercase. - * @since 4.3 - * @since 5.0 */ -function mb_strtoupper ($str, $encoding = null) {} +#[Pure] +function mb_strtoupper(string $string, ?string $encoding): string {} /** * Make a string lowercase * @link https://php.net/manual/en/function.mb-strtolower.php - * @param string $str+ * @param string $string
* The string being lowercased. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return string str with all alphabetic characters converted to lowercase. - * @since 4.3 - * @since 5.0 */ -function mb_strtolower ($str, $encoding = null) {} +#[Pure] +function mb_strtolower(string $string, ?string $encoding): string {} /** * Set/Get current language * @link https://php.net/manual/en/function.mb-language.php - * @param string $language [optional]+ * @param string|null $language [optional]
* Used for encoding * e-mail messages. Valid languages are "Japanese", * "ja","English","en" and "uni" * (UTF-8). mb_send_mail uses this setting to * encode e-mail. *
- *+ *
* Language and its setting is ISO-2022-JP/Base64 for * Japanese, UTF-8/Base64 for uni, ISO-8859-1/quoted printable for * English. *
* @return bool|string If language is set and * language is valid, it returns - * true. Otherwise, it returns false. + * true. Otherwise, it returns false. * When language is omitted, it returns the language * name as a string. If no language is set previously, it then returns * false. - * @since 4.0.6 - * @since 5.0 */ -function mb_language ($language = null) {} +function mb_language(?string $language): string|bool {} /** * Set/Get internal character encoding * @link https://php.net/manual/en/function.mb-internal-encoding.php - * @param string $encoding [optional]- * encoding is the character encoding name - * used for the HTTP input character encoding conversion, HTTP output - * character encoding conversion, and the default character encoding + * @param string|null $encoding [optional]
+ * encoding is the character encoding name + * used for the HTTP input character encoding conversion, HTTP output + * character encoding conversion, and the default character encoding * for string functions defined by the mbstring module. *
* @return bool|string If encoding is set, then * true on success or false on failure. - * If encoding is omitted, then + * If encoding is omitted, then * the current character encoding name is returned. - * @since 4.0.6 - * @since 5.0 */ -function mb_internal_encoding ($encoding = null) {} +function mb_internal_encoding(?string $encoding): string|bool {} /** * Detect HTTP input character encoding * @link https://php.net/manual/en/function.mb-http-input.php - * @param string $type [optional]- * Input string specifies the input type. + * @param string|null $type [optional]
+ * Input string specifies the input type. * "G" for GET, "P" for POST, "C" for COOKIE, "S" for string, "L" for list, and - * "I" for the whole list (will return array). - * If type is omitted, it returns the last input type processed. + * "I" for the whole list (will return array). + * If type is omitted, it returns the last input type processed. *
- * @return false|string The character encoding name, as per the type. + * @return array|false|string The character encoding name, as per the type. * If mb_http_input does not process specified * HTTP input, it returns false. - * @since 4.0.6 - * @since 5.0 */ -function mb_http_input ($type = null) {} +#[Pure] +function mb_http_input(?string $type): array|string|false {} /** * Set/Get HTTP output character encoding * @link https://php.net/manual/en/function.mb-http-output.php - * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* If encoding is set, * mb_http_output sets the HTTP output character * encoding to encoding. @@ -124,18 +122,16 @@ function mb_http_input ($type = null) {} *
* @return bool|string If encoding is omitted, * mb_http_output returns the current HTTP output - * character encoding. Otherwise, + * character encoding. Otherwise, * true on success or false on failure. - * @since 4.0.6 - * @since 5.0 */ -function mb_http_output ($encoding = null) {} +function mb_http_output(?string $encoding): string|bool {} /** * Set/Get character encoding detection order * @link https://php.net/manual/en/function.mb-detect-order.php - * @param mixed $encoding_list [optional]- * encoding_list is an array or + * @param array|string|null $encoding [optional]
+ * encoding_list is an array or * comma separated list of character encoding. ("auto" is expanded to * "ASCII, JIS, UTF-8, EUC-JP, SJIS") *
@@ -156,7 +152,7 @@ function mb_http_output ($encoding = null) {} * ASCII, * EUC-JP,SJIS, * eucJP-win, SJIS-win, - * JIS, ISO-2022-JP + * JIS, ISO-2022-JP ** For ISO-8859-*, mbstring * always detects as ISO-8859-*. @@ -173,58 +169,68 @@ function mb_http_output ($encoding = null) {} * true is returned on success or FALSE on failure. * When getting the encoding detection order, an ordered array * of the encodings is returned. - * @since 4.0.6 - * @since 5.0 */ -function mb_detect_order ($encoding_list = null) {} +#[LanguageLevelTypeAware(['8.2' => 'array|true'], default: 'array|bool')] +function mb_detect_order(array|string|null $encoding = null): array|bool {} /** * Set/Get substitution character * @link https://php.net/manual/en/function.mb-substitute-character.php - * @param int|string $substrchar [optional]
+ * @param string|int|null $substitute_character [optional]
* Specify the Unicode value as an integer, - * or as one of the following strings:
+ * @param string $string
* The URL encoded data. *
- * @param array $result [optional]+ * @param array &$result [optional]
* An array containing decoded and character encoded converted values. *
* @return bool true on success or false on failure. - * @since 4.0.6 - * @since 5.0 */ -function mb_parse_str ($encoded_string, array &$result = null) {} +#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] +function mb_parse_str(string $string, &$result): bool {} + +/** + * Parse GET/POST/COOKIE data and set global variable + * @link https://php.net/manual/en/function.mb-parse-str.php + * @param string $string+ * The URL encoded data. + *
+ * @param array &$result+ * An array containing decoded and character encoded converted values. + *
+ * @return bool true on success or false on failure. + */ +#[PhpStormStubsElementAvailable(from: '8.0')] +function mb_parse_str(string $string, &$result): bool {} /** * Callback function converts character encoding in output buffer * @link https://php.net/manual/en/function.mb-output-handler.php - * @param string $contents+ * @param string $string
* The contents of the output buffer. *
* @param int $status* The status of the output buffer. *
* @return string The converted string. - * @since 4.0.6 - * @since 5.0 */ -function mb_output_handler ($contents, $status) {} +#[Pure] +function mb_output_handler(string $string, int $status): string {} /** * Get MIME charset string @@ -232,28 +238,27 @@ function mb_output_handler ($contents, $status) {} * @param string $encoding* The encoding being checked. *
- * @return string The MIME charset string for character encoding + * @return string|false The MIME charset string for character encoding * encoding. - * @since 4.0.6 - * @since 5.0 */ -function mb_preferred_mime_name ($encoding) {} +#[Pure] +function mb_preferred_mime_name(string $encoding): string|false {} /** * Get string length * @link https://php.net/manual/en/function.mb-strlen.php - * @param string $str+ * @param string $string
* The string being checked for length. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; - * @return int the number of characters in + * @param string|null $encoding [optional] + * @return int|false the number of characters in * string str having character encoding * encoding. A multi-byte character is * counted as 1. - * @since 4.0.6 - * @since 5.0 */ -function mb_strlen ($str, $encoding = null) {} +#[Pure] +#[LanguageLevelTypeAware(['8.0' => 'int'], default: 'int|false')] +function mb_strlen(string $string, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $encoding) {} /** * Find position of first occurrence of string in a string @@ -264,18 +269,17 @@ function mb_strlen ($str, $encoding = null) {} * @param string $needle* The position counted from the beginning of haystack. *
- * @param int $offset [optional]+ * @param int<0,max> $offset [optional]
* The search offset. If it is not specified, 0 is used. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; - * @return int|false the numeric position of + * @param string|null $encoding [optional] + * @return int<0,max>|false the numeric position of * the first occurrence of needle in the * haystack string. If * needle is not found, it returns false. - * @since 4.0.6 - * @since 5.0 */ -function mb_strpos ($haystack, $needle, $offset = 0, $encoding = null) {} +#[Pure] +function mb_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {} /** * Find position of last occurrence of a string in a string @@ -290,15 +294,14 @@ function mb_strpos ($haystack, $needle, $offset = 0, $encoding = null) {} * @param int $offset [optional] May be specified to begin searching an arbitrary number of characters into * the string. Negative values will stop searching at an arbitrary point * prior to the end of the string. - * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return int|false the numeric position of * the last occurrence of needle in the * haystack string. If * needle is not found, it returns false. - * @since 4.0.6 - * @since 5.0 */ -function mb_strrpos ($haystack, $needle, $offset = 0, $encoding = null) {} +#[Pure] +function mb_strrpos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {} /** * Finds position of first occurrence of a string within another, case insensitive @@ -314,16 +317,16 @@ function mb_strrpos ($haystack, $needle, $offset = 0, $encoding = null) {} * The position in haystack * to start searching * - * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* Character encoding name to use. * If it is omitted, internal character encoding is used. *
* @return int|false Return the numeric position of the first occurrence of * needle in the haystack * string, or false if needle is not found. - * @since 5.2 */ -function mb_stripos ($haystack, $needle, $offset = 0, $encoding = null) {} +#[Pure] +function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {} /** * Finds position of last occurrence of a string within another, case insensitive @@ -339,7 +342,7 @@ function mb_stripos ($haystack, $needle, $offset = 0, $encoding = null) {} * The position in haystack * to start searching * - * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* Character encoding name to use. * If it is omitted, internal character encoding is used. *
@@ -347,9 +350,9 @@ function mb_stripos ($haystack, $needle, $offset = 0, $encoding = null) {} * the last occurrence of needle in the * haystack string, or false * if needle is not found. - * @since 5.2 */ -function mb_strripos ($haystack, $needle, $offset = 0, $encoding = null) {} +#[Pure] +function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding): int|false {} /** * Finds first occurrence of a string within another @@ -363,21 +366,21 @@ function mb_strripos ($haystack, $needle, $offset = 0, $encoding = null) {} * * @param bool $before_needle [optional]* Determines which portion of haystack - * this function returns. + * this function returns. * If set to true, it returns all of haystack * from the beginning to the first occurrence of needle. * If set to false, it returns all of haystack * from the first occurrence of needle to the end, *
- * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* Character encoding name to use. * If it is omitted, internal character encoding is used. *
* @return string|false the portion of haystack, * or false if needle is not found. - * @since 5.2 */ -function mb_strstr ($haystack, $needle, $before_needle = false, $encoding = null) {} +#[Pure] +function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {} /** * Finds the last occurrence of a character in a string within another @@ -391,21 +394,21 @@ function mb_strstr ($haystack, $needle, $before_needle = false, $encoding = null * * @param bool $before_needle [optional]* Determines which portion of haystack - * this function returns. + * this function returns. * If set to true, it returns all of haystack * from the beginning to the last occurrence of needle. * If set to false, it returns all of haystack * from the last occurrence of needle to the end, *
- * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* Character encoding name to use. * If it is omitted, internal character encoding is used. *
* @return string|false the portion of haystack. * or false if needle is not found. - * @since 5.2 */ -function mb_strrchr ($haystack, $needle, $before_needle = false, $encoding = null) {} +#[Pure] +function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {} /** * Finds first occurrence of a string within another, case insensitive @@ -425,15 +428,15 @@ function mb_strrchr ($haystack, $needle, $before_needle = false, $encoding = nul * If set to false, it returns all of haystack * from the first occurrence of needle to the end, * - * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* Character encoding name to use. * If it is omitted, internal character encoding is used. *
* @return string|false the portion of haystack, * or false if needle is not found. - * @since 5.2 */ -function mb_stristr ($haystack, $needle, $before_needle = false, $encoding = null) {} +#[Pure] +function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {} /** * Finds the last occurrence of a character in a string within another, case insensitive @@ -447,21 +450,21 @@ function mb_stristr ($haystack, $needle, $before_needle = false, $encoding = nul * * @param bool $before_needle [optional]* Determines which portion of haystack - * this function returns. + * this function returns. * If set to true, it returns all of haystack * from the beginning to the last occurrence of needle. * If set to false, it returns all of haystack * from the last occurrence of needle to the end, *
- * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* Character encoding name to use. * If it is omitted, internal character encoding is used. *
* @return string|false the portion of haystack. * or false if needle is not found. - * @since 5.2 */ -function mb_strrichr ($haystack, $needle, $before_needle = false, $encoding = null) {} +#[Pure] +function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding): string|false {} /** * Count the number of substring occurrences @@ -472,76 +475,72 @@ function mb_strrichr ($haystack, $needle, $before_needle = false, $encoding = nu * @param string $needle* The string being found. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return int The number of times the * needle substring occurs in the * haystack string. - * @since 4.3 - * @since 5.0 */ -function mb_substr_count ($haystack, $needle, $encoding = null) {} +#[Pure] +function mb_substr_count(string $haystack, string $needle, ?string $encoding): int {} /** * Get part of string * @link https://php.net/manual/en/function.mb-substr.php - * @param string $str+ * @param string $string
* The string being checked. *
* @param int $start* The first position used in str. *
- * @param int $length [optional]+ * @param int|null $length [optional]
* The maximum length of the returned string. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return string mb_substr returns the portion of * str specified by the * start and * length parameters. - * @since 4.0.6 - * @since 5.0 */ -function mb_substr ($str, $start, $length = null, $encoding = null) {} +#[Pure] +function mb_substr(string $string, int $start, ?int $length, ?string $encoding): string {} /** * Get part of string * @link https://php.net/manual/en/function.mb-strcut.php - * @param string $str+ * @param string $string
* The string being cut. *
* @param int $start* The position that begins the cut. *
- * @param int $length [optional]+ * @param int|null $length [optional]
* The string being decoded. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return string mb_strcut returns the portion of * str specified by the * start and * length parameters. - * @since 4.0.6 - * @since 5.0 */ -function mb_strcut ($str, $start, $length = null, $encoding = null) {} +#[Pure] +function mb_strcut(string $string, int $start, ?int $length, ?string $encoding): string {} /** * Return width of string * @link https://php.net/manual/en/function.mb-strwidth.php - * @param string $str+ * @param string $string
* The string being decoded. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return int The width of string str. - * @since 4.0.6 - * @since 5.0 */ -function mb_strwidth ($str, $encoding = null) {} +#[Pure] +function mb_strwidth(string $string, ?string $encoding): int {} /** * Get truncated string with specified width * @link https://php.net/manual/en/function.mb-strimwidth.php - * @param string $str+ * @param string $string
* The string being decoded. *
* @param int $start@@ -551,50 +550,48 @@ function mb_strwidth ($str, $encoding = null) {} * @param int $width
* The width of the desired trim. *
- * @param string $trimmarker [optional]- * A string that is added to the end of string + * @param string $trim_marker
+ * A string that is added to the end of string * when string is truncated. *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return string The truncated string. If trimmarker is set, * trimmarker is appended to the return value. - * @since 4.0.6 - * @since 5.0 */ -function mb_strimwidth ($str, $start, $width, $trimmarker = null, $encoding = null) {} +#[Pure] +function mb_strimwidth(string $string, int $start, int $width, string $trim_marker = '', ?string $encoding): string {} /** * Convert character encoding * @link https://php.net/manual/en/function.mb-convert-encoding.php - * @param string|array $str+ * @param string|array $string
* The string being encoded. *
* @param string $to_encoding* The type of encoding that str is being converted to. *
- * @param string|string[] $from_encoding [optional]+ * @param string|string[]|null $from_encoding [optional]
* Is specified by character code names before conversion. It is either * an array, or a comma separated enumerated list. - * If from_encoding is not specified, the internal + * If from_encoding is not specified, the internal * encoding will be used. *
*- * "auto" may be used, which expands to + * "auto" may be used, which expands to * "ASCII,JIS,UTF-8,EUC-JP,SJIS". *
- * @return string The encoded string. - * @since 4.0.6 - * @since 5.0 + * @return array|string|false The encoded string. */ -function mb_convert_encoding ($str, $to_encoding, $from_encoding = null) {} +#[Pure] +function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false {} /** * Detect character encoding * @link https://php.net/manual/en/function.mb-detect-encoding.php - * @param string $str+ * @param string $string
* The string being detected. *
- * @param string|string[] $encoding_list [optional]+ * @param string|string[]|null $encodings [optional]
* encoding_list is list of character * encoding. Encoding order may be specified by array or comma * separated list string. @@ -610,35 +607,35 @@ function mb_convert_encoding ($str, $to_encoding, $from_encoding = null) {} *
* @return string|false The detected character encoding or false if the encoding cannot be * detected from the given string. - * @since 4.0.6 - * @since 5.0 */ -function mb_detect_encoding ($str, $encoding_list = null, $strict = false) {} +#[Pure] +function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false {} /** * Returns an array of all supported encodings * @link https://php.net/manual/en/function.mb-list-encodings.php * @return string[] a numerically indexed array. - * @since 5.0 */ -function mb_list_encodings () {} +#[Pure] +function mb_list_encodings(): array {} /** * Get aliases of a known encoding type * @param string $encoding The encoding type being checked, for aliases. * @return string[]|false a numerically indexed array of encoding aliases on success, or FALSE on failure * @link https://php.net/manual/en/function.mb-encoding-aliases.php - * @since 5.3 */ -function mb_encoding_aliases ($encoding) {} +#[Pure] +#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] +function mb_encoding_aliases(string $encoding) {} /** * Convert "kana" one from another ("zen-kaku", "han-kaku" and more) * @link https://php.net/manual/en/function.mb-convert-kana.php - * @param string $str+ * @param string $string
* The string being converted. *
- * @param string $option [optional]+ * @param string $mode [optional]
* The conversion option. *
*@@ -743,32 +740,31 @@ function mb_encoding_aliases ($encoding) {} * * *
- * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return string The converted string. - * @since 4.0.6 - * @since 5.0 */ -function mb_convert_kana ($str, $option = null, $encoding = null) {} +#[Pure] +function mb_convert_kana(string $string, string $mode = 'KV', ?string $encoding): string {} /** * Encode string for MIME header * @link https://php.net/manual/en/function.mb-encode-mimeheader.php - * @param string $str+ * @param string $string
* The string being encoded. *
- * @param string $charset [optional]+ * @param string|null $charset [optional]
* charset specifies the name of the character set * in which str is represented in. The default value * is determined by the current NLS setting (mbstring.language). * mb_internal_encoding should be set to same encoding. *
- * @param string $transfer_encoding [optional]+ * @param string|null $transfer_encoding [optional]
* transfer_encoding specifies the scheme of MIME * encoding. It should be either "B" (Base64) or * "Q" (Quoted-Printable). Falls back to * "B" if not given. *
- * @param string $linefeed [optional]+ * @param string $newline [optional]
* linefeed specifies the EOL (end-of-line) marker * with which mb_encode_mimeheader performs * line-folding (a RFC term, @@ -776,27 +772,25 @@ function mb_convert_kana ($str, $option = null, $encoding = null) {} * lines. The length is currently hard-coded to 74 characters). * Falls back to "\r\n" (CRLF) if not given. *
- * @param int $indent [optional]+ * @param int $indent
* Indentation of the first line (number of characters in the header * before str). *
* @return string A converted version of the string represented in ASCII. - * @since 4.0.6 - * @since 5.0 */ -function mb_encode_mimeheader ($str, $charset = null, $transfer_encoding = null, $linefeed = null, $indent = null) {} +#[Pure] +function mb_encode_mimeheader(string $string, ?string $charset, ?string $transfer_encoding, string $newline = "\n", int $indent = 0): string {} /** * Decode string in MIME header field * @link https://php.net/manual/en/function.mb-decode-mimeheader.php - * @param string $str+ * @param string $string
* The string being decoded. *
* @return string The decoded string in internal character encoding. - * @since 4.0.6 - * @since 5.0 */ -function mb_decode_mimeheader ($str) {} +#[Pure] +function mb_decode_mimeheader(string $string): string {} /** * Convert character code in variable(s) @@ -807,59 +801,63 @@ function mb_decode_mimeheader ($str) {} * @param string|string[] $from_encoding* from_encoding is specified as an array * or comma separated string, it tries to detect encoding from - * from-coding. When from_encoding + * from-coding. When from_encoding * is omitted, detect_order is used. *
- * @param string|array|object $vars- * vars is the reference to the - * variable being converted. String, Array and Object are accepted. + * @param string|array|object &$var var is the reference to the variable being converted. + * @param string|array|object &...$vars
+ * vars is the other references to the + * variables being converted. String, Array and Object are accepted. * mb_convert_variables assumes all parameters * have the same encoding. *
* @return string|false The character encoding before conversion for success, * or false for failure. - * @since 4.0.6 - * @since 5.0 */ -function mb_convert_variables ($to_encoding, $from_encoding, &...$vars) {} +function mb_convert_variables( + string $to_encoding, + array|string $from_encoding, + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] &$vars, + #[PhpStormStubsElementAvailable(from: '8.0')] mixed &$var, + mixed &...$vars +): string|false {} /** * Encode character to HTML numeric string reference * @link https://php.net/manual/en/function.mb-encode-numericentity.php - * @param string $str+ * @param string $string
* The string being encoded. *
- * @param int[] $convmap+ * @param int[] $map
* convmap is array specifies code area to * convert. *
- * @param string $encoding &mbstring.encoding.parameter; - * @param bool $is_hex [optional] - * @return string|false|null The converted string. - * @since 4.0.6 - * @since 5.0 + * @param null|string $encoding + * @param bool $hex [optional] + * @return string The converted string. */ -function mb_encode_numericentity ($str, array $convmap, $encoding = null, $is_hex = false) {} +#[Pure] +function mb_encode_numericentity(string $string, array $map, ?string $encoding = null, bool $hex = false): string {} /** * Decode HTML numeric string reference to character * @link https://php.net/manual/en/function.mb-decode-numericentity.php - * @param string $str+ * @param string $string
* The string being decoded. *
- * @param int[] $convmap+ * @param int[] $map
* convmap is an array that specifies * the code area to convert. *
- * @param string $encoding &mbstring.encoding.parameter; + * @param null|string $encoding * @param bool $is_hex [optional]* this parameter is not used. *
* @return string|false|null The converted string. - * @since 4.0.6 - * @since 5.0 */ -function mb_decode_numericentity ($str, array $convmap, $encoding = null, $is_hex = false) {} +#[Pure] +#[LanguageLevelTypeAware(['8.0' => 'string'], default: 'string|false|null')] +function mb_decode_numericentity(string $string, array $map, ?string $encoding = null, #[PhpStormStubsElementAvailable(from: '7.2', to: '7.4')] $is_hex = false) {} /** * Send encoded mail @@ -876,23 +874,21 @@ function mb_decode_numericentity ($str, array $convmap, $encoding = null, $is_he * @param string $message* The message of the mail. *
- * @param string|array $additional_headers [optional]+ * @param string|array $additional_headers
* String or array to be inserted at the end of the email header.
* Since 7.2.0 accepts an array. Its keys are the header names and its values are the respective header values.
* This is typically used to add extra
* headers. Multiple extra headers are separated with a
* newline ("\n").
*
+ * @param string|null $additional_params [optional]
* additional_parameter is a MTA command line * parameter. It is useful when setting the correct Return-Path * header when using sendmail. *
* @return bool true on success or false on failure. - * @since 4.0.6 - * @since 5.0 */ -function mb_send_mail ($to, $subject, $message, $additional_headers = null, $additional_parameter = null) {} +function mb_send_mail(string $to, string $subject, string $message, array|string $additional_headers = [], ?string $additional_params): bool {} /** * Get internal settings of mbstring @@ -901,61 +897,71 @@ function mb_send_mail ($to, $subject, $message, $additional_headers = null, $add * If type isn't specified or is specified to * "all", an array having the elements "internal_encoding", * "http_output", "http_input", "func_overload", "mail_charset", - * "mail_header_encoding", "mail_body_encoding" will be returned. + * "mail_header_encoding", "mail_body_encoding" will be returned. * ** If type is specified as "http_output", * "http_input", "internal_encoding", "func_overload", * the specified setting parameter will be returned. *
- * @return array|mixed An array of type information if type + * @return array|string|int|false An array of type information if type * is not specified, otherwise a specific type. - * @since 4.2 - * @since 5.0 */ -function mb_get_info ($type = null) {} +#[Pure] +#[ArrayShape([ + 'internal_encoding' => 'string', + 'http_input' => 'string', + 'http_output' => 'string', + 'http_output_conv_mimetypes' => 'string', + 'mail_charset' => 'string', + 'mail_header_encoding' => 'string', + 'mail_body_encoding' => 'string', + 'illegal_chars' => 'string', + 'encoding_translation' => 'string', + 'language' => 'string', + 'detect_order' => 'string', + 'substitute_character' => 'string', + 'strict_detection' => 'string', +])] +function mb_get_info(string $type = 'all'): array|string|int|false {} /** * Check if the string is valid for the specified encoding * @link https://php.net/manual/en/function.mb-check-encoding.php - * @param string|array $var [optional]+ * @param string|string[]|null $value [optional]
* The byte stream to check. If it is omitted, this function checks * all the input from the beginning of the request. *
- * @param string $encoding [optional]+ * @param string|null $encoding [optional]
* The expected encoding. *
* @return bool true on success or false on failure. - * @since 4.4.3 * @since 5.1.3 */ -function mb_check_encoding ($var = null, $encoding = null) {} +#[Pure] +function mb_check_encoding(array|string|null $value = null, ?string $encoding): bool {} /** * Returns current encoding for multibyte regex as string * @link https://php.net/manual/en/function.mb-regex-encoding.php - * @param string $encoding [optional] &mbstring.encoding.parameter; + * @param string|null $encoding [optional] * @return bool|string If encoding is set, then Returns TRUE on success * or FALSE on failure. In this case, the internal character encoding * is NOT changed. If encoding is omitted, then the current character * encoding name for a multibyte regex is returned. - * @since 4.2 - * @since 5.0 */ -function mb_regex_encoding ($encoding = null) {} +function mb_regex_encoding(?string $encoding): string|bool {} /** * Set/Get the default options for mbregex functions * @link https://php.net/manual/en/function.mb-regex-set-options.php - * @param string $options [optional]+ * @param string|null $options [optional]
* The options to set. *
- * @return string The previous options. If options is omitted, + * @return string The previous options. If options is omitted, * it returns the string that describes the current options. - * @since 4.3 - * @since 5.0 */ -function mb_regex_set_options ($options = null) {} +function mb_regex_set_options(?string $options): string {} /** * Regular expression match with multibyte support @@ -966,14 +972,12 @@ function mb_regex_set_options ($options = null) {} * @param string $string* The search string. *
- * @param string[] $regs [optional]+ * @param string[] &$matches [optional]
* Contains a substring of the matched string. *
- * @return int - * @since 4.2 - * @since 5.0 + * @return bool */ -function mb_ereg ($pattern, $string, array &$regs = null) {} +function mb_ereg(string $pattern, string $string, &$matches): bool {} /** * Regular expression match ignoring case with multibyte support @@ -984,14 +988,13 @@ function mb_ereg ($pattern, $string, array &$regs = null) {} * @param string $string* The string being searched. *
- * @param string[] $regs [optional]+ * @param string[] &$matches [optional]
* Contains a substring of the matched string. *
- * @return int - * @since 4.2 - * @since 5.0 + * @return bool|int */ -function mb_eregi ($pattern, $string, array &$regs = null) {} +#[LanguageLevelTypeAware(["8.0" => "bool"], default: "false|int")] +function mb_eregi(string $pattern, string $string, &$matches): bool {} /** * Replace regular expression with multibyte support @@ -1008,22 +1011,21 @@ function mb_eregi ($pattern, $string, array &$regs = null) {} * @param string $string* The string being checked. *
- * @param string $option [optional] Matching condition can be set by option + * @param string|null $options Matching condition can be set by option * parameter. If i is specified for this * parameter, the case will be ignored. If x is * specified, white space will be ignored. If m * is specified, match will be executed in multiline mode and line * break will be included in '.'. If p is - * specified, match will be executed in POSIX mode, line break + * specified, match will be executed in POSIX mode, line break * will be considered as normal character. If e * is specified, replacement string will be * evaluated as PHP expression. *PHP 7.1: The e modifier has been deprecated.
- * @return string|false The resultant string on success, or false on error. - * @since 4.2 - * @since 5.0 + * @return string|false|null The resultant string on success, or false on error. */ -function mb_ereg_replace ($pattern, $replacement, $string, $option = "msr") {} +#[Pure] +function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null {} /** * Perform a regular expresssion seach and replace with multibyte support using a callback @@ -1052,7 +1054,7 @@ function mb_ereg_replace ($pattern, $replacement, $string, $option = "msr") {} * @param string $string* The string being checked. *
- * @param string $option [optional+ * @param string $options
* Matching condition can be set by option * parameter. If i is specified for this * parameter, the case will be ignored. If x is @@ -1063,12 +1065,12 @@ function mb_ereg_replace ($pattern, $replacement, $string, $option = "msr") {} * will be considered as normal character. Note that e * cannot be used for mb_ereg_replace_callback(). *
- * @return string|false+ * @return string|false|null
* The resultant string on success, or FALSE on error. *
* @since 5.4.1 */ -function mb_ereg_replace_callback ($pattern, callable $callback, $string, $option = "msr") {} +function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): string|false|null {} /** * Replace regular expression with multibyte support ignoring case @@ -1076,20 +1078,24 @@ function mb_ereg_replace_callback ($pattern, callable $callback, $string, $optio * @param string $pattern* The regular expression pattern. Multibyte characters may be used. The case will be ignored. *
- * @param string $replace+ * @param string $replacement
* The replacement text. *
* @param string $string* The searched string. *
- * @param string $option [optional] option has the same meaning as in + * @param string|null $options option has the same meaning as in * mb_ereg_replace. *PHP 7.1: The e modifier has been deprecated.
- * @return string|false The resultant string or false on error. - * @since 4.2 - * @since 5.0 + * @return string|false|null The resultant string or false on error. */ -function mb_eregi_replace ($pattern, $replace, $string, $option = "msr") {} +#[Pure] +function mb_eregi_replace( + string $pattern, + string $replacement, + string $string, + #[PhpStormStubsElementAvailable(from: '7.0')] ?string $options = null +): string|false|null {} /** * Split multibyte string using regular expression @@ -1100,14 +1106,13 @@ function mb_eregi_replace ($pattern, $replace, $string, $option = "msr") {} * @param string $string* The string being split. *
- * @param int $limit [optional] If optional parameter limit is specified, + * @param int $limit [optional] If optional parameter limit is specified, * it will be split in limit elements as * maximum. - * @return string[] The result as an array. - * @since 4.2 - * @since 5.0 + * @return string[]|false The result as an array. */ -function mb_split ($pattern, $string, $limit = null) {} +#[Pure] +function mb_split(string $pattern, string $string, int $limit = -1): array|false {} /** * Regular expression match for multibyte string @@ -1118,54 +1123,51 @@ function mb_split ($pattern, $string, $limit = null) {} * @param string $string* The string being evaluated. *
- * @param string $option [optional]+ * @param string|null $options [optional]
*
- * @return bool - * @since 4.2 - * @since 5.0 + * @return bool */ -function mb_ereg_match ($pattern, $string, $option = null) {} +#[Pure] +function mb_ereg_match(string $pattern, string $string, ?string $options): bool {} /** * Multibyte regular expression match for predefined multibyte string * @link https://php.net/manual/en/function.mb-ereg-search.php - * @param string $pattern [optional]+ * @param string|null $pattern [optional]
* The search pattern. *
- * @param string $option [optional]+ * @param string|null $options [optional]
* The search option. *
- * @return bool - * @since 4.2 - * @since 5.0 + * @return bool */ -function mb_ereg_search ($pattern = null, $option = null) {} +#[Pure] +function mb_ereg_search(?string $pattern, ?string $options): bool {} /** * Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string * @link https://php.net/manual/en/function.mb-ereg-search-pos.php - * @param string $pattern [optional]+ * @param string|null $pattern [optional]
* The search pattern. *
- * @param string $option [optional]+ * @param string|null $options [optional]
* The search option. *
* @return int[]|false An array containing two elements. The first * element is the offset, in bytes, where the match begins relative * to the start of the search string, and the second element is the * length in bytes of the match. If an error occurs, FALSE is returned. - * @since 4.2 - * @since 5.0 */ -function mb_ereg_search_pos ($pattern = null, $option = null) {} +#[Pure] +function mb_ereg_search_pos(?string $pattern, ?string $options): array|false {} /** * Returns the matched part of a multibyte regular expression * @link https://php.net/manual/en/function.mb-ereg-search-regs.php - * @param string $pattern [optional]+ * @param string|null $pattern [optional]
* The search pattern. *
- * @param string $option [optional]+ * @param string|null $options [optional]
* The search option. *
* @return string[]|false mb_ereg_search_regs() executes the multibyte @@ -1173,10 +1175,9 @@ function mb_ereg_search_pos ($pattern = null, $option = null) {} * returns an array including substring of matched part as first element, * the first grouped part with brackets as second element, the second grouped * part as third element, and so on. It returns FALSE on error. - * @since 4.2 - * @since 5.0 */ -function mb_ereg_search_regs ($pattern = null, $option = null) {} +#[Pure] +function mb_ereg_search_regs(?string $pattern, ?string $options): array|false {} /** * Setup string and regular expression for a multibyte regular expression match @@ -1184,17 +1185,15 @@ function mb_ereg_search_regs ($pattern = null, $option = null) {} * @param string $string* The search string. *
- * @param string $pattern [optional]+ * @param string|null $pattern [optional]
* The search pattern. *
- * @param string $option [optional]+ * @param string|null $options [optional]
* The search option. *
- * @return bool - * @since 4.2 - * @since 5.0 + * @return bool */ -function mb_ereg_search_init ($string, $pattern = null, $option = null) {} +function mb_ereg_search_init(string $string, ?string $pattern, ?string $options): bool {} /** * Retrieve the result from the last multibyte regular expression match @@ -1205,63 +1204,68 @@ function mb_ereg_search_init ($string, $pattern = null, $option = null) {} * sub-string, the second element will have the first part grouped with * brackets, the third element will have the second part grouped with * brackets, and so on. It returns FALSE on error; - * @since 4.2 - * @since 5.0 */ -function mb_ereg_search_getregs () {} +#[Pure] +function mb_ereg_search_getregs(): array|false {} /** * Returns start point for next regular expression match * @link https://php.net/manual/en/function.mb-ereg-search-getpos.php - * @return int - * @since 4.2 - * @since 5.0 - * @deprecated 7.3 + * @return int */ -function mb_ereg_search_getpos () {} +#[Pure] +#[Deprecated(since: '7.3')] +function mb_ereg_search_getpos(): int {} /** * Set start point of next regular expression match * @link https://php.net/manual/en/function.mb-ereg-search-setpos.php - * @param int $position+ * @param int $offset
* The position to set. *
* @return bool - * @since 4.2 - * @since 5.0 */ -function mb_ereg_search_setpos ($position) {} +#[Pure] +function mb_ereg_search_setpos(int $offset): bool {} /** * @param $encoding [optional] - * @deprecated 7.3 use {@see mb_regex_encoding} instead + * @see mb_regex_encoding + * @removed 8.0 */ -function mbregex_encoding ($encoding) {} +#[Deprecated(replacement: "mb_regex_encoding(%parametersList%)", since: "7.3")] +function mbregex_encoding($encoding) {} /** - * @param $pattern - * @param $string - * @param $registers [optional] - * @deprecated 7.3 use {@see mb_ereg} instead + * @param string $pattern + * @param string $string + * @param array &$registers [optional] + * @see mb_ereg + * @removed 8.0 */ -function mbereg ($pattern, $string, &$registers) {} +#[Deprecated(replacement: 'mb_ereg(%parametersList%)', since: '7.3')] +function mbereg(string $pattern, string $string, array &$registers) {} /** - * @param $pattern - * @param $string - * @param $registers [optional] - * @deprecated 7.3 use {@see mb_eregi} instead + * @param string $pattern + * @param string $string + * @param array &$registers [optional] + * @see mb_eregi + * @removed 8.0 */ -function mberegi ($pattern, $string, &$registers) {} +#[Deprecated(replacement: "mb_eregi(%parametersList%)", since: "7.3")] +function mberegi(string $pattern, string $string, array &$registers) {} /** * @param $pattern * @param $replacement * @param $string * @param $option [optional] - * @deprecated 7.3 use {@see mb_ereg_replace} instead + * @see mb_ereg_replace + * @removed 8.0 */ -function mbereg_replace ($pattern, $replacement, $string, $option) {} +#[Deprecated(replacement: 'mb_ereg_replace(%parametersList%)', since: '7.3')] +function mbereg_replace($pattern, $replacement, $string, $option) {} /** * @param $pattern @@ -1269,117 +1273,164 @@ function mbereg_replace ($pattern, $replacement, $string, $option) {} * @param $string * @param string $option * @return string - * @deprecated 7.3 use {@see mb_eregi_replace} instead + * @see mb_eregi_replace + * @removed 8.0 */ -function mberegi_replace ($pattern, $replacement, $string, string $option = "msri") {} +#[Deprecated(replacement: "mb_eregi_replace(%parametersList%)", since: "7.3")] +function mberegi_replace( + $pattern, + $replacement, + $string, + #[PhpStormStubsElementAvailable(from: '7.0')] string $option = "msri" +): string {} /** * @param $pattern * @param $string * @param $limit [optional] - * @deprecated 7.3 use {@see mb_split} instead + * @see mb_split + * @removed 8.0 */ -function mbsplit ($pattern, $string, $limit) {} +#[Deprecated(replacement: 'mb_split(%parametersList%)', since: '7.3')] +function mbsplit($pattern, $string, $limit) {} /** * @param $pattern * @param $string * @param $option [optional] - * @deprecated 7.3 use {@see mb_ereg_match} instead + * @see mb_ereg_match + * @removed 8.0 */ -function mbereg_match ($pattern, $string, $option) {} +#[Deprecated(replacement: "mb_ereg_match(%parametersList%)", since: "7.3")] +function mbereg_match($pattern, $string, $option) {} /** * @param $pattern [optional] * @param $option [optional] - * @deprecated 7.3 use {@see mb_ereg_search} instead + * @see mb_ereg_search + * @removed 8.0 */ -function mbereg_search ($pattern, $option) {} +#[Deprecated("use mb_ereg_search instead", replacement: "mb_ereg_search(%parametersList%)", since: "7.3")] +function mbereg_search($pattern, $option) {} /** * @param $pattern [optional] * @param $option [optional] - * @deprecated 7.3 use {@see mb_ereg_search_pos} instead + * @see mb_ereg_search_pos + * @removed 8.0 */ -function mbereg_search_pos ($pattern, $option) {} +#[Deprecated(replacement: "mb_ereg_search_pos(%parametersList%)", since: "7.3")] +function mbereg_search_pos($pattern, $option) {} /** * @param $pattern [optional] * @param $option [optional] - * @deprecated 7.3 use {@see mb_ereg_search_regs} instead + * @see mb_ereg_search_regs + * @removed 8.0 */ -function mbereg_search_regs ($pattern, $option) {} +#[Deprecated(replacement: 'mb_ereg_search_regs(%parametersList%)', since: '7.3')] +function mbereg_search_regs($pattern, $option) {} /** * @param $string * @param $pattern [optional] * @param $option [optional] - * @deprecated 7.3 use {@see mb_ereg_search_init} instead + * @see mb_ereg_search_init + * @removed 8.0 */ -function mbereg_search_init ($string, $pattern, $option) {} +#[Deprecated(replacement: "mb_ereg_search_init(%parametersList%)", since: "7.3")] +function mbereg_search_init($string, $pattern, $option) {} /** - * @deprecated 7.3 use {@see mb_ereg_search_getregs} instead + * @see mb_ereg_search_getregs + * @removed 8.0 */ -function mbereg_search_getregs () {} +#[Deprecated(replacement: 'mb_ereg_search_getregs(%parametersList%)', since: '7.3')] +function mbereg_search_getregs() {} /** - * @deprecated 7.3 use {@see mb_ereg_search_getpos} instead + * @see mb_ereg_search_getpos + * @removed 8.0 */ -function mbereg_search_getpos () {} +#[Deprecated(replacement: "mb_ereg_search_getpos()", since: "7.3")] +function mbereg_search_getpos() {} /** * Get a specific character. * @link https://www.php.net/manual/en/function.mb-chr.php - * @param int $cp - * @param string $encoding + * @param int $codepoint + * @param string|null $encoding [optional] * @return string|false specific character or FALSE on failure. * @since 7.2 */ -function mb_chr($cp, $encoding) {} +#[Pure] +function mb_chr(int $codepoint, ?string $encoding): string|false {} /** * Get code point of character * @link https://www.php.net/manual/en/function.mb-ord.php - * @param string $str - * @param string $encoding + * @param string $string + * @param string|null $encoding [optional] * @return int|false code point of character or FALSE on failure. * @since 7.2 */ -function mb_ord($str, $encoding) {} +#[Pure] +function mb_ord(string $string, ?string $encoding): int|false {} /** * Scrub broken multibyte strings. * @link https://www.php.net/manual/en/function.mb-scrub.php - * @param string $str - * @param string $encoding + * @param string $string + * @param string|null $encoding [optional] * @return string|false * @since 7.2 */ -function mb_scrub($str, $encoding) {} +#[Pure] +#[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")] +function mb_scrub(string $string, ?string $encoding): false|string {} /** * @param $position - * @deprecated 7.3 use {@see mb_ereg_search_setpos} instead + * @see mb_ereg_search_setpos */ -function mbereg_search_setpos ($position) {} +#[Deprecated(replacement: "mb_ereg_search_setpos(%parametersList%)", since: "7.3")] +#[Pure] +function mbereg_search_setpos($position) {} /** * Function performs string splitting to an array of defined size chunks. - * @param string $str - * @param int $split_length [optional] - * @param string $encoding [optional] - * @return string[] + * @param string $string+ * The string to split into characters or chunks. + *
+ * @param int $length [optional]+ * If specified, each element of the returned array will be composed of multiple characters instead of a single character. + *
+ * @param string|null $encoding [optional]+ * Character encoding name to use. + * If it is omitted, internal character encoding is used. + *
+ * @return string[]|false * @since 7.4 */ -function mb_str_split($str, $split_length, $encoding){} +#[Pure] +#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] +function mb_str_split(string $string, int $length = 1, ?string $encoding) {} -define ('MB_OVERLOAD_MAIL', 1); -define ('MB_OVERLOAD_STRING', 2); -define ('MB_OVERLOAD_REGEX', 4); -define ('MB_CASE_UPPER', 0); -define ('MB_CASE_LOWER', 1); -define ('MB_CASE_TITLE', 2); +/** + * @removed 8.0 + */ +define('MB_OVERLOAD_MAIL', 1); +/** + * @removed 8.0 + */ +define('MB_OVERLOAD_STRING', 2); +/** + * @removed 8.0 + */ +define('MB_OVERLOAD_REGEX', 4); +define('MB_CASE_UPPER', 0); +define('MB_CASE_LOWER', 1); +define('MB_CASE_TITLE', 2); /** * @since 7.3 */ @@ -1404,7 +1455,6 @@ function mb_str_split($str, $split_length, $encoding){} /** * @since 7.4 */ -define('MB_ONIGURUMA_VERSION', '6.9.1'); +define('MB_ONIGURUMA_VERSION', '6.9.8'); // End of mbstring v. -?> diff --git a/mcrypt/mcrypt.php b/mcrypt/mcrypt.php index 21a1b5a07..a00237b2a 100644 --- a/mcrypt/mcrypt.php +++ b/mcrypt/mcrypt.php @@ -1,77 +1,73 @@ - * @param string $mode+ * @param string $module
* One of the MCRYPT_MODE_modename constants, or one of the following strings: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".
* @return int Gets the block size, as an integer. - * @since 4.0 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_get_block_size ($cipher, $mode) {} +#[Deprecated(since: '7.1')] +function mcrypt_get_block_size($cipher, $module) {} /** * Get the name of the specified cipher @@ -98,14 +93,13 @@ function mcrypt_get_block_size ($cipher, $mode) {} * * @return string|false This function returns the name of the cipher or false, if the cipher does * not exist. - * @since 4.0 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_get_cipher_name ($cipher) {} +#[Deprecated(since: '7.1')] +function mcrypt_get_cipher_name($cipher) {} /** - * Create an initialization vector (IV) from a random source + * Creates an initialization vector (IV) from a random source * @link https://php.net/manual/en/function.mcrypt-create-iv.php * @param int $size* Determines the size of the IV, parameter source @@ -129,41 +123,38 @@ function mcrypt_get_cipher_name ($cipher) {} * rand is. *
* @return string|false the initialization vector, or false on error. - * @since 4.0 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_create_iv ($size, $source = MCRYPT_DEV_URANDOM) {} +#[Deprecated(since: '7.1')] +function mcrypt_create_iv($size, $source = MCRYPT_DEV_URANDOM) {} /** - * Get an array of all supported ciphers + * Gets an array of all supported ciphers * @link https://php.net/manual/en/function.mcrypt-list-algorithms.php * @param string $lib_dir [optional]* Specifies the directory where all algorithms are located. If not - * specifies, the value of the mcrypt.algorithms_dir &php.ini; directive + * specifies, the value of the mcrypt.algorithms_dir (php.ini) directive * is used. *
* @return array an array with all the supported algorithms. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_list_algorithms ($lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_list_algorithms($lib_dir = null) {} /** - * Get an array of all supported modes + * Gets an array of all supported modes * @link https://php.net/manual/en/function.mcrypt-list-modes.php * @param string $lib_dir [optional]* Specifies the directory where all modes are located. If not * specifies, the value of the mcrypt.modes_dir - * &php.ini; directive is used. + * (php.ini) directive is used. *
* @return array an array with all the supported modes. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_list_modes ($lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_list_modes($lib_dir = null) {} /** * Returns the size of the IV belonging to a specific cipher/mode combination @@ -172,7 +163,7 @@ function mcrypt_list_modes ($lib_dir = null) {} * One of the MCRYPT_ciphername constants of the name * of the algorithm as string. * - * @param string $mode+ * @param string $module
* mode is one of the MCRYPT_MODE_modename constants * or one of "ecb", "cbc", "cfb", "ofb", "nofb" or "stream". The IV is * ignored in ECB mode as this mode does not require it. You will need to @@ -182,11 +173,10 @@ function mcrypt_list_modes ($lib_dir = null) {} * @return int|false the size of the Initialisation Vector (IV) in bytes. On error the * function returns false. If the IV is ignored in the specified cipher/mode * combination zero is returned. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_get_iv_size ($cipher, $mode) {} +#[Deprecated(since: '7.1')] +function mcrypt_get_iv_size($cipher, $module) {} /** * Encrypts plaintext with given parameters @@ -225,11 +215,10 @@ function mcrypt_get_iv_size ($cipher, $mode) {} * IV with all bytes set to '\0'. *
* @return string the encrypted data, as a string. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_encrypt ($cipher, $key, $data, $mode, $iv = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_encrypt($cipher, $key, $data, $mode, $iv = null) {} /** * Decrypts crypttext with given parameters @@ -260,19 +249,18 @@ function mcrypt_encrypt ($cipher, $key, $data, $mode, $iv = null) {} * '\0'. * * @return string the decrypted data as a string. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_decrypt ($cipher, $key, $data, $mode, $iv = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null) {} /** * Opens the module of the algorithm and the mode to be used * @link https://php.net/manual/en/function.mcrypt-module-open.php - * @param string $algorithm+ * @param string $cipher
* The algorithm to be used. *
- * @param string $algorithm_directory+ * @param string $cipher_directory
* The algorithm_directory and * mode_directory are used to locate the encryption * modules. When you supply a directory name, it is used. When you set one @@ -289,11 +277,10 @@ function mcrypt_decrypt ($cipher, $key, $data, $mode, $iv = null) {} * @param string $mode_directory
*
* @return resource|false Normally it returns an encryption descriptor, or false on error. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_open ($algorithm, $algorithm_directory, $mode, $mode_directory) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_open($cipher, $cipher_directory, $mode, $mode_directory) {} /** * This function initializes all buffers needed for encryption @@ -320,11 +307,10 @@ function mcrypt_module_open ($algorithm, $algorithm_directory, $mode, $mode_dire * other return value is an unknown error. If an error occurs a warning will * be displayed accordingly. false is returned if incorrect parameters * were passed. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_generic_init ($td, $key, $iv) {} +#[Deprecated(since: '7.1')] +function mcrypt_generic_init($td, $key, $iv) {} /** * This function encrypts data @@ -343,14 +329,13 @@ function mcrypt_generic_init ($td, $key, $iv) {} * The data to encrypt. * * @return string the encrypted data. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_generic ($td, $data) {} +#[Deprecated(since: '7.1')] +function mcrypt_generic($td, $data) {} /** - * Decrypt data + * Decrypts data * @link https://php.net/manual/en/function.mdecrypt-generic.php * @param resource $td* An encryption descriptor returned by @@ -359,23 +344,21 @@ function mcrypt_generic ($td, $data) {} * @param string $data
* Encrypted data. *
- * @return string - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @return string + * @removed 7.2 */ -function mdecrypt_generic ($td, $data) {} +#[Deprecated(since: '7.1')] +function mdecrypt_generic($td, $data) {} /** * This function terminates encryption * @link https://php.net/manual/en/function.mcrypt-generic-end.php - * @param resource $td + * @param resource $td * @return bool - * @deprecated 5.4 This function has been DEPRECATED as of PHP 5.4.0. - * @since 4.0.2 - * @since 5.1.6 + * @removed 7.0 */ -function mcrypt_generic_end ($td) {} +#[Deprecated(since: '5.3')] +function mcrypt_generic_end($td) {} /** * This function deinitializes an encryption module @@ -384,11 +367,10 @@ function mcrypt_generic_end ($td) {} * The encryption descriptor. * * @return bool true on success or false on failure. - * @since 4.0.7 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_generic_deinit ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_generic_deinit($td) {} /** * Runs a self test on the opened module @@ -396,13 +378,11 @@ function mcrypt_generic_deinit ($td) {} * @param resource $td* The encryption descriptor. *
- * @return int|bool If the self test succeeds it returns false. In case of an error, it - * returns true. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @return int Returns 0 on success and a negative integer on failure + * @removed 7.2 */ -function mcrypt_enc_self_test ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_self_test($td) {} /** * Checks whether the encryption of the opened mode works on blocks @@ -412,11 +392,10 @@ function mcrypt_enc_self_test ($td) {} * * @return bool true if the mode is for use with block algorithms, otherwise it * returns false. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_is_block_algorithm_mode ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_is_block_algorithm_mode($td) {} /** * Checks whether the algorithm of the opened mode is a block algorithm @@ -426,11 +405,10 @@ function mcrypt_enc_is_block_algorithm_mode ($td) {} * * @return bool true if the algorithm is a block algorithm or false if it is * a stream one. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_is_block_algorithm ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_is_block_algorithm($td) {} /** * Checks whether the opened mode outputs blocks @@ -439,11 +417,10 @@ function mcrypt_enc_is_block_algorithm ($td) {} * The encryption descriptor. * * @return bool true if the mode outputs blocks of bytes or false if it outputs bytes. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_is_block_mode ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_is_block_mode($td) {} /** * Returns the blocksize of the opened algorithm @@ -452,11 +429,10 @@ function mcrypt_enc_is_block_mode ($td) {} * The encryption descriptor. * * @return int the block size of the specified algorithm in bytes. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_get_block_size ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_get_block_size($td) {} /** * Returns the maximum supported keysize of the opened mode @@ -465,11 +441,10 @@ function mcrypt_enc_get_block_size ($td) {} * The encryption descriptor. * * @return int the maximum supported key size of the algorithm in bytes. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_get_key_size ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_get_key_size($td) {} /** * Returns an array with the supported keysizes of the opened algorithm @@ -482,11 +457,10 @@ function mcrypt_enc_get_key_size ($td) {} * array then all key sizes between 1 and * mcrypt_enc_get_key_size are supported by the * algorithm. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_get_supported_key_sizes ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_get_supported_key_sizes($td) {} /** * Returns the size of the IV of the opened algorithm @@ -495,11 +469,10 @@ function mcrypt_enc_get_supported_key_sizes ($td) {} * The encryption descriptor. * * @return int the size of the IV, or 0 if the IV is ignored in the algorithm. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_get_iv_size ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_get_iv_size($td) {} /** * Returns the name of the opened algorithm @@ -508,11 +481,10 @@ function mcrypt_enc_get_iv_size ($td) {} * The encryption descriptor. * * @return string the name of the opened algorithm as a string. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_get_algorithms_name ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_get_algorithms_name($td) {} /** * Returns the name of the opened mode @@ -521,11 +493,10 @@ function mcrypt_enc_get_algorithms_name ($td) {} * The encryption descriptor. * * @return string the name as a string. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_enc_get_modes_name ($td) {} +#[Deprecated(since: '7.1')] +function mcrypt_enc_get_modes_name($td) {} /** * This function runs a self test on the specified module @@ -539,11 +510,10 @@ function mcrypt_enc_get_modes_name ($td) {} * * @return bool The function returns true if the self test succeeds, or false when if * fails. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_self_test ($algorithm, $lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_self_test($algorithm, $lib_dir = null) {} /** * Returns if the specified module is a block algorithm or not @@ -558,11 +528,10 @@ function mcrypt_module_self_test ($algorithm, $lib_dir = null) {} * @return bool This function returns true if the mode is for use with block * algorithms, otherwise it returns false. (e.g. false for stream, and * true for cbc, cfb, ofb). - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_is_block_algorithm_mode ($mode, $lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_is_block_algorithm_mode($mode, $lib_dir = null) {} /** * This function checks whether the specified algorithm is a block algorithm @@ -576,11 +545,10 @@ function mcrypt_module_is_block_algorithm_mode ($mode, $lib_dir = null) {} * * @return bool This function returns true if the specified algorithm is a block * algorithm, or false is it is a stream algorithm. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_is_block_algorithm ($algorithm, $lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_is_block_algorithm($algorithm, $lib_dir = null) {} /** * Returns if the specified mode outputs blocks or not @@ -595,11 +563,10 @@ function mcrypt_module_is_block_algorithm ($algorithm, $lib_dir = null) {} * @return bool This function returns true if the mode outputs blocks of bytes or * false if it outputs just bytes. (e.g. true for cbc and ecb, and * false for cfb and stream). - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_is_block_mode ($mode, $lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_is_block_mode($mode, $lib_dir = null) {} /** * Returns the blocksize of the specified algorithm @@ -612,11 +579,10 @@ function mcrypt_module_is_block_mode ($mode, $lib_dir = null) {} * is on the system. * * @return int the block size of the algorithm specified in bytes. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_get_algo_block_size ($algorithm, $lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_get_algo_block_size($algorithm, $lib_dir = null) {} /** * Returns the maximum supported keysize of the opened mode @@ -630,11 +596,10 @@ function mcrypt_module_get_algo_block_size ($algorithm, $lib_dir = null) {} * * @return int This function returns the maximum supported key size of the * algorithm specified in bytes. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_get_algo_key_size ($algorithm, $lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_get_algo_key_size($algorithm, $lib_dir = null) {} /** * Returns an array with the supported keysizes of the opened algorithm @@ -650,66 +615,263 @@ function mcrypt_module_get_algo_key_size ($algorithm, $lib_dir = null) {} * If it returns an empty array then all key sizes between 1 and * mcrypt_module_get_algo_key_size are supported by the * algorithm. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 + * @removed 7.2 */ -function mcrypt_module_get_supported_key_sizes ($algorithm, $lib_dir = null) {} +#[Deprecated(since: '7.1')] +function mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir = null) {} /** - * Close the mcrypt module + * Closes the mcrypt module * @link https://php.net/manual/en/function.mcrypt-module-close.php * @param resource $td* The encryption descriptor. *
* @return bool true on success or false on failure. - * @since 4.0.2 - * @since 5.0 - * @deprecated 7.1 - */ -function mcrypt_module_close ($td) {} - -define ('MCRYPT_ENCRYPT', 0); -define ('MCRYPT_DECRYPT', 1); -define ('MCRYPT_DEV_RANDOM', 0); -define ('MCRYPT_DEV_URANDOM', 1); -define ('MCRYPT_RAND', 2); -define ('MCRYPT_3DES', "tripledes"); -define ('MCRYPT_ARCFOUR_IV', "arcfour-iv"); -define ('MCRYPT_ARCFOUR', "arcfour"); -define ('MCRYPT_BLOWFISH', "blowfish"); -define ('MCRYPT_BLOWFISH_COMPAT', "blowfish-compat"); -define ('MCRYPT_CAST_128', "cast-128"); -define ('MCRYPT_CAST_256', "cast-256"); -define ('MCRYPT_CRYPT', "crypt"); -define ('MCRYPT_DES', "des"); -define ('MCRYPT_ENIGNA', "crypt"); -define ('MCRYPT_GOST', "gost"); -define ('MCRYPT_LOKI97', "loki97"); -define ('MCRYPT_PANAMA', "panama"); -define ('MCRYPT_RC2', "rc2"); -define ('MCRYPT_RIJNDAEL_128', "rijndael-128"); -define ('MCRYPT_RIJNDAEL_192', "rijndael-192"); -define ('MCRYPT_RIJNDAEL_256', "rijndael-256"); -define ('MCRYPT_SAFER64', "safer-sk64"); -define ('MCRYPT_SAFER128', "safer-sk128"); -define ('MCRYPT_SAFERPLUS', "saferplus"); -define ('MCRYPT_SERPENT', "serpent"); -define ('MCRYPT_THREEWAY', "threeway"); -define ('MCRYPT_TRIPLEDES', "tripledes"); -define ('MCRYPT_TWOFISH', "twofish"); -define ('MCRYPT_WAKE', "wake"); -define ('MCRYPT_XTEA', "xtea"); -define ('MCRYPT_IDEA', "idea"); -define ('MCRYPT_MARS', "mars"); -define ('MCRYPT_RC6', "rc6"); -define ('MCRYPT_SKIPJACK', "skipjack"); -define ('MCRYPT_MODE_CBC', "cbc"); -define ('MCRYPT_MODE_CFB', "cfb"); -define ('MCRYPT_MODE_ECB', "ecb"); -define ('MCRYPT_MODE_NOFB', "nofb"); -define ('MCRYPT_MODE_OFB', "ofb"); -define ('MCRYPT_MODE_STREAM', "stream"); + * @removed 7.2 + */ +#[Deprecated(since: '7.1')] +function mcrypt_module_close($td) {} + +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_ENCRYPT', 0); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_DECRYPT', 1); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_DEV_RANDOM', 0); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_DEV_URANDOM', 1); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RAND', 2); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_3DES', "tripledes"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_ARCFOUR_IV', "arcfour-iv"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_ARCFOUR', "arcfour"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_BLOWFISH', "blowfish"); +define('MCRYPT_BLOWFISH_COMPAT', "blowfish-compat"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_CAST_128', "cast-128"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_CAST_256', "cast-256"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_CRYPT', "crypt"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_DES', "des"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_DES_COMPAT', "des-compat"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_ENIGNA', "crypt"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_GOST', "gost"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_LOKI97', "loki97"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_PANAMA', "panama"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RC2', "rc2"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RC4', "rc4"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RIJNDAEL_128', "rijndael-128"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RIJNDAEL_192', "rijndael-192"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RIJNDAEL_256', "rijndael-256"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SAFER64', "safer-sk64"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SAFER128', "safer-sk128"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SAFERPLUS', "saferplus"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SERPENT', "serpent"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SERPENT_128', "serpent-128"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SERPENT_192', "serpent-192"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SERPENT_256', "serpent-256"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_THREEWAY', "threeway"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_TRIPLEDES', "tripledes"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_TWOFISH', "twofish"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_WAKE', "wake"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_XTEA', "xtea"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_IDEA', "idea"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_MARS', "mars"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RC6', "rc6"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RC6_128', "rc6-128"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RC6_192', "rc6-192"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_RC6_256', "rc6-256"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_SKIPJACK', "skipjack"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_MODE_CBC', "cbc"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_MODE_CFB', "cfb"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_MODE_ECB', "ecb"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_MODE_NOFB', "nofb"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_MODE_OFB', "ofb"); +/** + * @deprecated 7.1 + * @removed 7.2 + */ +define('MCRYPT_MODE_STREAM', "stream"); // End of mcrypt v. -?> diff --git a/memcache/memcache.php b/memcache/memcache.php index 080129f49..d4e389cab 100644 --- a/memcache/memcache.php +++ b/memcache/memcache.php @@ -2,8 +2,8 @@ // Start of memcache v.3.0.8 -class MemcachePool { - +class MemcachePool +{ /** * (PECL memcache >= 0.2.0)* Please note: port defaults to - * {@link https://php.net/manual/ru/memcache.ini.php#ini.memcache.default-port memcache.default_port} + * {@link https://php.net/manual/en/memcache.ini.php#ini.memcache.default-port memcache.default_port} * if not specified. For this reason it is wise to specify the port * explicitly in this method call. *
* @param int $timeout [optional]Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.
* @return boolReturns TRUE on success or FALSE on failure.
*/ - public function connect ($host, $port, $timeout = 1) {} + public function connect($host, $port, $timeout = 1) {} /** * (PECL memcache >= 2.0.0)Point to the host where memcached is listening for connections.Point to the host where memcached is listening for connections.
. * @param int $port [optional]* Point to the port where memcached is listening for connections. *
@@ -127,12 +127,9 @@ public function addServer ($host, $port = 11211, $persistent = true, $weight = n * * @return boolReturns TRUE on success or FALSE on failure.
*/ - public function setServerParams ($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {} + public function setServerParams($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {} - /** - * - */ - public function setFailureCallback () {} + public function setFailureCallback() {} /** * (PECL memcache >= 2.1.0)Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).
* @return bool Returns TRUE on success or FALSE on failure. */ - public function replace ($key, $var, $flag = null, $expire = null) {} + public function replace($key, $var, $flag = null, $expire = null) {} - public function cas () {} + public function cas() {} - public function append () {} + public function append() {} /** * @return string */ - public function prepend () {} + public function prepend() {} /** * (PECL memcache >= 0.2.0)* The key or array of keys to fetch. *
- * @param int|array $flags [optional]+ * @param int|array &$flags [optional]
* If present, flags fetched along with the values will be written to this parameter. These * flags are the same as the ones given to for example {@link https://php.net/manual/en/memcache.set.php Memcache::set()}. * The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate @@ -230,22 +224,22 @@ public function prepend () {} * key is an empty {@link https://php.net/manual/en/language.types.array.php array}. *
*/ - public function get ($key, &$flags = null) {} + public function get($key, &$flags = null) {} /** * (PECL memcache >= 0.2.0)* The type of statistics to fetch. * Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. @@ -261,7 +255,7 @@ public function delete ($key, $timeout = 0 ) {} *
* @return array|false Returns an associative array of server statistics or FALSE on failure. */ - public function getStats ($type = null, $slabid = null, $limit = 100) {} + public function getStats($type = null, $slabid = null, $limit = 100) {} /** * (PECL memcache >= 2.0.0)Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.
* @return bool Returns TRUE on success or FALSE on failure. */ - public function setCompressThreshold ($thresold, $min_saving = 0.2) {} + public function setCompressThreshold($thresold, $min_saving = 0.2) {} + /** * (PECL memcache >= 0.2.0)- * Point to the host where memcached is listening for connections. This parameter - * may also specify other transports like unix:///path/to/memcached.sock - * to use UNIX domain sockets, in this case port must also - * be set to 0. - *
- * @param int $port [optional]- * Point to the port where memcached is listening for connections. Set this - * parameter to 0 when using UNIX domain sockets. - *
- * @param int $timeout [optional]- * Value in seconds which will be used for connecting to the daemon. Think - * twice before changing the default value of 1 second - you can lose all - * the advantages of caching if your connection is too slow. - *
- * @return mixed a Memcache object or FALSE on failure. - */ - public function pconnect ($host, $port, $timeout = 1) {} +class Memcache extends MemcachePool +{ + /** + * (PECL memcache >= 0.4.0)+ * Point to the host where memcached is listening for connections. This parameter + * may also specify other transports like unix:///path/to/memcached.sock + * to use UNIX domain sockets, in this case port must also + * be set to 0. + *
+ * @param int $port [optional]+ * Point to the port where memcached is listening for connections. Set this + * parameter to 0 when using UNIX domain sockets. + *
+ * @param int $timeout [optional]+ * Value in seconds which will be used for connecting to the daemon. Think + * twice before changing the default value of 1 second - you can lose all + * the advantages of caching if your connection is too slow. + *
+ * @return mixed a Memcache object or FALSE on failure. + */ + public function pconnect($host, $port, $timeout = 1) {} } // string $host [, int $port [, int $timeout ]] /** - * (PECL memcache >= 0.2.0) + * (PECL memcache >= 0.2.0)@@ -382,45 +375,45 @@ public function pconnect ($host, $port, $timeout = 1) {} *
* @return bool Returns TRUE on success or FALSE on failure. */ -function memcache_connect ($host, $port, $timeout = 1) {} +function memcache_connect($host, $port, $timeout = 1) {} /** * (PECL memcache >= 0.4.0) * Memcache::pconnect — Open memcached server persistent connection - * + * * @link https://php.net/manual/en/memcache.pconnect.php#example-5242 - * @param $host - * @param null $port - * @param int $timeout + * @param string $host + * @param int|null $port + * @param int $timeout * @return Memcache */ -function memcache_pconnect ($host, $port=null, $timeout=1) {} +function memcache_pconnect($host, $port = null, $timeout = 1) {} -function memcache_add_server () {} +function memcache_add_server() {} -function memcache_set_server_params () {} +function memcache_set_server_params() {} -function memcache_set_failure_callback () {} +function memcache_set_failure_callback() {} -function memcache_get_server_status () {} +function memcache_get_server_status() {} -function memcache_get_version () {} +function memcache_get_version() {} -function memcache_add () {} +function memcache_add() {} -function memcache_set () {} +function memcache_set() {} -function memcache_replace () {} +function memcache_replace() {} -function memcache_cas () {} +function memcache_cas() {} -function memcache_append () {} +function memcache_append() {} -function memcache_prepend () {} +function memcache_prepend() {} -function memcache_get () {} +function memcache_get() {} -function memcache_delete () {} +function memcache_delete() {} /** * (PECL memcache >= 0.2.0)Type: boolean, default: TRUE.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_COMPRESSION = -1001; - const OPT_COMPRESSION_TYPE = -1004; - - /** - *This can be used to create a "domain" for your item keys. The value - * specified here will be prefixed to each of the keys. It cannot be - * longer than 128 characters and will reduce the - * maximum available key size. The prefix is applied only to the item keys, - * not to the server keys.
- *Type: string, default: "".
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_PREFIX_KEY = -1002; - - /** - *- * Specifies the serializer to use for serializing non-scalar values. - * The valid serializers are Memcached::SERIALIZER_PHP - * or Memcached::SERIALIZER_IGBINARY. The latter is - * supported only when memcached is configured with - * --enable-memcached-igbinary option and the - * igbinary extension is loaded. - *
- *Type: integer, default: Memcached::SERIALIZER_PHP.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SERIALIZER = -1003; - - /** - *Indicates whether igbinary serializer support is available.
- *Type: boolean.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HAVE_IGBINARY = 0; - - /** - *Indicates whether JSON serializer support is available.
- *Type: boolean.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HAVE_JSON = 0; - const HAVE_SESSION = 1; - const HAVE_SASL = 0; - - /** - *Specifies the hashing algorithm used for the item keys. The valid - * values are supplied via Memcached::HASH_* constants. - * Each hash algorithm has its advantages and its disadvantages. Go with the - * default if you don't know or don't care.
- *Type: integer, default: Memcached::HASH_DEFAULT
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_HASH = 2; - - /** - *The default (Jenkins one-at-a-time) item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_DEFAULT = 0; - - /** - *MD5 item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_MD5 = 1; - - /** - *CRC item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_CRC = 2; - - /** - *FNV1_64 item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1_64 = 3; - - /** - *FNV1_64A item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1A_64 = 4; - - /** - *FNV1_32 item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1_32 = 5; - - /** - *FNV1_32A item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1A_32 = 6; - - /** - *Hsieh item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_HSIEH = 7; - - /** - *Murmur item key hashing algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const HASH_MURMUR = 8; - - /** - *Specifies the method of distributing item keys to the servers. - * Currently supported methods are modulo and consistent hashing. Consistent - * hashing delivers better distribution and allows servers to be added to - * the cluster with minimal cache losses.
- *Type: integer, default: Memcached::DISTRIBUTION_MODULA.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_DISTRIBUTION = 9; - - /** - *Modulo-based key distribution algorithm.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const DISTRIBUTION_MODULA = 0; - - /** - *Consistent hashing key distribution algorithm (based on libketama).
- * @link https://php.net/manual/en/memcached.constants.php - */ - const DISTRIBUTION_CONSISTENT = 1; - const DISTRIBUTION_VIRTUAL_BUCKET = 6; - - /** - *Enables or disables compatibility with libketama-like behavior. When - * enabled, the item key hashing algorithm is set to MD5 and distribution is - * set to be weighted consistent hashing distribution. This is useful - * because other libketama-based clients (Python, Ruby, etc.) with the same - * server configuration will be able to access the keys transparently. - *
- *- * It is highly recommended to enable this option if you want to use - * consistent hashing, and it may be enabled by default in future - * releases. - *
- *Type: boolean, default: FALSE.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_LIBKETAMA_COMPATIBLE = 16; - const OPT_LIBKETAMA_HASH = 17; - const OPT_TCP_KEEPALIVE = 32; - - /** - *Enables or disables buffered I/O. Enabling buffered I/O causes - * storage commands to "buffer" instead of being sent. Any action that - * retrieves data causes this buffer to be sent to the remote connection. - * Quitting the connection or closing down the connection will also cause - * the buffered data to be pushed to the remote connection.
- *Type: boolean, default: FALSE.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_BUFFER_WRITES = 10; - - /** - *Enable the use of the binary protocol. Please note that you cannot - * toggle this option on an open connection.
- *Type: boolean, default: FALSE.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_BINARY_PROTOCOL = 18; - - /** - *Enables or disables asynchronous I/O. This is the fastest transport - * available for storage functions.
- *Type: boolean, default: FALSE.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_NO_BLOCK = 0; - - /** - *Enables or disables the no-delay feature for connecting sockets (may - * be faster in some environments).
- *Type: boolean, default: FALSE.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_TCP_NODELAY = 1; - - /** - *The maximum socket send buffer in bytes.
- *Type: integer, default: varies by platform/kernel - * configuration.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SOCKET_SEND_SIZE = 4; - - /** - *The maximum socket receive buffer in bytes.
- *Type: integer, default: varies by platform/kernel - * configuration.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SOCKET_RECV_SIZE = 5; - - /** - *In non-blocking mode this set the value of the timeout during socket - * connection, in milliseconds.
- *Type: integer, default: 1000.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_CONNECT_TIMEOUT = 14; - - /** - *The amount of time, in seconds, to wait until retrying a failed - * connection attempt.
- *Type: integer, default: 0.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_RETRY_TIMEOUT = 15; - - /** - *Socket sending timeout, in microseconds. In cases where you cannot - * use non-blocking I/O this will allow you to still have timeouts on the - * sending of data.
- *Type: integer, default: 0.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SEND_TIMEOUT = 19; - - /** - *Socket reading timeout, in microseconds. In cases where you cannot - * use non-blocking I/O this will allow you to still have timeouts on the - * reading of data.
- *Type: integer, default: 0.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_RECV_TIMEOUT = 20; - - /** - *Timeout for connection polling, in milliseconds.
- *Type: integer, default: 1000.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_POLL_TIMEOUT = 8; - - /** - *Enables or disables caching of DNS lookups.
- *Type: boolean, default: FALSE.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_CACHE_LOOKUPS = 6; - - /** - *Specifies the failure limit for server connection attempts. The - * server will be removed after this many continuous connection - * failures.
- *Type: integer, default: 0.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const OPT_SERVER_FAILURE_LIMIT = 21; - const OPT_AUTO_EJECT_HOSTS = 28; - const OPT_HASH_WITH_PREFIX_KEY = 25; - const OPT_NOREPLY = 26; - const OPT_SORT_HOSTS = 12; - const OPT_VERIFY_KEY = 13; - const OPT_USE_UDP = 27; - const OPT_NUMBER_OF_REPLICAS = 29; - const OPT_RANDOMIZE_REPLICA_READ = 30; - const OPT_CORK = 31; - const OPT_REMOVE_FAILED_SERVERS = 35; - const OPT_DEAD_TIMEOUT = 36; - const OPT_SERVER_TIMEOUT_LIMIT = 37; - const OPT_MAX = 38; - const OPT_IO_BYTES_WATERMARK = 23; - const OPT_IO_KEY_PREFETCH = 24; - const OPT_IO_MSG_WATERMARK = 22; - const OPT_LOAD_FROM_FILE = 34; - const OPT_SUPPORT_CAS = 7; - const OPT_TCP_KEEPIDLE = 33; - const OPT_USER_DATA = 11; - - - /** - *The operation was successful.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_SUCCESS = 0; - - /** - *The operation failed in some fashion.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_FAILURE = 1; - - /** - *DNS lookup failed.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_HOST_LOOKUP_FAILURE = 2; - - /** - *Failed to read network data.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_UNKNOWN_READ_FAILURE = 7; - - /** - *Bad command in memcached protocol.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_PROTOCOL_ERROR = 8; - - /** - *Error on the client side.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_CLIENT_ERROR = 9; - - /** - *Error on the server side.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_SERVER_ERROR = 10; - - /** - *Failed to write network data.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_WRITE_FAILURE = 5; - - /** - *Failed to do compare-and-swap: item you are trying to store has been - * modified since you last fetched it.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_DATA_EXISTS = 12; - - /** - *Item was not stored: but not because of an error. This normally - * means that either the condition for an "add" or a "replace" command - * wasn't met, or that the item is in a delete queue.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_NOTSTORED = 14; - - /** - *Item with this key was not found (with "get" operation or "cas" - * operations).
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_NOTFOUND = 16; - - /** - *Partial network data read error.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_PARTIAL_READ = 18; - - /** - *Some errors occurred during multi-get.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_SOME_ERRORS = 19; - - /** - *Server list is empty.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_NO_SERVERS = 20; - - /** - *End of result set.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_END = 21; - - /** - *System error.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_ERRNO = 26; - - /** - *The operation was buffered.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_BUFFERED = 32; - - /** - *The operation timed out.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_TIMEOUT = 31; - - /** - *Bad key.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_BAD_KEY_PROVIDED = 33; - const RES_STORED = 15; - const RES_DELETED = 22; - const RES_STAT = 24; - const RES_ITEM = 25; - const RES_NOT_SUPPORTED = 28; - const RES_FETCH_NOTFINISHED = 30; - const RES_SERVER_MARKED_DEAD = 35; - const RES_UNKNOWN_STAT_KEY = 36; - const RES_INVALID_HOST_PROTOCOL = 34; - const RES_MEMORY_ALLOCATION_FAILURE = 17; - const RES_E2BIG = 37; - const RES_KEY_TOO_BIG = 39; - const RES_SERVER_TEMPORARILY_DISABLED = 47; - const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48; - const RES_AUTH_PROBLEM = 40; - const RES_AUTH_FAILURE = 41; - const RES_AUTH_CONTINUE = 42; - const RES_CONNECTION_FAILURE = 3; - const RES_CONNECTION_BIND_FAILURE = 4; - const RES_READ_FAILURE = 6; - const RES_DATA_DOES_NOT_EXIST = 13; - const RES_VALUE = 23; - const RES_FAIL_UNIX_SOCKET = 27; - const RES_NO_KEY_PROVIDED = 29; - const RES_INVALID_ARGUMENTS = 38; - const RES_PARSE_ERROR = 43; - const RES_PARSE_USER_ERROR = 44; - const RES_DEPRECATED = 45; - const RES_IN_PROGRESS = 46; - const RES_MAXIMUM_RETURN = 49; - - - - /** - *Failed to create network socket.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11; - - /** - *Payload failure: could not compress/decompress or serialize/unserialize the value.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const RES_PAYLOAD_FAILURE = -1001; - - /** - *The default PHP serializer.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_PHP = 1; - - /** - *The igbinary serializer. - * Instead of textual representation it stores PHP data structures in a - * compact binary form, resulting in space and time gains.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_IGBINARY = 2; - - /** - *The JSON serializer. Requires PHP 5.2.10+.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_JSON = 3; - const SERIALIZER_JSON_ARRAY = 4; - const COMPRESSION_FASTLZ = 2; - const COMPRESSION_ZLIB = 1; - - /** - *A flag for Memcached::getMulti and - * Memcached::getMultiByKey to ensure that the keys are - * returned in the same order as they were requested in. Non-existing keys - * get a default value of NULL.
- * @link https://php.net/manual/en/memcached.constants.php - */ - const GET_PRESERVE_ORDER = 1; - const GET_ERROR_RETURN_VALUE = false; - - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to retrieve. - *
- * @param callable $cache_cb [optional]- * Read-through caching callback or NULL. - *
- * @param int $flags [optional]- * The flags for the get operation. - *
- * @return mixed the value stored in the cache or FALSE otherwise. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function get ($key, callable $cache_cb = null, $flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to fetch. - *
- * @param callable $cache_cb [optional]- * Read-through caching callback or NULL - *
- * @param int $flags [optional]- * The flags for the get operation. - *
- * @return mixed the value stored in the cache or FALSE otherwise. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function getByKey ($server_key, $key, callable $cache_cb = null, $flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * Array of keys to retrieve. - *
- * @param int $flags [optional]- * The flags for the get operation. - *
- * @return mixed the array of found items or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getMulti (array $keys, $flags = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $keys- * Array of keys to retrieve. - *
- * @param int $flags [optional]- * The flags for the get operation. - *
- * @return array|false the array of found items or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getMultiByKey ($server_key, array $keys, $flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * Array of keys to request. - *
- * @param bool $with_cas [optional]- * Whether to request CAS token values also. - *
- * @param callable $value_cb [optional]- * The result callback or NULL. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getDelayed (array $keys, $with_cas = null, callable $value_cb = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $keys- * Array of keys to request. - *
- * @param bool $with_cas [optional]- * Whether to request CAS token values also. - *
- * @param callable $value_cb [optional]- * The result callback or NULL. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function set ($key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function setByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key under which to store the value. - *
- * @param int $expiration- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function touch ($key, $expiration = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param int $expiration- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function touchByKey ($server_key, $key, $expiration) {} - - /** - * (PECL memcached >= 0.1.0)- * An array of key/value pairs to store on the server. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function setMulti (array $items, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $items- * An array of key/value pairs to store on the server. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function setMultiByKey ($server_key, array $items, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * Unique value associated with the existing item. Generated by memcache. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_DATA_EXISTS if the item you are trying - * to store has been modified since you last fetched it. - */ - public function cas ($cas_token, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * Unique value associated with the existing item. Generated by memcache. - *
- * @param string $server_key- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_DATA_EXISTS if the item you are trying - * to store has been modified since you last fetched it. - */ - public function casByKey ($cas_token, $server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key already exists. - */ - public function add ($key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key already exists. - */ - public function addByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param string $value- * The string to append. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function append ($key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param string $value- * The string to append. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function appendByKey ($server_key, $key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to prepend the data to. - *
- * @param string $value- * The string to prepend. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function prepend ($key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to prepend the data to. - *
- * @param string $value- * The string to prepend. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function prependByKey ($server_key, $key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function replace ($key, $value, $expiration = null, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function replaceByKey ($server_key, $key, $value, $expiration = null, $udf_flags = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the item. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function delete ($key, $time = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The keys to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the items. - *
- * @return array Returns array indexed by keys and where values are indicating whether operation succeeded or not. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function deleteMulti (array $keys, $time = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the item. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function deleteByKey ($server_key, $key, $time = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $keys- * The keys to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the items. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function deleteMultiByKey ($server_key, array $keys, $time = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to increment. - *
- * @param int $offset [optional]- * The amount by which to increment the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int|false new item's value on success or FALSE on failure. - */ - public function increment ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to decrement. - *
- * @param int $offset [optional]- * The amount by which to decrement the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int|false item's new value on success or FALSE on failure. - */ - public function decrement ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to increment. - *
- * @param int $offset [optional]- * The amount by which to increment the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int|false new item's value on success or FALSE on failure. - */ - public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to decrement. - *
- * @param int $offset [optional]- * The amount by which to decrement the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int|false item's new value on success or FALSE on failure. - */ - public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The hostname of the memcache server. If the hostname is invalid, data-related - * operations will set - * Memcached::RES_HOST_LOOKUP_FAILURE result code. - *
- * @param int $port- * The port on which memcache is running. Usually, this is - * 11211. - *
- * @param int $weight [optional]- * The weight of the server relative to the total weight of all the - * servers in the pool. This controls the probability of the server being - * selected for operations. This is used only with consistent distribution - * option and usually corresponds to the amount of memory available to - * memcache on that server. - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function addServer ($host, $port, $weight = 0) {} - - /** - * (PECL memcached >= 0.1.1)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @return array an array containing three keys of host, - * port, and weight on success or FALSE - * on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getServerByKey ($server_key) {} - - /** - * (PECL memcached >= 2.0.0)- * Numer of seconds to wait before invalidating the items. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function flush ($delay = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * One of the Memcached::OPT_* constants. - *
- * @return mixed the value of the requested option, or FALSE on - * error. - */ - public function getOption ($option) {} - - /** - * (PECL memcached >= 0.1.0)- * An associative array of options where the key is the option to set and - * the value is the new value for the option. - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function setOptions (array $options) {} - - /** - * (PECL memcached >= 2.0.0)- * The username to use for authentication. - *
- * @param string $password- * The password to use for authentication. - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function setSaslAuthData (string $username , string $password) {} - - /** - * (PECL memcached >= 2.0.0)Enables or disables payload compression. When enabled, + * item values longer than a certain threshold (currently 100 bytes) will be + * compressed during storage and decompressed during retrieval + * transparently.
+ *Type: boolean, default: TRUE.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_COMPRESSION = -1001; + public const OPT_COMPRESSION_TYPE = -1004; + + /** + *This can be used to create a "domain" for your item keys. The value + * specified here will be prefixed to each of the keys. It cannot be + * longer than 128 characters and will reduce the + * maximum available key size. The prefix is applied only to the item keys, + * not to the server keys.
+ *Type: string, default: "".
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_PREFIX_KEY = -1002; + + /** + *+ * Specifies the serializer to use for serializing non-scalar values. + * The valid serializers are Memcached::SERIALIZER_PHP + * or Memcached::SERIALIZER_IGBINARY. The latter is + * supported only when memcached is configured with + * --enable-memcached-igbinary option and the + * igbinary extension is loaded. + *
+ *Type: integer, default: Memcached::SERIALIZER_PHP.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_SERIALIZER = -1003; + + /** + *Indicates whether igbinary serializer support is available.
+ *Type: boolean.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HAVE_IGBINARY = false; + + /** + *Indicates whether JSON serializer support is available.
+ *Type: boolean.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HAVE_JSON = false; + + /** + *Indicates whether msgpack serializer support is available.
+ *Type: boolean.
+ * Available as of Memcached 3.0.0. + * @since 3.0.0 + * @link https://php.net/manual/en/memcached.constants.php + */ + public const HAVE_MSGPACK = false; + + /** + *Indicate whether set_encoding_key is available
+ *Type: boolean.
+ * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php, https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/php_memcached.c#L4387 + */ + public const HAVE_ENCODING = false; + + /** + * Feature support + */ + public const HAVE_SESSION = true; + public const HAVE_SASL = false; + + /** + *Specifies the hashing algorithm used for the item keys. The valid + * values are supplied via Memcached::HASH_* constants. + * Each hash algorithm has its advantages and its disadvantages. Go with the + * default if you don't know or don't care.
+ *Type: integer, default: Memcached::HASH_DEFAULT
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_HASH = 2; + + /** + *The default (Jenkins one-at-a-time) item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_DEFAULT = 0; + + /** + *MD5 item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_MD5 = 1; + + /** + *CRC item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_CRC = 2; + + /** + *FNV1_64 item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_FNV1_64 = 3; + + /** + *FNV1_64A item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_FNV1A_64 = 4; + + /** + *FNV1_32 item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_FNV1_32 = 5; + + /** + *FNV1_32A item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_FNV1A_32 = 6; + + /** + *Hsieh item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_HSIEH = 7; + + /** + *Murmur item key hashing algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const HASH_MURMUR = 8; + + /** + *Specifies the method of distributing item keys to the servers. + * Currently supported methods are modulo and consistent hashing. Consistent + * hashing delivers better distribution and allows servers to be added to + * the cluster with minimal cache losses.
+ *Type: integer, default: Memcached::DISTRIBUTION_MODULA.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_DISTRIBUTION = 9; + + /** + *Modulo-based key distribution algorithm.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const DISTRIBUTION_MODULA = 0; + + /** + *Consistent hashing key distribution algorithm (based on libketama).
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const DISTRIBUTION_CONSISTENT = 1; + public const DISTRIBUTION_VIRTUAL_BUCKET = 6; + + /** + *Enables or disables compatibility with libketama-like behavior. When + * enabled, the item key hashing algorithm is set to MD5 and distribution is + * set to be weighted consistent hashing distribution. This is useful + * because other libketama-based clients (Python, Ruby, etc.) with the same + * server configuration will be able to access the keys transparently. + *
+ *+ * It is highly recommended to enable this option if you want to use + * consistent hashing, and it may be enabled by default in future + * releases. + *
+ *Type: boolean, default: FALSE.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_LIBKETAMA_COMPATIBLE = 16; + public const OPT_LIBKETAMA_HASH = 17; + public const OPT_TCP_KEEPALIVE = 32; + + /** + *Enables or disables buffered I/O. Enabling buffered I/O causes + * storage commands to "buffer" instead of being sent. Any action that + * retrieves data causes this buffer to be sent to the remote connection. + * Quitting the connection or closing down the connection will also cause + * the buffered data to be pushed to the remote connection.
+ *Type: boolean, default: FALSE.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_BUFFER_WRITES = 10; + + /** + *Enable the use of the binary protocol. Please note that you cannot + * toggle this option on an open connection.
+ *Type: boolean, default: FALSE.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_BINARY_PROTOCOL = 18; + + /** + *Enables or disables asynchronous I/O. This is the fastest transport + * available for storage functions.
+ *Type: boolean, default: FALSE.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_NO_BLOCK = 0; + + /** + *Enables or disables the no-delay feature for connecting sockets (may + * be faster in some environments).
+ *Type: boolean, default: FALSE.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_TCP_NODELAY = 1; + + /** + *The maximum socket send buffer in bytes.
+ *Type: integer, default: varies by platform/kernel + * configuration.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_SOCKET_SEND_SIZE = 4; + + /** + *The maximum socket receive buffer in bytes.
+ *Type: integer, default: varies by platform/kernel + * configuration.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_SOCKET_RECV_SIZE = 5; + + /** + *In non-blocking mode this set the value of the timeout during socket + * connection, in milliseconds.
+ *Type: integer, default: 1000.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_CONNECT_TIMEOUT = 14; + + /** + *The amount of time, in seconds, to wait until retrying a failed + * connection attempt.
+ *Type: integer, default: 0.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_RETRY_TIMEOUT = 15; + + /** + *Socket sending timeout, in microseconds. In cases where you cannot + * use non-blocking I/O this will allow you to still have timeouts on the + * sending of data.
+ *Type: integer, default: 0.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_SEND_TIMEOUT = 19; + + /** + *Socket reading timeout, in microseconds. In cases where you cannot + * use non-blocking I/O this will allow you to still have timeouts on the + * reading of data.
+ *Type: integer, default: 0.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_RECV_TIMEOUT = 20; + + /** + *Timeout for connection polling, in milliseconds.
+ *Type: integer, default: 1000.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_POLL_TIMEOUT = 8; + + /** + *Enables or disables caching of DNS lookups.
+ *Type: boolean, default: FALSE.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_CACHE_LOOKUPS = 6; + + /** + *Specifies the failure limit for server connection attempts. The + * server will be removed after this many continuous connection + * failures.
+ *Type: integer, default: 0.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const OPT_SERVER_FAILURE_LIMIT = 21; + public const OPT_AUTO_EJECT_HOSTS = 28; + public const OPT_HASH_WITH_PREFIX_KEY = 25; + public const OPT_NOREPLY = 26; + public const OPT_SORT_HOSTS = 12; + public const OPT_VERIFY_KEY = 13; + public const OPT_USE_UDP = 27; + public const OPT_NUMBER_OF_REPLICAS = 29; + public const OPT_RANDOMIZE_REPLICA_READ = 30; + public const OPT_CORK = 31; + public const OPT_REMOVE_FAILED_SERVERS = 35; + public const OPT_DEAD_TIMEOUT = 36; + public const OPT_SERVER_TIMEOUT_LIMIT = 37; + public const OPT_MAX = 38; + public const OPT_IO_BYTES_WATERMARK = 23; + public const OPT_IO_KEY_PREFETCH = 24; + public const OPT_IO_MSG_WATERMARK = 22; + public const OPT_LOAD_FROM_FILE = 34; + public const OPT_SUPPORT_CAS = 7; + public const OPT_TCP_KEEPIDLE = 33; + public const OPT_USER_DATA = 11; + + /** + * libmemcached result codes + */ + /** + *The operation was successful.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_SUCCESS = 0; + + /** + *The operation failed in some fashion.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_FAILURE = 1; + + /** + *DNS lookup failed.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_HOST_LOOKUP_FAILURE = 2; + + /** + *Failed to read network data.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_UNKNOWN_READ_FAILURE = 7; + + /** + *Bad command in memcached protocol.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_PROTOCOL_ERROR = 8; + + /** + *Error on the client side.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_CLIENT_ERROR = 9; + + /** + *Error on the server side.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_SERVER_ERROR = 10; + + /** + *Failed to write network data.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_WRITE_FAILURE = 5; + + /** + *Failed to do compare-and-swap: item you are trying to store has been + * modified since you last fetched it.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_DATA_EXISTS = 12; + + /** + *Item was not stored: but not because of an error. This normally + * means that either the condition for an "add" or a "replace" command + * wasn't met, or that the item is in a delete queue.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_NOTSTORED = 14; + + /** + *Item with this key was not found (with "get" operation or "cas" + * operations).
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_NOTFOUND = 16; + + /** + *Partial network data read error.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_PARTIAL_READ = 18; + + /** + *Some errors occurred during multi-get.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_SOME_ERRORS = 19; + + /** + *Server list is empty.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_NO_SERVERS = 20; + + /** + *End of result set.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_END = 21; + + /** + *System error.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_ERRNO = 26; + + /** + *The operation was buffered.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_BUFFERED = 32; + + /** + *The operation timed out.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_TIMEOUT = 31; + + /** + *Bad key.
+ * @link https://php.net/manual/en/memcached.constants.php, http://docs.libmemcached.org/index.html + */ + /** + *MEMCACHED_BAD_KEY_PROVIDED: The key provided is not a valid key.
+ */ + public const RES_BAD_KEY_PROVIDED = 33; + + /** + *MEMCACHED_STORED: The requested object has been successfully stored on the server.
+ */ + public const RES_STORED = 15; + + /** + *MEMCACHED_DELETED: The object requested by the key has been deleted.
+ */ + public const RES_DELETED = 22; + + /** + *MEMCACHED_STAT: A “stat” command has been returned in the protocol.
+ */ + public const RES_STAT = 24; + + /** + *MEMCACHED_ITEM: An item has been fetched (this is an internal error only).
+ */ + public const RES_ITEM = 25; + + /** + *MEMCACHED_NOT_SUPPORTED: The given method is not supported in the server.
+ */ + public const RES_NOT_SUPPORTED = 28; + + /** + *MEMCACHED_FETCH_NOTFINISHED: A request has been made, but the server has not finished the fetch of the last request.
+ */ + public const RES_FETCH_NOTFINISHED = 30; + + /** + *MEMCACHED_SERVER_MARKED_DEAD: The requested server has been marked dead.
+ */ + public const RES_SERVER_MARKED_DEAD = 35; + + /** + *MEMCACHED_UNKNOWN_STAT_KEY: The server you are communicating with has a stat key which has not be defined in the protocol.
+ */ + public const RES_UNKNOWN_STAT_KEY = 36; + + /** + *MEMCACHED_INVALID_HOST_PROTOCOL: The server you are connecting too has an invalid protocol. Most likely you are connecting to an older server that does not speak the binary protocol.
+ */ + public const RES_INVALID_HOST_PROTOCOL = 34; + + /** + *MEMCACHED_MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory.
+ */ + public const RES_MEMORY_ALLOCATION_FAILURE = 17; + + /** + *MEMCACHED_E2BIG: Item is too large for the server to store.
+ */ + public const RES_E2BIG = 37; + + /** + *MEMCACHED_KEY_TOO_BIG: The key that has been provided is too large for the given server.
+ */ + public const RES_KEY_TOO_BIG = 39; + + /** + *MEMCACHED_SERVER_TEMPORARILY_DISABLED
+ */ + public const RES_SERVER_TEMPORARILY_DISABLED = 47; + + /** + *MEMORY_ALLOCATION_FAILURE: An error has occurred while trying to allocate memory. + * + * #if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000008
+ */ + public const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48; + + /** + *MEMCACHED_AUTH_PROBLEM: An unknown issue has occured during authentication.
+ */ + public const RES_AUTH_PROBLEM = 40; + + /** + *MEMCACHED_AUTH_FAILURE: The credentials provided are not valid for this server.
+ */ + public const RES_AUTH_FAILURE = 41; + + /** + *MEMCACHED_AUTH_CONTINUE: Authentication has been paused.
+ */ + public const RES_AUTH_CONTINUE = 42; + + /** + *MEMCACHED_CONNECTION_FAILURE: A unknown error has occured while trying to connect to a server.
+ */ + public const RES_CONNECTION_FAILURE = 3; + + /** + * MEMCACHED_CONNECTION_BIND_FAILURE: We were not able to bind() to the socket. + */ + #[Deprecated('Deprecated since version 0.30(libmemcached)')] + public const RES_CONNECTION_BIND_FAILURE = 4; + + /** + *MEMCACHED_READ_FAILURE: A read failure has occurred.
+ */ + public const RES_READ_FAILURE = 6; + + /** + *MEMCACHED_DATA_DOES_NOT_EXIST: The data requested with the key given was not found.
+ */ + public const RES_DATA_DOES_NOT_EXIST = 13; + + /** + *MEMCACHED_VALUE: A value has been returned from the server (this is an internal condition only).
+ */ + public const RES_VALUE = 23; + + /** + *MEMCACHED_FAIL_UNIX_SOCKET: A connection was not established with the server via a unix domain socket.
+ */ + public const RES_FAIL_UNIX_SOCKET = 27; + + /** + * No key was provided. + */ + #[Deprecated('Deprecated since version 0.30 (libmemcached). Use MEMCACHED_BAD_KEY_PROVIDED instead.')] + public const RES_NO_KEY_PROVIDED = 29; + + /** + *MEMCACHED_INVALID_ARGUMENTS: The arguments supplied to the given function were not valid.
+ */ + public const RES_INVALID_ARGUMENTS = 38; + + /** + *MEMCACHED_PARSE_ERROR: An error has occurred while trying to parse the configuration string. You should use memparse to determine what the error was.
+ */ + public const RES_PARSE_ERROR = 43; + + /** + *MEMCACHED_PARSE_USER_ERROR: An error has occurred in parsing the configuration string.
+ */ + public const RES_PARSE_USER_ERROR = 44; + + /** + *MEMCACHED_DEPRECATED: The method that was requested has been deprecated.
+ */ + public const RES_DEPRECATED = 45; + + //unknow + public const RES_IN_PROGRESS = 46; + + /** + *MEMCACHED_MAXIMUM_RETURN: This in an internal only state.
+ */ + public const RES_MAXIMUM_RETURN = 49; + + /** + * Server callbacks, if compiled with --memcached-protocol + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php + */ + public const ON_CONNECT = 0; + public const ON_ADD = 1; + public const ON_APPEND = 2; + public const ON_DECREMENT = 3; + public const ON_DELETE = 4; + public const ON_FLUSH = 5; + public const ON_GET = 6; + public const ON_INCREMENT = 7; + public const ON_NOOP = 8; + public const ON_PREPEND = 9; + public const ON_QUIT = 10; + public const ON_REPLACE = 11; + public const ON_SET = 12; + public const ON_STAT = 13; + public const ON_VERSION = 14; + + /** + * Constants used when compiled with --memcached-protocol + * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php + */ + public const RESPONSE_SUCCESS = 0; + public const RESPONSE_KEY_ENOENT = 1; + public const RESPONSE_KEY_EEXISTS = 2; + public const RESPONSE_E2BIG = 3; + public const RESPONSE_EINVAL = 4; + public const RESPONSE_NOT_STORED = 5; + public const RESPONSE_DELTA_BADVAL = 6; + public const RESPONSE_NOT_MY_VBUCKET = 7; + public const RESPONSE_AUTH_ERROR = 32; + public const RESPONSE_AUTH_CONTINUE = 33; + public const RESPONSE_UNKNOWN_COMMAND = 129; + public const RESPONSE_ENOMEM = 130; + public const RESPONSE_NOT_SUPPORTED = 131; + public const RESPONSE_EINTERNAL = 132; + public const RESPONSE_EBUSY = 133; + public const RESPONSE_ETMPFAIL = 134; + + /** + *Failed to create network socket.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11; + + /** + *Payload failure: could not compress/decompress or serialize/unserialize the value.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const RES_PAYLOAD_FAILURE = -1001; + + /** + *The default PHP serializer.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const SERIALIZER_PHP = 1; + + /** + *The igbinary serializer. + * Instead of textual representation it stores PHP data structures in a + * compact binary form, resulting in space and time gains.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const SERIALIZER_IGBINARY = 2; + + /** + *The JSON serializer. Requires PHP 5.2.10+.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const SERIALIZER_JSON = 3; + public const SERIALIZER_JSON_ARRAY = 4; + + /** + *The msgpack serializer.
+ * @link https://github.com/php-memcached-dev/php-memcached/blob/v3.1.5/memcached-api.php + */ + public const SERIALIZER_MSGPACK = 5; + public const COMPRESSION_FASTLZ = 2; + public const COMPRESSION_ZLIB = 1; + + /** + *A flag for Memcached::getMulti and + * Memcached::getMultiByKey to ensure that the keys are + * returned in the same order as they were requested in. Non-existing keys + * get a default value of NULL.
+ * @link https://php.net/manual/en/memcached.constants.php + */ + public const GET_PRESERVE_ORDER = 1; + + /** + * A flag for Memcached::get(), Memcached::getMulti() and + * Memcached::getMultiByKey() to ensure that the CAS token values are returned as well. + * @link https://php.net/manual/en/memcached.constants.php + * @since 3.0.0 + */ + public const GET_EXTENDED = 2; + public const GET_ERROR_RETURN_VALUE = false; + + /** + * (PECL memcached >= 0.1.0)+ * The key of the item to retrieve. + *
+ * @param callable $cache_cb [optional]+ * Read-through caching callback or NULL. + *
+ * @param int $flags [optional]+ * The flags for the get operation. + *
+ * @return mixed the value stored in the cache or FALSE otherwise. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function get($key, callable $cache_cb = null, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key of the item to fetch. + *
+ * @param callable $cache_cb [optional]+ * Read-through caching callback or NULL + *
+ * @param int $flags [optional]+ * The flags for the get operation. + *
+ * @return mixed the value stored in the cache or FALSE otherwise. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function getByKey($server_key, $key, callable $cache_cb = null, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * Array of keys to retrieve. + *
+ * @param int $flags [optional]+ * The flags for the get operation. + *
+ * @return mixed the array of found items or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getMulti(array $keys, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param array $keys+ * Array of keys to retrieve. + *
+ * @param int $flags [optional]+ * The flags for the get operation. + *
+ * @return array|false the array of found items or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getMultiByKey($server_key, array $keys, $flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * Array of keys to request. + *
+ * @param bool $with_cas [optional]+ * Whether to request CAS token values also. + *
+ * @param callable $value_cb [optional]+ * The result callback or NULL. + *
+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getDelayed(array $keys, $with_cas = null, callable $value_cb = null) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param array $keys+ * Array of keys to request. + *
+ * @param bool $with_cas [optional]+ * Whether to request CAS token values also. + *
+ * @param callable $value_cb [optional]+ * The result callback or NULL. + *
+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getDelayedByKey($server_key, array $keys, $with_cas = null, callable $value_cb = null) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function set($key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function setByKey($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 2.0.0)+ * The key under which to store the value. + *
+ * @param int $expiration+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function touch($key, $expiration = 0) {} + + /** + * (PECL memcached >= 2.0.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key under which to store the value. + *
+ * @param int $expiration+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function touchByKey($server_key, $key, $expiration) {} + + /** + * (PECL memcached >= 0.1.0)+ * An array of key/value pairs to store on the server. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function setMulti(array $items, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param array $items+ * An array of key/value pairs to store on the server. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function setMultiByKey($server_key, array $items, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * Unique value associated with the existing item. Generated by memcache. + *
+ * @param string $key+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_DATA_EXISTS if the item you are trying + * to store has been modified since you last fetched it. + */ + public function cas($cas_token, $key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * Unique value associated with the existing item. Generated by memcache. + *
+ * @param string $server_key+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_DATA_EXISTS if the item you are trying + * to store has been modified since you last fetched it. + */ + public function casByKey($cas_token, $server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key already exists. + */ + public function add($key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key already exists. + */ + public function addByKey($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key under which to store the value. + *
+ * @param string $value+ * The string to append. + *
+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function append($key, $value) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key under which to store the value. + *
+ * @param string $value+ * The string to append. + *
+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function appendByKey($server_key, $key, $value) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key of the item to prepend the data to. + *
+ * @param string $value+ * The string to prepend. + *
+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function prepend($key, $value) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key of the item to prepend the data to. + *
+ * @param string $value+ * The string to prepend. + *
+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function prependByKey($server_key, $key, $value) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function replace($key, $value, $expiration = null, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key under which to store the value. + *
+ * @param mixed $value+ * The value to store. + *
+ * @param int $expiration [optional]+ * The expiration time, defaults to 0. See Expiration Times for more info. + *
+ * @param int $udf_flags [optional] + * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTSTORED if the key does not exist. + */ + public function replaceByKey($server_key, $key, $value, $expiration = null, $udf_flags = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key to be deleted. + *
+ * @param int $time [optional]+ * The amount of time the server will wait to delete the item. + *
+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function delete($key, $time = 0) {} + + /** + * (PECL memcached >= 2.0.0)+ * The keys to be deleted. + *
+ * @param int $time [optional]+ * The amount of time the server will wait to delete the items. + *
+ * @return array Returns array indexed by keys and where values are indicating whether operation succeeded or not. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function deleteMulti(array $keys, $time = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key to be deleted. + *
+ * @param int $time [optional]+ * The amount of time the server will wait to delete the item. + *
+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function deleteByKey($server_key, $key, $time = 0) {} + + /** + * (PECL memcached >= 2.0.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param array $keys+ * The keys to be deleted. + *
+ * @param int $time [optional]+ * The amount of time the server will wait to delete the items. + *
+ * @return bool TRUE on success or FALSE on failure. + * The Memcached::getResultCode will return + * Memcached::RES_NOTFOUND if the key does not exist. + */ + public function deleteMultiByKey($server_key, array $keys, $time = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key of the item to increment. + *
+ * @param int $offset [optional]+ * The amount by which to increment the item's value. + *
+ * @param int $initial_value [optional]+ * The value to set the item to if it doesn't currently exist. + *
+ * @param int $expiry [optional]+ * The expiry time to set on the item. + *
+ * @return int|false new item's value on success or FALSE on failure. + */ + public function increment($key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The key of the item to decrement. + *
+ * @param int $offset [optional]+ * The amount by which to decrement the item's value. + *
+ * @param int $initial_value [optional]+ * The value to set the item to if it doesn't currently exist. + *
+ * @param int $expiry [optional]+ * The expiry time to set on the item. + *
+ * @return int|false item's new value on success or FALSE on failure. + */ + public function decrement($key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 2.0.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key of the item to increment. + *
+ * @param int $offset [optional]+ * The amount by which to increment the item's value. + *
+ * @param int $initial_value [optional]+ * The value to set the item to if it doesn't currently exist. + *
+ * @param int $expiry [optional]+ * The expiry time to set on the item. + *
+ * @return int|false new item's value on success or FALSE on failure. + */ + public function incrementByKey($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 2.0.0)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @param string $key+ * The key of the item to decrement. + *
+ * @param int $offset [optional]+ * The amount by which to decrement the item's value. + *
+ * @param int $initial_value [optional]+ * The value to set the item to if it doesn't currently exist. + *
+ * @param int $expiry [optional]+ * The expiry time to set on the item. + *
+ * @return int|false item's new value on success or FALSE on failure. + */ + public function decrementByKey($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * The hostname of the memcache server. If the hostname is invalid, data-related + * operations will set + * Memcached::RES_HOST_LOOKUP_FAILURE result code. + *
+ * @param int $port+ * The port on which memcache is running. Usually, this is + * 11211. + *
+ * @param int $weight [optional]+ * The weight of the server relative to the total weight of all the + * servers in the pool. This controls the probability of the server being + * selected for operations. This is used only with consistent distribution + * option and usually corresponds to the amount of memory available to + * memcache on that server. + *
+ * @return bool TRUE on success or FALSE on failure. + */ + public function addServer($host, $port, $weight = 0) {} + + /** + * (PECL memcached >= 0.1.1)+ * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. + *
+ * @return array an array containing three keys of host, + * port, and weight on success or FALSE + * on failure. + * Use Memcached::getResultCode if necessary. + */ + public function getServerByKey($server_key) {} + + /** + * (PECL memcached >= 2.0.0)items, slabs, sizes ...
+ * @return array|false Array of server statistics, one entry per server. + */ + public function getStats($type = null) {} + + /** + * (PECL memcached >= 0.1.5)+ * Numer of seconds to wait before invalidating the items. + *
+ * @return bool TRUE on success or FALSE on failure. + * Use Memcached::getResultCode if necessary. + */ + public function flush($delay = 0) {} + + /** + * (PECL memcached >= 0.1.0)+ * One of the Memcached::OPT_* constants. + *
+ * @return mixed the value of the requested option, or FALSE on + * error. + */ + public function getOption($option) {} + + /** + * (PECL memcached >= 0.1.0)+ * An associative array of options where the key is the option to set and + * the value is the new value for the option. + *
+ * @return bool TRUE on success or FALSE on failure. + */ + public function setOptions(array $options) {} + + /** + * (PECL memcached >= 2.0.0)+ * The username to use for authentication. + *
+ * @param string $password+ * The password to use for authentication. + *
+ * @return void + */ + public function setSaslAuthData(string $username, string $password) {} + + /** + * (PECL memcached >= 2.0.0)"age"
and "name"
, and the corresponding types are "int"
and "string"
.
+ */
+#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER|Attribute::TARGET_PROPERTY)]
+class ObjectShape
+{
+ public function __construct(array $shape) {}
+}
diff --git a/meta/attributes/Pure.php b/meta/attributes/Pure.php
new file mode 100644
index 000000000..6450bcda4
--- /dev/null
+++ b/meta/attributes/Pure.php
@@ -0,0 +1,20 @@
+ "@"]));
+override(\Mockery::spy(0), map(["" => "@"]));
+override(\Mockery::namedMock(0), map(["" => "@"]));
+override(\Mockery::instanceMock(0), map(["" => "@"]));
+override(\mock(0), map(["" => "@"]));
+override(\spy(0), map(["" => "@"]));
+override(\namedMock(0), map(["" => "@"]));
\ No newline at end of file
diff --git a/meta/phpunit/.phpstorm.meta.php b/meta/phpunit/.phpstorm.meta.php
new file mode 100644
index 000000000..4e08f9500
--- /dev/null
+++ b/meta/phpunit/.phpstorm.meta.php
@@ -0,0 +1,73 @@
+ "$0"])
+ );
+
+ override(
+ \PHPUnit\Framework\TestCase::createStub(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit\Framework\TestCase::createConfiguredMock(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit\Framework\TestCase::createPartialMock(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit\Framework\TestCase::createTestProxy(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit\Framework\TestCase::getMockForAbstractClass(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit\Framework\TestCase::getMockForTrait(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit_Framework_TestCase::createMock(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit_Framework_TestCase::createConfiguredMock(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit_Framework_TestCase::createPartialMock(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit_Framework_TestCase::getMockForAbstractClass(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit_Framework_TestCase::getMock(0),
+ map(["" => "$0"])
+ );
+
+ override(
+ \PHPUnit_Framework_TestCase::getMockWithoutInvokingTheOriginalConstructor(0),
+ map(["" => "$0"])
+ );
+}
diff --git a/meta/psr/log/.phpstorm.meta.php b/meta/psr/log/.phpstorm.meta.php
new file mode 100644
index 000000000..054240a8c
--- /dev/null
+++ b/meta/psr/log/.phpstorm.meta.php
@@ -0,0 +1,5 @@
+
+ * @param int $threshold * The Threshold. Lower is more accurate, hence larger file size. *
- * @return void + * @return void */ -function ming_setcubicthreshold ($threshold) {} +function ming_setcubicthreshold($threshold) {} /** * Set the global scaling factor. * @link https://php.net/manual/en/function.ming-setscale.php - * @param $scale int+ * @param float $scale
* The scale to be set. *
- * @return void + * @return void */ -function ming_setscale ($scale) {} +function ming_setscale($scale) {} /** * Sets the SWF version * @link https://php.net/manual/en/function.ming-useswfversion.php - * @param $version int+ * @param int $version
* SWF version to use. *
- * @return void + * @return void */ -function ming_useswfversion ($version) {} +function ming_useswfversion($version) {} /** * Returns the action flag for keyPress(char) * @link https://php.net/manual/en/function.ming-keypress.php - * @param $char string + * @param string $char * @return int What the function returns, first on success, then on failure. See * also the &return.success; entity */ -function ming_keypress ($char) {} +function ming_keypress($char) {} /** * Use constant pool * @link https://php.net/manual/en/function.ming-useconstants.php - * @param $use int+ * @param int $use
* Its description *
- * @return void + * @return void */ -function ming_useconstants ($use) {} +function ming_useconstants($use) {} /** * Sets the SWF output compression * @link https://php.net/manual/en/function.ming-setswfcompression.php - * @param $level int- * The new compression level. Should be a value between 1 and 9 + * @param int $level
+ * The new compression level. Should be a value between 1 and 9 * inclusive. *
- * @return void + * @return void */ -function ming_setswfcompression ($level) {} - -define ('MING_NEW', 1); -define ('MING_ZLIB', 1); -define ('SWFBUTTON_HIT', 8); -define ('SWFBUTTON_DOWN', 4); -define ('SWFBUTTON_OVER', 2); -define ('SWFBUTTON_UP', 1); -define ('SWFBUTTON_MOUSEUPOUTSIDE', 64); -define ('SWFBUTTON_DRAGOVER', 160); -define ('SWFBUTTON_DRAGOUT', 272); -define ('SWFBUTTON_MOUSEUP', 8); -define ('SWFBUTTON_MOUSEDOWN', 4); -define ('SWFBUTTON_MOUSEOUT', 2); -define ('SWFBUTTON_MOUSEOVER', 1); -define ('SWFFILL_RADIAL_GRADIENT', 18); -define ('SWFFILL_LINEAR_GRADIENT', 16); -define ('SWFFILL_TILED_BITMAP', 64); -define ('SWFFILL_CLIPPED_BITMAP', 65); -define ('SWFTEXTFIELD_HASLENGTH', 2); -define ('SWFTEXTFIELD_NOEDIT', 8); -define ('SWFTEXTFIELD_PASSWORD', 16); -define ('SWFTEXTFIELD_MULTILINE', 32); -define ('SWFTEXTFIELD_WORDWRAP', 64); -define ('SWFTEXTFIELD_DRAWBOX', 2048); -define ('SWFTEXTFIELD_NOSELECT', 4096); -define ('SWFTEXTFIELD_HTML', 512); -define ('SWFTEXTFIELD_USEFONT', 256); -define ('SWFTEXTFIELD_AUTOSIZE', 16384); -define ('SWFTEXTFIELD_ALIGN_LEFT', 0); -define ('SWFTEXTFIELD_ALIGN_RIGHT', 1); -define ('SWFTEXTFIELD_ALIGN_CENTER', 2); -define ('SWFTEXTFIELD_ALIGN_JUSTIFY', 3); -define ('SWFACTION_ONLOAD', 1); -define ('SWFACTION_ENTERFRAME', 2); -define ('SWFACTION_UNLOAD', 4); -define ('SWFACTION_MOUSEMOVE', 8); -define ('SWFACTION_MOUSEDOWN', 16); -define ('SWFACTION_MOUSEUP', 32); -define ('SWFACTION_KEYDOWN', 64); -define ('SWFACTION_KEYUP', 128); -define ('SWFACTION_DATA', 256); -define ('SWF_SOUND_NOT_COMPRESSED', 0); -define ('SWF_SOUND_ADPCM_COMPRESSED', 16); -define ('SWF_SOUND_MP3_COMPRESSED', 32); -define ('SWF_SOUND_NOT_COMPRESSED_LE', 48); -define ('SWF_SOUND_NELLY_COMPRESSED', 96); -define ('SWF_SOUND_5KHZ', 0); -define ('SWF_SOUND_11KHZ', 4); -define ('SWF_SOUND_22KHZ', 8); -define ('SWF_SOUND_44KHZ', 12); -define ('SWF_SOUND_8BITS', 0); -define ('SWF_SOUND_16BITS', 2); -define ('SWF_SOUND_MONO', 0); -define ('SWF_SOUND_STEREO', 1); +function ming_setswfcompression($level) {} + +define('MING_NEW', 1); +define('MING_ZLIB', 1); +define('SWFBUTTON_HIT', 8); +define('SWFBUTTON_DOWN', 4); +define('SWFBUTTON_OVER', 2); +define('SWFBUTTON_UP', 1); +define('SWFBUTTON_MOUSEUPOUTSIDE', 64); +define('SWFBUTTON_DRAGOVER', 160); +define('SWFBUTTON_DRAGOUT', 272); +define('SWFBUTTON_MOUSEUP', 8); +define('SWFBUTTON_MOUSEDOWN', 4); +define('SWFBUTTON_MOUSEOUT', 2); +define('SWFBUTTON_MOUSEOVER', 1); +define('SWFFILL_RADIAL_GRADIENT', 18); +define('SWFFILL_LINEAR_GRADIENT', 16); +define('SWFFILL_TILED_BITMAP', 64); +define('SWFFILL_CLIPPED_BITMAP', 65); +define('SWFTEXTFIELD_HASLENGTH', 2); +define('SWFTEXTFIELD_NOEDIT', 8); +define('SWFTEXTFIELD_PASSWORD', 16); +define('SWFTEXTFIELD_MULTILINE', 32); +define('SWFTEXTFIELD_WORDWRAP', 64); +define('SWFTEXTFIELD_DRAWBOX', 2048); +define('SWFTEXTFIELD_NOSELECT', 4096); +define('SWFTEXTFIELD_HTML', 512); +define('SWFTEXTFIELD_USEFONT', 256); +define('SWFTEXTFIELD_AUTOSIZE', 16384); +define('SWFTEXTFIELD_ALIGN_LEFT', 0); +define('SWFTEXTFIELD_ALIGN_RIGHT', 1); +define('SWFTEXTFIELD_ALIGN_CENTER', 2); +define('SWFTEXTFIELD_ALIGN_JUSTIFY', 3); +define('SWFACTION_ONLOAD', 1); +define('SWFACTION_ENTERFRAME', 2); +define('SWFACTION_UNLOAD', 4); +define('SWFACTION_MOUSEMOVE', 8); +define('SWFACTION_MOUSEDOWN', 16); +define('SWFACTION_MOUSEUP', 32); +define('SWFACTION_KEYDOWN', 64); +define('SWFACTION_KEYUP', 128); +define('SWFACTION_DATA', 256); +define('SWF_SOUND_NOT_COMPRESSED', 0); +define('SWF_SOUND_ADPCM_COMPRESSED', 16); +define('SWF_SOUND_MP3_COMPRESSED', 32); +define('SWF_SOUND_NOT_COMPRESSED_LE', 48); +define('SWF_SOUND_NELLY_COMPRESSED', 96); +define('SWF_SOUND_5KHZ', 0); +define('SWF_SOUND_11KHZ', 4); +define('SWF_SOUND_22KHZ', 8); +define('SWF_SOUND_44KHZ', 12); +define('SWF_SOUND_8BITS', 0); +define('SWF_SOUND_16BITS', 2); +define('SWF_SOUND_MONO', 0); +define('SWF_SOUND_STEREO', 1); // End of ming v. -?> diff --git a/mongo/mongo.php b/mongo/mongo.php index 740eaa14f..49a274f1f 100644 --- a/mongo/mongo.php +++ b/mongo/mongo.php @@ -7,6 +7,8 @@ * MongoClient: https://github.com/djsipe/PHP-Stubs */ +use JetBrains\PhpStorm\Deprecated; + /** * A connection between PHP and MongoDB. This class is used to create and manage connections * See MongoClient::__construct() and the section on connecting for more information about creating connections. @@ -14,20 +16,20 @@ */ class MongoClient { - const VERSION = '3.x'; - const DEFAULT_HOST = "localhost" ; - const DEFAULT_PORT = 27017 ; - const RP_PRIMARY = "primary" ; - const RP_PRIMARY_PREFERRED = "primaryPreferred" ; - const RP_SECONDARY = "secondary" ; - const RP_SECONDARY_PREFERRED = "secondaryPreferred" ; - const RP_NEAREST = "nearest" ; + public const VERSION = '3.x'; + public const DEFAULT_HOST = "localhost"; + public const DEFAULT_PORT = 27017; + public const RP_PRIMARY = "primary"; + public const RP_PRIMARY_PREFERRED = "primaryPreferred"; + public const RP_SECONDARY = "secondary"; + public const RP_SECONDARY_PREFERRED = "secondaryPreferred"; + public const RP_NEAREST = "nearest"; /* Properties */ - public $connected = FALSE ; - public $status = NULL ; - protected $server = NULL ; - protected $persistent = NULL ; + public $connected = false; + public $status = null; + protected $server = null; + protected $persistent = null; /* Methods */ /** @@ -100,7 +102,7 @@ class MongoClient * * @throws MongoConnectionException */ - public function __construct($server = "mongodb://localhost:27017", array $options = array("connect" => TRUE), $driver_options) {} + public function __construct($server = "mongodb://localhost:27017", array $options = ["connect" => true], $driver_options) {} /** * (PECL mongo >= 1.3.0)+ * @param bool|string $connection [optional]
* If connection is not given, or FALSE then connection that would be selected for writes would be closed. In a single-node configuration, that is then the whole connection, but if you are connected to a replica set, close() will only close the connection to the primary server.
* If connection is TRUE then all connections as known by the connection manager will be closed. This can include connections that are not referenced in the connection string used to create the object that you are calling close on.
* If connection is a string argument, then it will only close the connection identified by this hash. Hashes are identifiers for a connection and can be obtained by calling {@see MongoClient::getConnections()}.
@@ -116,6 +118,7 @@ public function __construct($server = "mongodb://localhost:27017", array $option
* @return bool If the connection was successfully closed.
*/
public function close($connection) {}
+
/**
* Connects to a database server
*
@@ -127,13 +130,13 @@ public function close($connection) {}
public function connect() {}
/**
- * @deprecated Use MongoDB::drop() instead.
* Drops a database
*
* @link https://secure.php.net/manual/en/mongoclient.dropdb.php
* @param mixed $db The database to drop. Can be a MongoDB object or the name of the database.
* @return array The database response.
*/
+ #[Deprecated(replacement: "%class%->drop()")]
public function dropDB($db) {}
/**
@@ -143,17 +146,14 @@ public function dropDB($db) {}
* @param string $dbname The database name.
* @return MongoDB The database name.
*/
- public function __get ($dbname)
- {}
+ public function __get($dbname) {}
/**
* Get connections
* Returns an array of all open connections, and information about each of the servers
- * @static
* @return array
*/
- static public function getConnections ()
- {}
+ public static function getConnections() {}
/**
* Get hosts
@@ -162,16 +162,14 @@ static public function getConnections ()
* connected to.
* @return array
*/
- public function getHosts ()
- {}
+ public function getHosts() {}
/**
* Get read preference
* Get the read preference for this connection
* @return array
*/
- public function getReadPreference ()
- {}
+ public function getReadPreference() {}
/**
* (PECL mongo >= 1.5.0)
@@ -180,8 +178,7 @@ public function getReadPreference ()
* The array contains the values w for an integer acknowledgement level or string mode,
* and wtimeout denoting the maximum number of milliseconds to wait for the server to satisfy the write concern.
timeout
* *The socket timeout for connections in this pool. This is how long connections in this pool will attempt to connect to a server before giving up.
- * + * @see MongoPool::info() */ + #[Deprecated('@deprecated This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::info() instead.')] public function poolDebug() {} /** @@ -338,77 +337,84 @@ public function poolDebug() {} * * @return bool returns the former value of slaveOkay for this instance. */ - public function setSlaveOkay ($ok) {} + public function setSlaveOkay($ok) {} + /** - * @deprecated Relying on this feature is highly discouraged. Please use MongoPool::setSize() instead. *(PECL mongo >= 1.2.0)The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.
+ * @param int $sizeThe max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.
* @return bool Returns the former value of pool size. + * @see MongoPool::setSize() */ + #[Deprecated('Relying on this feature is highly discouraged. Please use MongoPool::setSize() instead.')] public function setPoolSize($size) {} + /** - * Creates a persistent connection with a database server - * @link https://secure.php.net/manual/en/mongo.persistconnect.php - * @deprecated Pass array("persist" => $id) to the constructor instead of using this method. - * @param string $username A username used to identify the connection. - * @param string $password A password used to identify the connection. - * @throws MongoConnectionException - * @return bool If the connection was successful. - */ + * Creates a persistent connection with a database server + * @link https://secure.php.net/manual/en/mongo.persistconnect.php + * @param string $username A username used to identify the connection. + * @param string $password A password used to identify the connection. + * @throws MongoConnectionException + * @return bool If the connection was successful. + */ + #[Deprecated('Pass array("persist" => $id) to the constructor instead of using this method.')] public function persistConnect($username = "", $password = "") {} /** - * Creates a persistent connection with paired database servers - * @deprecated Pass "mongodb://server1,server2" and array("persist" => $id) to the constructor instead of using this method. - * @link https://secure.php.net/manual/en/mongo.pairpersistconnect.php - * @param string $username A username used to identify the connection. - * @param string $password A password used to identify the connection. - * @throws MongoConnectionException - * @return bool If the connection was successful. - */ + * Creates a persistent connection with paired database servers + * @link https://secure.php.net/manual/en/mongo.pairpersistconnect.php + * @param string $username A username used to identify the connection. + * @param string $password A password used to identify the connection. + * @throws MongoConnectionException + * @return bool If the connection was successful. + */ + #[Deprecated('Pass "mongodb://server1,server2" and array("persist" => $id) to the constructor instead of using this method.')] public function pairPersistConnect($username = "", $password = "") {} - /** - * Connects with a database server - * - * @link https://secure.php.net/manual/en/mongo.connectutil.php - * @throws MongoConnectionException - * @return bool If the connection was successful. - */ + /** + * Connects with a database server + * + * @link https://secure.php.net/manual/en/mongo.connectutil.php + * @throws MongoConnectionException + * @return bool If the connection was successful. + */ protected function connectUtil() {} /** - * Check if there was an error on the most recent db operation performed - * @deprecated Use MongoDB::lastError() instead. - * @link https://secure.php.net/manual/en/mongo.lasterror.php + * Check if there was an error on the most recent db operation performed + * @link https://secure.php.net/manual/en/mongo.lasterror.php * @return array|null Returns the error, if there was one, or NULL. + * @see MongoDB::lastError() */ + #[Deprecated('Use MongoDB::lastError() instead.')] public function lastError() {} /** - * Checks for the last error thrown during a database operation - * @deprecated Use MongoDB::prevError() instead. - * @link https://secure.php.net/manual/en/mongo.preverror.php + * Checks for the last error thrown during a database operation + * @link https://secure.php.net/manual/en/mongo.preverror.php * @return array Returns the error and the number of operations ago it occurred. + * @see MongoDB::prevError() */ + #[Deprecated('Use MongoDB::prevError() instead.')] public function prevError() {} - /** - * Clears any flagged errors on the connection - * @deprecated Use MongoDB::resetError() instead. - * @link https://secure.php.net/manual/en/mongo.reseterror.php - * @return array Returns the database response. - */ + /** + * Clears any flagged errors on the connection + * @link https://secure.php.net/manual/en/mongo.reseterror.php + * @return array Returns the database response. + * @see MongoDB::resetError() + */ + #[Deprecated('Use MongoDB::resetError() instead.')] public function resetError() {} - /** - * Creates a database error on the database. - * @deprecated Use MongoDB::forceError() instead. - * @link https://secure.php.net/manual/en/mongo.forceerror.php - * @return bool The database response. - */ + /** + * Creates a database error on the database. + * @link https://secure.php.net/manual/en/mongo.forceerror.php + * @return bool The database response. + * @see MongoDB::forceError() + */ + #[Deprecated('Use MongoDB::forceError() instead.')] public function forceError() {} } @@ -416,24 +422,25 @@ public function forceError() {} * Instances of this class are used to interact with a database. * @link https://secure.php.net/manual/en/class.mongodb.php */ -class MongoDB { - /** - * Profiling is off. +class MongoDB +{ + /** + * Profiling is off. * @link https://php.net/manual/en/class.mongodb.php#mongodb.constants.profiling-off - */ - const PROFILING_OFF = 0; + */ + public const PROFILING_OFF = 0; - /** - * Profiling is on for slow operations (>100 ms). + /** + * Profiling is on for slow operations (>100 ms). * @link https://php.net/manual/en/class.mongodb.php#mongodb.constants.profiling-slow - */ - const PROFILING_SLOW = 1; + */ + public const PROFILING_SLOW = 1; - /** - * Profiling is on for all operations. + /** + * Profiling is on for all operations. * @link https://php.net/manual/en/class.mongodb.php#mongodb.constants.profiling-on - */ - const PROFILING_ON = 2; + */ + public const PROFILING_ON = 2; /** * @var int @@ -487,31 +494,31 @@ class MongoDB { */ public $wtimeout = 10000; - /** + /** * (PECL mongo >= 0.9.0)If cloned files should be kept if the repair fails.
- * @param bool $backup_original_files [optional]If original files should be backed up.
- * @return arrayReturns db response.
- */ - public function repair($preserve_cloned_files = FALSE, $backup_original_files = FALSE) {} + * Repairs and compacts this database + * @link https://secure.php.net/manual/en/mongodb.repair.php + * @param bool $preserve_cloned_files [optional]If cloned files should be kept if the repair fails.
+ * @param bool $backup_original_files [optional]If original files should be backed up.
+ * @return arrayReturns db response.
+ */ + public function repair($preserve_cloned_files = false, $backup_original_files = false) {} /** * (PECL mongo >= 0.9.0)* Returns a new collection object. *
- */ + */ public function selectCollection($name) {} /** @@ -596,12 +604,12 @@ public function selectCollection($name) {} * * @return bool Returns the former value of slaveOkay for this instance. */ - public function setSlaveOkay ($ok = true) {} + public function setSlaveOkay($ok = true) {} - /** - * Creates a collection - * @link https://secure.php.net/manual/en/mongodb.createcollection.php - * @param string $name The name of the collection. + /** + * Creates a collection + * @link https://secure.php.net/manual/en/mongodb.createcollection.php + * @param string $name The name of the collection. * @param array $options [optional]*
* An array containing options for the collections. Each option is its own @@ -630,55 +638,55 @@ public function setSlaveOkay ($ok = true) {} * autoIndexId was FALSE. *
* - * @return MongoCollectionReturns a collection object representing the new collection.
+ * @return MongoCollectionReturns a collection object representing the new collection.
*/ public function createCollection($name, $options) {} /** * (PECL mongo >= 0.9.0)Include system collections.
- * @return array Returns a list of MongoCollections. - */ + /** + * (PECL mongo >= 0.9.0)Include system collections.
+ * @return array Returns a list of MongoCollections. + */ public function listCollections($includeSystemCollections = false) {} /** * (PECL mongo >= 0.9.0)+ * @link https://secure.php.net/manual/en/mongodb.createdbref.php + * @param string $collection The collection to which the database reference will point. + * @param mixed $document_or_id
* If an array or object is given, its _id field will be * used as the reference ID. If a {@see MongoId} or scalar * is given, it will be used as the reference ID. *
- * @return arrayReturns a database reference array.
+ * @return arrayReturns a database reference array.
** If an array without an _id field was provided as the * document_or_id parameter, NULL will be returned. *
- */ + */ public function createDBRef($collection, $document_or_id) {} - - /** + /** * (PECL mongo >= 0.9.0)* This parameter is an associative array of the form * array("optionname" => <boolean>, ...). Currently @@ -711,7 +720,7 @@ public function execute($code, array $args = array()) {} *
"timeout"
Deprecated alias for "socketTimeoutMS".
Returns database response. If the login was successful, it will return 1.
+ * Log in to this database + * + * @link https://secure.php.net/manual/en/mongodb.authenticate.php + * + * @param string $username The username. + * @param string $password The password (in plaintext). + * + * @return arrayReturns database response. If the login was successful, it will return 1.
*
- * <?php
array("ok" => 1);
?>
- *
- *
- *
+ * <?php
+ * array(
+ * "ok"
+ * =>
+ * 1
+ * );
+ * ?>
*
If something went wrong, it will return
*- *
- * <?php
array("ok" => 0, "errmsg" => "auth fails");
?>
- * ("auth fails" could be another message, depending on database version and
- * what went wrong)
- */
+ * <?php
+ * array(
+ * "ok"
+ * =>
+ * 0
+ * ,
+ * "errmsg"
+ * =>
+ * "auth fails"
+ * );
+ * ?>
+ *
+ * ("auth fails" could be another message, depending on database version and
+ * what went wrong)
+ */
public function authenticate($username, $password) {}
/**
@@ -780,7 +804,7 @@ public function authenticate($username, $password) {}
* @link https://secure.php.net/manual/en/mongodb.getreadpreference.php
* @return array This function returns an array describing the read preference. The array contains the values type for the string read preference mode (corresponding to the MongoClient constants), and tagsets containing a list of all tag set criteria. If no tag sets were specified, tagsets will not be present in the array.
*/
- public function getReadPreference () {}
+ public function getReadPreference() {}
/**
* (PECL mongo >= 1.3.0)
@@ -790,14 +814,14 @@ public function getReadPreference () {}
* @param array $tags [optional] An array of zero or more tag sets, where each tag set is itself an array of criteria used to match tags on replica set members.
* @return bool Returns TRUE on success, or FALSE otherwise.
*/
- public function setReadPreference ($read_preference, array $tags) {}
+ public function setReadPreference($read_preference, array $tags) {}
/**
* (PECL mongo >= 1.5.0)
* @link https://php.net/manual/en/mongodb.setwriteconcern.php
* Set the write concern for this database
* @param mixed $w The write concern. This may be an integer denoting the number of servers required to acknowledge the write, or a string mode (e.g. "majority").
- * @param int $wtimeout[optional] The maximum number of milliseconds to wait for the server to satisfy the write concern.
+ * @param int $wtimeout [optional] The maximum number of milliseconds to wait for the server to satisfy the write concern.
* @return bool Returns TRUE on success, or FALSE otherwise.
*/
public function setWriteConcern($w, $wtimeout) {}
@@ -807,21 +831,22 @@ public function setWriteConcern($w, $wtimeout) {}
* Represents a database collection.
* @link https://secure.php.net/manual/en/class.mongocollection.php
*/
-class MongoCollection {
- /**
+class MongoCollection
+{
+ /**
* @link https://php.net/manual/en/class.mongocollection.php#mongocollection.constants.ascending
*/
- const ASCENDING = 1;
+ public const ASCENDING = 1;
- /**
+ /**
* @link https://php.net/manual/en/class.mongocollection.php#mongocollection.constants.descending
*/
- const DESCENDING = -1;
+ public const DESCENDING = -1;
- /**
- * @var MongoDB
- */
- public $db = NULL ;
+ /**
+ * @var MongoDB
+ */
+ public $db = null;
/**
* @var int
@@ -844,27 +869,27 @@ class MongoCollection {
public $wtimeout;
/**
- * Creates a new collection
- * @link https://secure.php.net/manual/en/mongocollection.construct.php
- * @param MongoDB $db Parent database.
- * @param string $name Name for this collection.
- * @throws Exception
- */
+ * Creates a new collection
+ * @link https://secure.php.net/manual/en/mongocollection.construct.php
+ * @param MongoDB $db Parent database.
+ * @param string $name Name for this collection.
+ * @throws Exception
+ */
public function __construct(MongoDB $db, $name) {}
- /**
- * String representation of this collection
- * @link https://secure.php.net/manual/en/mongocollection.--tostring.php
- * @return string Returns the full name of this collection.
- */
+ /**
+ * String representation of this collection
+ * @link https://secure.php.net/manual/en/mongocollection.--tostring.php
+ * @return string Returns the full name of this collection.
+ */
public function __toString() {}
- /**
- * Gets a collection
- * @link https://secure.php.net/manual/en/mongocollection.get.php
- * @param string $name The next string in the collection name.
- * @return MongoCollection
- */
+ /**
+ * Gets a collection
+ * @link https://secure.php.net/manual/en/mongocollection.get.php
+ * @param string $name The next string in the collection name.
+ * @return MongoCollection
+ */
public function __get($name) {}
/**
@@ -887,7 +912,7 @@ public function __get($name) {}
* @param array $pipelineOperators [optional]
Additional pipeline operators.
* @return array The result of the aggregation as an array. The ok will be set to 1 on success, 0 on failure.
*/
- public function aggregate ( array $pipeline, array $op, array $pipelineOperators ) {}
+ public function aggregate(array $pipeline, array $op, array $pipelineOperators) {}
/**
* (PECL mongo >= 1.5.0)
@@ -912,10 +937,10 @@ public function aggregate ( array $pipeline, array $op, array $pipelineOperators
public function aggregateCursor(array $pipeline, array $options) {}
/**
- * Returns this collection's name
- * @link https://secure.php.net/manual/en/mongocollection.getname.php
- * @return string
- */
+ * Returns this collection's name
+ * @link https://secure.php.net/manual/en/mongocollection.getname.php
+ * @return string
+ */
public function getName() {}
/**
@@ -927,7 +952,7 @@ public function getName() {}
* @link https://secure.php.net/manual/en/mongocollection.getslaveokay.php
* @return bool Returns the value of slaveOkay for this instance.
*/
- public function getSlaveOkay() { }
+ public function getSlaveOkay() {}
/**
* (PECL mongo >= 1.1.0)
@@ -943,7 +968,7 @@ public function getSlaveOkay() { }
* @return bool Returns the former value of slaveOkay for this instance.
*
*/
- public function setSlaveOkay($ok = true) { }
+ public function setSlaveOkay($ok = true) {}
/**
* (PECL mongo >= 1.3.0)
@@ -951,7 +976,7 @@ public function setSlaveOkay($ok = true) { }
* @return array This function returns an array describing the read preference. The array contains the values type for the string read preference mode
* (corresponding to the {@link https://secure.php.net/manual/en/class.mongoclient.php MongoClient} constants), and tagsets containing a list of all tag set criteria. If no tag sets were specified, tagsets will not be present in the array.
*/
- public function getReadPreference() { }
+ public function getReadPreference() {}
/**
* (PECL mongo >= 1.3.0)
@@ -959,86 +984,86 @@ public function getReadPreference() { }
* @param array $tags [optional] An array of zero or more tag sets, where each tag set is itself an array of criteria used to match tags on replica set members.
* @return bool Returns TRUE on success, or FALSE otherwise.
*/
- public function setReadPreference($read_preference, array $tags) { }
+ public function setReadPreference($read_preference, array $tags) {}
- /**
- * Drops this collection
- * @link https://secure.php.net/manual/en/mongocollection.drop.php
- * @return array Returns the database response.
- */
+ /**
+ * Drops this collection
+ * @link https://secure.php.net/manual/en/mongocollection.drop.php
+ * @return array Returns the database response.
+ */
public function drop() {}
/**
- * Validates this collection
- * @link https://secure.php.net/manual/en/mongocollection.validate.php
- * @param bool $scan_data Only validate indices, not the base collection.
- * @return array Returns the database's evaluation of this object.
- */
- public function validate($scan_data = FALSE) {}
+ * Validates this collection
+ * @link https://secure.php.net/manual/en/mongocollection.validate.php
+ * @param bool $scan_data Only validate indices, not the base collection.
+ * @return array Returns the database's evaluation of this object.
+ */
+ public function validate($scan_data = false) {}
/**
- * Inserts an array into the collection
- * @link https://secure.php.net/manual/en/mongocollection.insert.php
- * @param array|object $a An array or object. If an object is used, it may not have protected or private properties.
+ * Inserts an array into the collection
+ * @link https://secure.php.net/manual/en/mongocollection.insert.php
+ * @param array|object $a An array or object. If an object is used, it may not have protected or private properties.
* Note: If the parameter does not have an _id key or property, a new MongoId instance will be created and assigned to it.
* This special behavior does not mean that the parameter is passed by reference.
- * @param array $options Options for the insert.
+ * @param array $options Options for the insert.
*
- * - "w"
- *
- See WriteConcerns. The default value for MongoClient is 1.
- *
- "fsync"
- *
- Boolean, defaults to FALSE. Forces the insert to be synced to disk before returning success. If TRUE, an acknowledged insert is implied and will override setting w to 0.
- *
- "timeout"
- *
- Integer, defaults to MongoCursor::$timeout. If "safe" is set, this sets how long (in milliseconds) for the client to wait for a database response. If the database does not respond within the timeout period, a MongoCursorTimeoutException will be thrown.
- *
- "safe"
- *
- Deprecated. Please use the WriteConcern w option.
+ *
- "w"
+ * - See WriteConcerns. The default value for MongoClient is 1.
+ * - "fsync"
+ * - Boolean, defaults to FALSE. Forces the insert to be synced to disk before returning success. If TRUE, an acknowledged insert is implied and will override setting w to 0.
+ * - "timeout"
+ * - Integer, defaults to MongoCursor::$timeout. If "safe" is set, this sets how long (in milliseconds) for the client to wait for a database response. If the database does not respond within the timeout period, a MongoCursorTimeoutException will be thrown.
+ * - "safe"
+ * - Deprecated. Please use the WriteConcern w option.
*
- * @throws MongoException if the inserted document is empty or if it contains zero-length keys. Attempting to insert an object with protected and private properties will cause a zero-length key error.
- * @throws MongoCursorException if the "w" option is set and the write fails.
- * @throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds.
- * @return bool|array Returns an array containing the status of the insertion if the "w" option is set.
+ * @throws MongoException if the inserted document is empty or if it contains zero-length keys. Attempting to insert an object with protected and private properties will cause a zero-length key error.
+ * @throws MongoCursorException if the "w" option is set and the write fails.
+ * @throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds.
+ * @return bool|array Returns an array containing the status of the insertion if the "w" option is set.
* Otherwise, returns TRUE if the inserted array is not empty (a MongoException will be thrown if the inserted array is empty).
- * If an array is returned, the following keys may be present:
+ * If an array is returned, the following keys may be present:
*
- * - ok
- *
- This should almost be 1 (unless last_error itself failed).
- *
- err
- *
- If this field is non-null, an error occurred on the previous operation. If this field is set, it will be a string describing the error that occurred.
- *
- code
- *
- If a database error occurred, the relevant error code will be passed back to the client.
- *
- errmsg
- *
- This field is set if something goes wrong with a database command. It is coupled with ok being 0. For example, if w is set and times out, errmsg will be set to "timed out waiting for slaves" and ok will be 0. If this field is set, it will be a string describing the error that occurred.
- *
- n
- *
- If the last operation was an update, upsert, or a remove, the number of documents affected will be returned. For insert operations, this value is always 0.
- *
- wtimeout
- *
- If the previous option timed out waiting for replication.
- *
- waited
- *
- How long the operation waited before timing out.
- *
- wtime
- *
- If w was set and the operation succeeded, how long it took to replicate to w servers.
- *
- upserted
- *
- If an upsert occurred, this field will contain the new record's _id field. For upserts, either this field or updatedExisting will be present (unless an error occurred).
- *
- updatedExisting
- *
- If an upsert updated an existing element, this field will be true. For upserts, either this field or upserted will be present (unless an error occurred).
- *
- */
- public function insert($a, array $options = array()) {}
-
- /**
- * Inserts multiple documents into this collection
- * @link https://secure.php.net/manual/en/mongocollection.batchinsert.php
- * @param array $a An array of arrays.
- * @param array $options Options for the inserts.
- * @throws MongoCursorException
- * @return mixed if "safe" is set, returns an associative array with the status of the inserts ("ok") and any error that may have occured ("err"). Otherwise, returns TRUE if the batch insert was successfully sent, FALSE otherwise.
- */
- public function batchInsert(array $a, array $options = array()) {}
-
- /**
- * Update records based on a given criteria
- * @link https://secure.php.net/manual/en/mongocollection.update.php
- * @param array $criteria Description of the objects to update.
- * @param array $newobj The object with which to update the matching records.
+ * ok
+ * This should almost be 1 (unless last_error itself failed).
+ * err
+ * If this field is non-null, an error occurred on the previous operation. If this field is set, it will be a string describing the error that occurred.
+ * code
+ * If a database error occurred, the relevant error code will be passed back to the client.
+ * errmsg
+ * This field is set if something goes wrong with a database command. It is coupled with ok being 0. For example, if w is set and times out, errmsg will be set to "timed out waiting for slaves" and ok will be 0. If this field is set, it will be a string describing the error that occurred.
+ * n
+ * If the last operation was an update, upsert, or a remove, the number of documents affected will be returned. For insert operations, this value is always 0.
+ * wtimeout
+ * If the previous option timed out waiting for replication.
+ * waited
+ * How long the operation waited before timing out.
+ * wtime
+ * If w was set and the operation succeeded, how long it took to replicate to w servers.
+ * upserted
+ * If an upsert occurred, this field will contain the new record's _id field. For upserts, either this field or updatedExisting will be present (unless an error occurred).
+ * updatedExisting
+ * If an upsert updated an existing element, this field will be true. For upserts, either this field or upserted will be present (unless an error occurred).
+ *
+ */
+ public function insert($a, array $options = []) {}
+
+ /**
+ * Inserts multiple documents into this collection
+ * @link https://secure.php.net/manual/en/mongocollection.batchinsert.php
+ * @param array $a An array of arrays.
+ * @param array $options Options for the inserts.
+ * @throws MongoCursorException
+ * @return array|bool if "safe" is set, returns an associative array with the status of the inserts ("ok") and any error that may have occurred ("err"). Otherwise, returns TRUE if the batch insert was successfully sent, FALSE otherwise.
+ */
+ public function batchInsert(array $a, array $options = []) {}
+
+ /**
+ * Update records based on a given criteria
+ * @link https://secure.php.net/manual/en/mongocollection.update.php
+ * @param array $criteria Description of the objects to update.
+ * @param array $newobj The object with which to update the matching records.
* @param array $options This parameter is an associative array of the form
* array("optionname" => boolean, ...).
*
@@ -1060,16 +1085,16 @@ public function batchInsert(array $a, array $options = array()) {}
*
* "timeout" Integer, defaults to MongoCursor::$timeout. If "safe" is set, this sets how long (in milliseconds) for the client to wait for a database response. If the database does
* not respond within the timeout period, a MongoCursorTimeoutException will be thrown
- * @throws MongoCursorException
- * @return bool
- */
- public function update(array $criteria , array $newobj, array $options = array()) {}
+ * @throws MongoCursorException
+ * @return bool
+ */
+ public function update(array $criteria, array $newobj, array $options = []) {}
/**
* (PECL mongo >= 0.9.0)
- * Remove records from this collection
- * @link https://secure.php.net/manual/en/mongocollection.remove.php
- * @param array $criteria [optional] Query criteria for the documents to delete.
+ * Remove records from this collection
+ * @link https://secure.php.net/manual/en/mongocollection.remove.php
+ * @param array $criteria [optional] Query criteria for the documents to delete.
* @param array $options [optional] An array of options for the remove operation. Currently available options
* include:
*
@@ -1086,7 +1111,7 @@ public function update(array $criteria , array $newobj, array $options = array()
* "fsync"
Boolean, defaults to FALSE. If journaling is enabled, it works exactly like "j". If journaling is not enabled, the write operation blocks until it is synced to database files on disk. If TRUE
, an acknowledged insert is implied and this option will override setting "w" to 0.
Note: If journaling is enabled, users are strongly encouraged to use the "j" option instead of "fsync". Do not use "fsync" and "j" simultaneously, as that will result in an error.
* "j"
Boolean, defaults to FALSE. Forces the write operation to block until it is synced to the journal on disk. If TRUE
, an acknowledged write is implied and this option will override setting "w" to 0.
Note: If this option is used and journaling is disabled, MongoDB 2.6+ will raise an error and the write will fail; older server versions will simply ignore the option.
* "socketTimeoutMS"
This option specifies the time limit, in milliseconds, for socket communication. If the server does not respond within the timeout period, a MongoCursorTimeoutException will be thrown and there will be no way to determine if the server actually handled the write or not. A value of -1 may be specified to block indefinitely. The default value for MongoClient is 30000 (30 seconds).
- * "w"
See {@link https://secure.php.net/manual/en/mongo.writeconcerns.php Write Concerns }. The default value for MongoClient is 1.
+ * "w"
See {@link https://secure.php.net/manual/en/mongo.writeconcerns.php Write Concerns}. The default value for MongoClient is 1.
* "wTimeoutMS"
This option specifies the time limit, in milliseconds, for {@link https://secure.php.net/manual/en/mongo.writeconcerns.php write concern} acknowledgement. It is only applicable when "w" is greater than 1, as the timeout pertains to replication. If the write concern is not satisfied within the time limit, a MongoCursorException will be thrown. A value of 0 may be specified to block indefinitely. The default value for {@link https://secure.php.net/manual/en/class.mongoclient.php MongoClient} is 10000 (ten seconds).
*
*
@@ -1095,114 +1120,115 @@ public function update(array $criteria , array $newobj, array $options = array()
*
* "safe"
Deprecated. Please use the {@link https://secure.php.net/manual/en/mongo.writeconcerns.php write concern} "w" option.
* "timeout"
Deprecated alias for "socketTimeoutMS".
- * "wtimeout"
Deprecated alias for "wTimeoutMS".
- * @throws MongoCursorException
+ * "wtimeout"
Deprecated alias for "wTimeoutMS".
+ * @throws MongoCursorException
* @throws MongoCursorTimeoutException
- * @return bool|array Returns an array containing the status of the removal if the
+ * @return bool|array
Returns an array containing the status of the removal if the
* "w" option is set. Otherwise, returns TRUE.
*
*
* Fields in the status array are described in the documentation for
* MongoCollection::insert().
*
- */
- public function remove(array $criteria = array(), array $options = array()) {}
+ */
+ public function remove(array $criteria = [], array $options = []) {}
/**
- * Querys this collection
- * @link https://secure.php.net/manual/en/mongocollection.find.php
- * @param array $query The fields for which to search.
- * @param array $fields Fields of the results to return.
- * @return MongoCursor
- */
- public function find(array $query = array(), array $fields = array()) {}
+ * Querys this collection
+ * @link https://secure.php.net/manual/en/mongocollection.find.php
+ * @param array $query The fields for which to search.
+ * @param array $fields Fields of the results to return.
+ * @return MongoCursor
+ */
+ public function find(array $query = [], array $fields = []) {}
/**
* Retrieve a list of distinct values for the given key across a collection
- * @link https://secure.php.net/manual/ru/mongocollection.distinct.php
+ * @link https://secure.php.net/manual/en/mongocollection.distinct.php
* @param string $key The key to use.
* @param array $query An optional query parameters
* @return array|false Returns an array of distinct values, or FALSE on failure
*/
- public function distinct ($key, array $query = NULL) {}
+ public function distinct($key, array $query = null) {}
/**
* Update a document and return it
- * @link https://secure.php.net/manual/ru/mongocollection.findandmodify.php
+ * @link https://secure.php.net/manual/en/mongocollection.findandmodify.php
* @param array $query The query criteria to search for.
* @param array $update The update criteria.
* @param array $fields Optionally only return these fields.
* @param array $options An array of options to apply, such as remove the match document from the DB and return it.
* @return array Returns the original document, or the modified document when new is set.
*/
- public function findAndModify (array $query, array $update = NULL, array $fields = NULL, array $options = NULL) {}
+ public function findAndModify(array $query, array $update = null, array $fields = null, array $options = null) {}
/**
- * Querys this collection, returning a single element
- * @link https://secure.php.net/manual/en/mongocollection.findone.php
- * @param array $query The fields for which to search.
- * @param array $fields Fields of the results to return.
- * @param array $options This parameter is an associative array of the form array("name" => , ...).
- * @return array|null
- */
- public function findOne(array $query = array(), array $fields = array(), array $options = array()) {}
+ * Querys this collection, returning a single element
+ * @link https://secure.php.net/manual/en/mongocollection.findone.php
+ * @param array $query The fields for which to search.
+ * @param array $fields Fields of the results to return.
+ * @param array $options This parameter is an associative array of the form array("name" => ``, ...).
+ * @return array|null
+ */
+ public function findOne(array $query = [], array $fields = [], array $options = []) {}
/**
* Creates an index on the given field(s), or does nothing if the index already exists
* @link https://secure.php.net/manual/en/mongocollection.createindex.php
* @param array $keys Field or fields to use as index.
- * @param array $options [optional] This parameter is an associative array of the form array("optionname" => , ...).
+ * @param array $options [optional] This parameter is an associative array of the form array("optionname" => ``, ...).
* @return array Returns the database response.
*/
- public function createIndex(array $keys, array $options = array()) {}
+ public function createIndex(array $keys, array $options = []) {}
/**
- * @deprecated Use MongoCollection::createIndex() instead.
- * Creates an index on the given field(s), or does nothing if the index already exists
- * @link https://secure.php.net/manual/en/mongocollection.ensureindex.php
- * @param array $keys Field or fields to use as index.
- * @param array $options [optional] This parameter is an associative array of the form array("optionname" => , ...).
- * @return true always true
- */
- public function ensureIndex(array $keys, array $options = array()) {}
+ * Creates an index on the given field(s), or does nothing if the index already exists
+ * @link https://secure.php.net/manual/en/mongocollection.ensureindex.php
+ * @param array $keys Field or fields to use as index.
+ * @param array $options [optional] This parameter is an associative array of the form array("optionname" => ``, ...).
+ * @return true always true
+ * @see MongoCollection::createIndex()
+ */
+ #[Deprecated('Use MongoCollection::createIndex() instead.')]
+ public function ensureIndex(array $keys, array $options = []) {}
/**
- * Deletes an index from this collection
- * @link https://secure.php.net/manual/en/mongocollection.deleteindex.php
- * @param string|array $keys Field or fields from which to delete the index.
- * @return array Returns the database response.
- */
+ * Deletes an index from this collection
+ * @link https://secure.php.net/manual/en/mongocollection.deleteindex.php
+ * @param string|array $keys Field or fields from which to delete the index.
+ * @return array Returns the database response.
+ */
public function deleteIndex($keys) {}
- /**
- * Delete all indexes for this collection
- * @link https://secure.php.net/manual/en/mongocollection.deleteindexes.php
- * @return array Returns the database response.
- */
+ /**
+ * Delete all indexes for this collection
+ * @link https://secure.php.net/manual/en/mongocollection.deleteindexes.php
+ * @return array Returns the database response.
+ */
public function deleteIndexes() {}
/**
- * Returns an array of index names for this collection
- * @link https://secure.php.net/manual/en/mongocollection.getindexinfo.php
- * @return array Returns a list of index names.
- */
+ * Returns an array of index names for this collection
+ * @link https://secure.php.net/manual/en/mongocollection.getindexinfo.php
+ * @return array Returns a list of index names.
+ */
public function getIndexInfo() {}
/**
- * Counts the number of documents in this collection
- * @link https://secure.php.net/manual/en/mongocollection.count.php
- * @param array|stdClass $query
- * @return int Returns the number of documents matching the query.
- */
- public function count($query = array()) {}
+ * Counts the number of documents in this collection
+ * @link https://secure.php.net/manual/en/mongocollection.count.php
+ * @param array|stdClass $query
+ * @return int Returns the number of documents matching the query.
+ */
+ public function count($query = []) {}
/**
- * Saves an object to this collection
- * @link https://secure.php.net/manual/en/mongocollection.save.php
- * @param array|object $a Array to save. If an object is used, it may not have protected or private properties.
+ * Saves an object to this collection
+ * @link https://secure.php.net/manual/en/mongocollection.save.php
+ * @param array|object $a Array to save. If an object is used, it may not have protected or private properties.
* Note: If the parameter does not have an _id key or property, a new MongoId instance will be created and assigned to it.
* See MongoCollection::insert() for additional information on this behavior.
- * @param array $options Options for the save.
+ * @param array $options Options for the save.
*
* - "w"
*
- See WriteConcerns. The default value for MongoClient is 1.
@@ -1213,60 +1239,59 @@ public function count($query = array()) {}
*
- "safe"
*
- Deprecated. Please use the WriteConcern w option.
*
- * @throws MongoException if the inserted document is empty or if it contains zero-length keys. Attempting to insert an object with protected and private properties will cause a zero-length key error.
- * @throws MongoCursorException if the "w" option is set and the write fails.
- * @throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds.
- * @return array|bool If w was set, returns an array containing the status of the save.
+ * @throws MongoException if the inserted document is empty or if it contains zero-length keys. Attempting to insert an object with protected and private properties will cause a zero-length key error.
+ * @throws MongoCursorException if the "w" option is set and the write fails.
+ * @throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds.
+ * @return array|bool If w was set, returns an array containing the status of the save.
* Otherwise, returns a boolean representing if the array was not empty (an empty array will not be inserted).
- */
- public function save($a, array $options = array()) {}
+ */
+ public function save($a, array $options = []) {}
/**
- * Creates a database reference
- * @link https://secure.php.net/manual/en/mongocollection.createdbref.php
- * @param array $a Object to which to create a reference.
- * @return array Returns a database reference array.
- */
+ * Creates a database reference
+ * @link https://secure.php.net/manual/en/mongocollection.createdbref.php
+ * @param array $a Object to which to create a reference.
+ * @return array Returns a database reference array.
+ */
public function createDBRef(array $a) {}
- /**
- * Fetches the document pointed to by a database reference
- * @link https://secure.php.net/manual/en/mongocollection.getdbref.php
- * @param array $ref A database reference.
- * @return array Returns the database document pointed to by the reference.
- */
+ /**
+ * Fetches the document pointed to by a database reference
+ * @link https://secure.php.net/manual/en/mongocollection.getdbref.php
+ * @param array $ref A database reference.
+ * @return array Returns the database document pointed to by the reference.
+ */
public function getDBRef(array $ref) {}
/**
- * @param mixed $keys
- * @static
- * @return string
- */
+ * @param mixed $keys
+ * @return string
+ */
protected static function toIndexString($keys) {}
- /**
- * Performs an operation similar to SQL's GROUP BY command
- * @link https://secure.php.net/manual/en/mongocollection.group.php
- * @param mixed $keys Fields to group by. If an array or non-code object is passed, it will be the key used to group results.
- * @param array $initial Initial value of the aggregation counter object.
- * @param MongoCode $reduce A function that aggregates (reduces) the objects iterated.
- * @param array $condition An condition that must be true for a row to be considered.
- * @return array
- */
- public function group($keys, array $initial, MongoCode $reduce, array $condition = array()) {}
+ /**
+ * Performs an operation similar to SQL's GROUP BY command
+ * @link https://secure.php.net/manual/en/mongocollection.group.php
+ * @param mixed $keys Fields to group by. If an array or non-code object is passed, it will be the key used to group results.
+ * @param array $initial Initial value of the aggregation counter object.
+ * @param MongoCode $reduce A function that aggregates (reduces) the objects iterated.
+ * @param array $condition An condition that must be true for a row to be considered.
+ * @return array
+ */
+ public function group($keys, array $initial, MongoCode $reduce, array $condition = []) {}
}
/**
* Result object for database query.
* @link https://secure.php.net/manual/en/class.mongocursor.php
*/
-class MongoCursor implements Iterator {
+class MongoCursor implements Iterator
+{
/**
* @link https://php.net/manual/en/class.mongocursor.php#mongocursor.props.slaveokay
- * @static
- * @var bool $slaveOkay
+ * @var bool
*/
- public static $slaveOkay = FALSE;
+ public static $slaveOkay = false;
/**
* @var int
@@ -1278,16 +1303,17 @@ class MongoCursor implements Iterator {
* {@link https://php.net/manual/en/class.mongocursortimeoutexception.php MongoCursorTimeoutException} after a set time.
*
*/
- static $timeout = 30000;
+ public static $timeout = 30000;
+
/**
- * Create a new cursor
- * @link https://secure.php.net/manual/en/mongocursor.construct.php
- * @param MongoClient $connection Database connection.
- * @param string $ns Full name of database and collection.
- * @param array $query Database query.
- * @param array $fields Fields to return.
- */
- public function __construct($connection, $ns, array $query = array(), array $fields = array()) {}
+ * Create a new cursor
+ * @link https://secure.php.net/manual/en/mongocursor.construct.php
+ * @param MongoClient $connection Database connection.
+ * @param string $ns Full name of database and collection.
+ * @param array $query Database query.
+ * @param array $fields Fields to return.
+ */
+ public function __construct($connection, $ns, array $query = [], array $fields = []) {}
/**
* (PECL mongo >= 1.2.11)
@@ -1295,23 +1321,24 @@ public function __construct($connection, $ns, array $query = array(), array $fie
* @param bool $wait [optional] If the cursor should wait for more data to become available.
* @return MongoCursor Returns this cursor.
*/
- public function awaitData ($wait = true) {}
+ public function awaitData($wait = true) {}
+
/**
- * Checks if there are any more elements in this cursor
- * @link https://secure.php.net/manual/en/mongocursor.hasnext.php
- * @throws MongoConnectionException
- * @throws MongoCursorTimeoutException
+ * Checks if there are any more elements in this cursor
+ * @link https://secure.php.net/manual/en/mongocursor.hasnext.php
+ * @throws MongoConnectionException
+ * @throws MongoCursorTimeoutException
* @return bool Returns true if there is another element
- */
+ */
public function hasNext() {}
/**
- * Return the next object to which this cursor points, and advance the cursor
- * @link https://secure.php.net/manual/en/mongocursor.getnext.php
- * @throws MongoConnectionException
- * @throws MongoCursorTimeoutException
+ * Return the next object to which this cursor points, and advance the cursor
+ * @link https://secure.php.net/manual/en/mongocursor.getnext.php
+ * @throws MongoConnectionException
+ * @throws MongoCursorTimeoutException
* @return array Returns the next object
- */
+ */
public function getNext() {}
/**
@@ -1320,15 +1347,15 @@ public function getNext() {}
* @return array This function returns an array describing the read preference. The array contains the values type for the string
* read preference mode (corresponding to the {@link https://secure.php.net/manual/en/class.mongoclient.php MongoClient} constants), and tagsets containing a list of all tag set criteria. If no tag sets were specified, tagsets will not be present in the array.
*/
- public function getReadPreference () { }
+ public function getReadPreference() {}
/**
- * Limits the number of results returned
- * @link https://secure.php.net/manual/en/mongocursor.limit.php
- * @param int $num The number of results to return.
- * @throws MongoCursorException
+ * Limits the number of results returned
+ * @link https://secure.php.net/manual/en/mongocursor.limit.php
+ * @param int $num The number of results to return.
+ * @throws MongoCursorException
* @return MongoCursor Returns this cursor
- */
+ */
public function limit($num) {}
/**
@@ -1337,7 +1364,7 @@ public function limit($num) {}
* @param bool $okay [optional] If receiving partial results is okay.
* @return MongoCursor Returns this cursor.
*/
- public function partial ($okay = true) {}
+ public function partial($okay = true) {}
/**
* (PECL mongo >= 1.2.1)
@@ -1351,7 +1378,7 @@ public function partial ($okay = true) {}
* @param bool $set [optional] Whether the flag should be set (TRUE) or unset (FALSE).
* @return MongoCursor
*/
- public function setFlag ($flag, $set = true ) {}
+ public function setFlag($flag, $set = true) {}
/**
* (PECL mongo >= 1.3.3)
@@ -1360,232 +1387,240 @@ public function setFlag ($flag, $set = true ) {}
* @param array $tags [optional] The read preference mode: MongoClient::RP_PRIMARY, MongoClient::RP_PRIMARY_PREFERRED, MongoClient::RP_SECONDARY, MongoClient::RP_SECONDARY_PREFERRED, or MongoClient::RP_NEAREST.
* @return MongoCursor Returns this cursor.
*/
- public function setReadPreference ($read_preference, array $tags) {}
+ public function setReadPreference($read_preference, array $tags) {}
/**
- * Skips a number of results
- * @link https://secure.php.net/manual/en/mongocursor.skip.php
- * @param int $num The number of results to skip.
- * @throws MongoCursorException
+ * Skips a number of results
+ * @link https://secure.php.net/manual/en/mongocursor.skip.php
+ * @param int $num The number of results to skip.
+ * @throws MongoCursorException
* @return MongoCursor Returns this cursor
- */
+ */
public function skip($num) {}
/**
- * Sets whether this query can be done on a slave
- * This method will override the static class variable slaveOkay.
- * @link https://secure.php.net/manual/en/mongocursor.slaveOkay.php
- * @param bool $okay If it is okay to query the slave.
- * @throws MongoCursorException
+ * Sets whether this query can be done on a slave
+ * This method will override the static class variable slaveOkay.
+ * @link https://secure.php.net/manual/en/mongocursor.slaveOkay.php
+ * @param bool $okay If it is okay to query the slave.
+ * @throws MongoCursorException
* @return MongoCursor Returns this cursor
- */
+ */
public function slaveOkay($okay = true) {}
/**
- * Sets whether this cursor will be left open after fetching the last results
- * @link https://secure.php.net/manual/en/mongocursor.tailable.php
- * @param bool $tail If the cursor should be tailable.
+ * Sets whether this cursor will be left open after fetching the last results
+ * @link https://secure.php.net/manual/en/mongocursor.tailable.php
+ * @param bool $tail If the cursor should be tailable.
* @return MongoCursor Returns this cursor
- */
+ */
public function tailable($tail = true) {}
/**
- * Sets whether this cursor will timeout
- * @link https://secure.php.net/manual/en/mongocursor.immortal.php
- * @param bool $liveForever If the cursor should be immortal.
- * @throws MongoCursorException
+ * Sets whether this cursor will timeout
+ * @link https://secure.php.net/manual/en/mongocursor.immortal.php
+ * @param bool $liveForever If the cursor should be immortal.
+ * @throws MongoCursorException
* @return MongoCursor Returns this cursor
- */
+ */
public function immortal($liveForever = true) {}
/**
- * Sets a client-side timeout for this query
- * @link https://secure.php.net/manual/en/mongocursor.timeout.php
- * @param int $ms The number of milliseconds for the cursor to wait for a response. By default, the cursor will wait forever.
- * @throws MongoCursorTimeoutException
+ * Sets a client-side timeout for this query
+ * @link https://secure.php.net/manual/en/mongocursor.timeout.php
+ * @param int $ms The number of milliseconds for the cursor to wait for a response. By default, the cursor will wait forever.
+ * @throws MongoCursorTimeoutException
* @return MongoCursor Returns this cursor
- */
+ */
public function timeout($ms) {}
- /**
- * Checks if there are documents that have not been sent yet from the database for this cursor
- * @link https://secure.php.net/manual/en/mongocursor.dead.php
- * @return bool Returns if there are more results that have not been sent to the client, yet.
- */
+ /**
+ * Checks if there are documents that have not been sent yet from the database for this cursor
+ * @link https://secure.php.net/manual/en/mongocursor.dead.php
+ * @return bool Returns if there are more results that have not been sent to the client, yet.
+ */
public function dead() {}
- /**
- * Use snapshot mode for the query
- * @link https://secure.php.net/manual/en/mongocursor.snapshot.php
- * @throws MongoCursorException
- * @return MongoCursor Returns this cursor
- */
+ /**
+ * Use snapshot mode for the query
+ * @link https://secure.php.net/manual/en/mongocursor.snapshot.php
+ * @throws MongoCursorException
+ * @return MongoCursor Returns this cursor
+ */
public function snapshot() {}
/**
- * Sorts the results by given fields
- * @link https://secure.php.net/manual/en/mongocursor.sort.php
+ * Sorts the results by given fields
+ * @link https://secure.php.net/manual/en/mongocursor.sort.php
* @param array $fields An array of fields by which to sort. Each element in the array has as key the field name, and as value either 1 for ascending sort, or -1 for descending sort
- * @throws MongoCursorException
+ * @throws MongoCursorException
* @return MongoCursor Returns the same cursor that this method was called on
- */
+ */
public function sort(array $fields) {}
- /**
- * Gives the database a hint about the query
- * @link https://secure.php.net/manual/en/mongocursor.hint.php
- * @param mixed $key_pattern Indexes to use for the query.
- * @throws MongoCursorException
- * @return MongoCursor Returns this cursor
- */
- public function hint(mixed $key_pattern) {}
-
+ /**
+ * Gives the database a hint about the query
+ * @link https://secure.php.net/manual/en/mongocursor.hint.php
+ * @param mixed $key_pattern Indexes to use for the query.
+ * @throws MongoCursorException
+ * @return MongoCursor Returns this cursor
+ */
+ public function hint($key_pattern) {}
- /**
- * Adds a top-level key/value pair to a query
- * @link https://secure.php.net/manual/en/mongocursor.addoption.php
- * @param string $key Fieldname to add.
- * @param mixed $value Value to add.
- * @throws MongoCursorException
+ /**
+ * Adds a top-level key/value pair to a query
+ * @link https://secure.php.net/manual/en/mongocursor.addoption.php
+ * @param string $key Fieldname to add.
+ * @param mixed $value Value to add.
+ * @throws MongoCursorException
* @return MongoCursor Returns this cursor
- */
+ */
public function addOption($key, $value) {}
- /**
- * Execute the query
- * @link https://secure.php.net/manual/en/mongocursor.doquery.php
- * @throws MongoConnectionException if it cannot reach the database.
- * @return void
- */
+ /**
+ * Execute the query
+ * @link https://secure.php.net/manual/en/mongocursor.doquery.php
+ * @throws MongoConnectionException if it cannot reach the database.
+ * @return void
+ */
protected function doQuery() {}
- /**
- * Returns the current element
- * @link https://secure.php.net/manual/en/mongocursor.current.php
- * @return array
- */
+ /**
+ * Returns the current element
+ * @link https://secure.php.net/manual/en/mongocursor.current.php
+ * @return array
+ */
public function current() {}
- /**
- * Returns the current result's _id
- * @link https://secure.php.net/manual/en/mongocursor.key.php
- * @return string The current result's _id as a string.
- */
+ /**
+ * Returns the current result's _id
+ * @link https://secure.php.net/manual/en/mongocursor.key.php
+ * @return string The current result's _id as a string.
+ */
public function key() {}
/**
- * Advances the cursor to the next result
- * @link https://secure.php.net/manual/en/mongocursor.next.php
- * @throws MongoConnectionException
- * @throws MongoCursorTimeoutException
- * @return void
- */
+ * Advances the cursor to the next result
+ * @link https://secure.php.net/manual/en/mongocursor.next.php
+ * @throws MongoConnectionException
+ * @throws MongoCursorTimeoutException
+ * @return void
+ */
public function next() {}
- /**
- * Returns the cursor to the beginning of the result set
- * @throws MongoConnectionException
- * @throws MongoCursorTimeoutException
- * @return void
- */
+ /**
+ * Returns the cursor to the beginning of the result set
+ * @throws MongoConnectionException
+ * @throws MongoCursorTimeoutException
+ * @return void
+ */
public function rewind() {}
/**
- * Checks if the cursor is reading a valid result.
- * @link https://secure.php.net/manual/en/mongocursor.valid.php
- * @return bool If the current result is not null.
- */
+ * Checks if the cursor is reading a valid result.
+ * @link https://secure.php.net/manual/en/mongocursor.valid.php
+ * @return bool If the current result is not null.
+ */
public function valid() {}
- /**
- * Clears the cursor
- * @link https://secure.php.net/manual/en/mongocursor.reset.php
- * @return void
- */
+ /**
+ * Clears the cursor
+ * @link https://secure.php.net/manual/en/mongocursor.reset.php
+ * @return void
+ */
public function reset() {}
- /**
- * Return an explanation of the query, often useful for optimization and debugging
- * @link https://secure.php.net/manual/en/mongocursor.explain.php
- * @return array Returns an explanation of the query.
- */
+ /**
+ * Return an explanation of the query, often useful for optimization and debugging
+ * @link https://secure.php.net/manual/en/mongocursor.explain.php
+ * @return array Returns an explanation of the query.
+ */
public function explain() {}
/**
- * Counts the number of results for this query
- * @link https://secure.php.net/manual/en/mongocursor.count.php
- * @param bool $all Send cursor limit and skip information to the count function, if applicable.
- * @return int The number of documents returned by this cursor's query.
- */
- public function count($all = FALSE) {}
+ * Counts the number of results for this query
+ * @link https://secure.php.net/manual/en/mongocursor.count.php
+ * @param bool $all Send cursor limit and skip information to the count function, if applicable.
+ * @return int The number of documents returned by this cursor's query.
+ */
+ public function count($all = false) {}
- /**
- * Sets the fields for a query
- * @link https://secure.php.net/manual/en/mongocursor.fields.php
- * @param array $f Fields to return (or not return).
- * @throws MongoCursorException
- * @return MongoCursor
- */
- public function fields(array $f){}
+ /**
+ * Sets the fields for a query
+ * @link https://secure.php.net/manual/en/mongocursor.fields.php
+ * @param array $f Fields to return (or not return).
+ * @throws MongoCursorException
+ * @return MongoCursor
+ */
+ public function fields(array $f) {}
- /**
- * Gets the query, fields, limit, and skip for this cursor
- * @link https://secure.php.net/manual/en/mongocursor.info.php
- * @return array The query, fields, limit, and skip for this cursor as an associative array.
- */
- public function info(){}
+ /**
+ * Gets the query, fields, limit, and skip for this cursor
+ * @link https://secure.php.net/manual/en/mongocursor.info.php
+ * @return array The query, fields, limit, and skip for this cursor as an associative array.
+ */
+ public function info() {}
/**
- * PECL mongo >=1.0.11
+ * PECL mongo >= 1.0.11
* Limits the number of elements returned in one batch.
* A cursor typically fetches a batch of result objects and store them locally.
* This method sets the batchSize value to configure the amount of documents retrieved from the server in one data packet.
* However, it will never return more documents than fit in the max batch size limit (usually 4MB).
+ *
*
* @param int $batchSize The number of results to return per batch. Each batch requires a round-trip to the server.
* If batchSize is 2 or more, it represents the size of each batch of objects retrieved.
* It can be adjusted to optimize performance and limit data transfer.
+ *
*
* If batchSize is 1 or negative, it will limit of number returned documents to the absolute value of batchSize,
* and the cursor will be closed. For example if batchSize is -10, then the server will return a maximum of 10
* documents and as many as can fit in 4MB, then close the cursor.
+ *
* Warning
* A batchSize of 1 is special, and means the same as -1, i.e. a value of 1 makes the cursor only capable of returning one document.
+ *
* Note that this feature is different from MongoCursor::limit() in that documents must fit within a maximum size,
* and it removes the need to send a request to close the cursor server-side.
* The batch size can be changed even after a cursor is iterated, in which case the setting will apply on the next batch retrieval.
+ *
* This cannot override MongoDB's limit on the amount of data it will return to the client (i.e.,
* if you set batch size to 1,000,000,000, MongoDB will still only return 4-16MB of results per batch).
+ *
* To ensure consistent behavior, the rules of MongoCursor::batchSize() and MongoCursor::limit() behave a little complex
* but work "as expected". The rules are: hard limits override soft limits with preference given to MongoCursor::limit() over
* MongoCursor::batchSize(). After that, whichever is set and lower than the other will take precedence.
* See below. section for some examples.
+ *
+ *
* @return MongoCursor Returns this cursor.
* @link https://secure.php.net/manual/en/mongocursor.batchsize.php
*/
- public function batchSize($batchSize){}
-
- /**
- * (PECL mongo >=1.5.0)
- * Sets a server-side timeout for this query
- * @link https://php.net/manual/en/mongocursor.maxtimems.php
- * @param int $ms
- * Specifies a cumulative time limit in milliseconds to be allowed by the
- * server for processing operations on the cursor.
- *
- * @return MongoCursor This cursor.
- */
- public function maxTimeMS ($ms) {}
+ public function batchSize($batchSize) {}
+
+ /**
+ * (PECL mongo >= 1.5.0)
+ * Sets a server-side timeout for this query
+ * @link https://php.net/manual/en/mongocursor.maxtimems.php
+ * @param int $ms
+ * Specifies a cumulative time limit in milliseconds to be allowed by the
+ * server for processing operations on the cursor.
+ *
+ * @return MongoCursor This cursor.
+ */
+ public function maxTimeMS($ms) {}
}
-class MongoCommandCursor implements MongoCursorInterface {
+class MongoCommandCursor implements MongoCursorInterface
+{
/**
* Return the current element
* @link https://php.net/manual/en/iterator.current.php
* @return mixed Can return any type.
* @since 5.0.0
*/
- public function current(){}
+ public function current() {}
/**
* Move forward to next element
@@ -1593,7 +1628,7 @@ public function current(){}
* @return void Any returned value is ignored.
* @since 5.0.0
*/
- public function next(){}
+ public function next() {}
/**
* Return the key of the current element
@@ -1601,7 +1636,7 @@ public function next(){}
* @return mixed scalar on success, or null on failure.
* @since 5.0.0
*/
- public function key(){}
+ public function key() {}
/**
* Checks if current position is valid
@@ -1610,7 +1645,7 @@ public function key(){}
* Returns true on success or false on failure.
* @since 5.0.0
*/
- public function valid(){}
+ public function valid() {}
/**
* Rewind the Iterator to the first element
@@ -1618,63 +1653,59 @@ public function valid(){}
* @return void Any returned value is ignored.
* @since 5.0.0
*/
- public function rewind(){}
+ public function rewind() {}
- function batchSize(int $batchSize):MongoCursorInterface{}
+ public function batchSize(int $batchSize): MongoCursorInterface {}
- function dead():bool{}
+ public function dead(): bool {}
- function info():array{}
+ public function info(): array {}
- function getReadPreference():array{}
+ public function getReadPreference(): array {}
- function setReadPreference(string $read_preference, array $tags = null):MongoCursorInterface{}
+ public function setReadPreference(string $read_preference, array $tags = null): MongoCursorInterface {}
- function timeout(int $ms):MongoCursorInterface{}
+ public function timeout(int $ms): MongoCursorInterface {}
}
interface MongoCursorInterface extends Iterator
{
- function batchSize(int $batchSize):MongoCursorInterface;
+ public function batchSize(int $batchSize): MongoCursorInterface;
- function dead():bool;
+ public function dead(): bool;
- function info():array;
+ public function info(): array;
- function getReadPreference():array;
+ public function getReadPreference(): array;
- function setReadPreference(string $read_preference, array $tags = null):MongoCursorInterface;
+ public function setReadPreference(string $read_preference, array $tags = null): MongoCursorInterface;
- function timeout(int $ms):MongoCursorInterface;
+ public function timeout(int $ms): MongoCursorInterface;
}
-/**
- *
- */
-class MongoGridFS extends MongoCollection {
- const ASCENDING = 1;
- const DESCENDING = -1;
+class MongoGridFS extends MongoCollection
+{
+ public const ASCENDING = 1;
+ public const DESCENDING = -1;
/**
* @link https://php.net/manual/en/class.mongogridfs.php#mongogridfs.props.chunks
- * @var $chunks MongoCollection
+ * @var MongoCollection
*/
public $chunks;
/**
* @link https://php.net/manual/en/class.mongogridfs.php#mongogridfs.props.filesname
- * @var $filesName string
+ * @var string
*/
protected $filesName;
/**
* @link https://php.net/manual/en/class.mongogridfs.php#mongogridfs.props.chunksname
- * @var $chunksName string
+ * @var string
*/
protected $chunksName;
-
-
/**
* Files as stored across two collections, the first containing file meta
* information, the second containing chunks of the actual file. By default,
@@ -1700,17 +1731,17 @@ public function drop() {}
* @param array $fields Fields to return
* @return MongoGridFSCursor A MongoGridFSCursor
*/
- public function find(array $query = array(), array $fields = array()) {}
+ public function find(array $query = [], array $fields = []) {}
/**
* Stores a file in the database
* @link https://php.net/manual/en/mongogridfs.storefile.php
- * @param string $filename The name of the file
+ * @param string|resource $filename The name of the file
* @param array $extra Other metadata to add to the file saved
* @param array $options Options for the store. "safe": Check that this store succeeded
* @return mixed Returns the _id of the saved object
*/
- public function storeFile($filename, $extra = array(), $options = array()) {}
+ public function storeFile($filename, $extra = [], $options = []) {}
/**
* Chunkifies and stores bytes in the database
@@ -1720,26 +1751,26 @@ public function storeFile($filename, $extra = array(), $options = array()) {}
* @param array $options Options for the store. "safe": Check that this store succeeded
* @return mixed The _id of the object saved
*/
- public function storeBytes($bytes, $extra = array(), $options = array()) {}
+ public function storeBytes($bytes, $extra = [], $options = []) {}
/**
- * Returns a single file matching the criteria
- * @link https://secure.php.net/manual/en/mongogridfs.findone.php
- * @param array $query The fields for which to search.
- * @param array $fields Fields of the results to return.
- * @return MongoGridFSFile|null
- */
- public function findOne(array $query = array(), array $fields = array()) {}
+ * Returns a single file matching the criteria
+ * @link https://secure.php.net/manual/en/mongogridfs.findone.php
+ * @param array $query The fields for which to search.
+ * @param array $fields Fields of the results to return.
+ * @return MongoGridFSFile|null
+ */
+ public function findOne(array $query = [], array $fields = []) {}
/**
- * Removes files from the collections
- * @link https://secure.php.net/manual/en/mongogridfs.remove.php
- * @param array $criteria Description of records to remove.
- * @param array $options Options for remove. Valid options are: "safe"- Check that the remove succeeded.
- * @throws MongoCursorException
- * @return bool
- */
- public function remove(array $criteria = array(), array $options = array()) {}
+ * Removes files from the collections
+ * @link https://secure.php.net/manual/en/mongogridfs.remove.php
+ * @param array $criteria Description of records to remove.
+ * @param array $options Options for remove. Valid options are: "safe"- Check that the remove succeeded.
+ * @throws MongoCursorException
+ * @return bool
+ */
+ public function remove(array $criteria = [], array $options = []) {}
/**
* Delete a file from the database
@@ -1750,45 +1781,44 @@ public function remove(array $criteria = array(), array $options = array()) {}
public function delete($id) {}
/**
- * Saves an uploaded file directly from a POST to the database
- * @link https://secure.php.net/manual/en/mongogridfs.storeupload.php
- * @param string $name The name attribute of the uploaded file, from .
- * @param array $metadata An array of extra fields for the uploaded file.
- * @return mixed Returns the _id of the uploaded file.
- */
- public function storeUpload($name, array $metadata = array()) {}
-
+ * Saves an uploaded file directly from a POST to the database
+ * @link https://secure.php.net/manual/en/mongogridfs.storeupload.php
+ * @param string $name The name attribute of the uploaded file, from <input type="file" name="something"/>
+ * @param array $metadata An array of extra fields for the uploaded file.
+ * @return mixed Returns the _id of the uploaded file.
+ */
+ public function storeUpload($name, array $metadata = []) {}
/**
- * Retrieve a file from the database
- * @link https://secure.php.net/manual/en/mongogridfs.get.php
- * @param mixed $id _id of the file to find.
- * @return MongoGridFSFile|null Returns the file, if found, or NULL.
- */
+ * Retrieve a file from the database
+ * @link https://secure.php.net/manual/en/mongogridfs.get.php
+ * @param mixed $id _id of the file to find.
+ * @return MongoGridFSFile|null Returns the file, if found, or NULL.
+ */
public function get($id) {}
- /**
+ /**
* Stores a file in the database
* @link https://php.net/manual/en/mongogridfs.put.php
* @param string $filename The name of the file
* @param array $extra Other metadata to add to the file saved
* @return mixed Returns the _id of the saved object
*/
- public function put($filename, array $extra = array()) {}
-
+ public function put($filename, array $extra = []) {}
}
-class MongoGridFSFile {
+class MongoGridFSFile
+{
/**
- * @link https://php.net/manual/en/class.mongogridfsfile.php#mongogridfsfile.props.file
- * @var $file
- */
+ * @link https://php.net/manual/en/class.mongogridfsfile.php#mongogridfsfile.props.file
+ * @var array|null
+ */
public $file;
/**
- * @link https://php.net/manual/en/class.mongogridfsfile.php#mongogridfsfile.props.gridfs
- * @var $gridfs
- */
+ * @link https://php.net/manual/en/class.mongogridfsfile.php#mongogridfsfile.props.gridfs
+ * @var MongoGridFS|null
+ */
protected $gridfs;
/**
@@ -1802,14 +1832,14 @@ public function __construct($gridfs, array $file) {}
* Returns this file's filename
* @link https://php.net/manual/en/mongogridfsfile.getfilename.php
* @return string Returns the filename
- */
+ */
public function getFilename() {}
/**
* Returns this file's size
* @link https://php.net/manual/en/mongogridfsfile.getsize.php
* @return int Returns this file's size
- */
+ */
public function getSize() {}
/**
@@ -1827,7 +1857,7 @@ public function write($filename = null) {}
*/
public function getBytes() {}
- /**
+ /**
* This method returns a stream resource that can be used to read the stored file with all file functions in PHP.
* The contents of the file are pulled out of MongoDB on the fly, so that the whole file does not have to be loaded into memory first.
* At most two GridFSFile chunks will be loaded in memory.
@@ -1838,17 +1868,17 @@ public function getBytes() {}
public function getResource() {}
}
-class MongoGridFSCursor extends MongoCursor implements Traversable, Iterator {
+class MongoGridFSCursor extends MongoCursor implements Traversable, Iterator
+{
/**
- * @static
- * @var $slaveOkay
- */
+ * @var bool
+ */
public static $slaveOkay;
/**
- * @link https://php.net/manual/en/class.mongogridfscursor.php#mongogridfscursor.props.gridfs
- * @var $gridfs
- */
+ * @link https://php.net/manual/en/class.mongogridfscursor.php#mongogridfscursor.props.gridfs
+ * @var MongoGridFS|null
+ */
protected $gridfs;
/**
@@ -1863,46 +1893,46 @@ class MongoGridFSCursor extends MongoCursor implements Traversable, Iterator {
public function __construct($gridfs, $connection, $ns, $query, $fields) {}
/**
- * Return the next file to which this cursor points, and advance the cursor
- * @link https://php.net/manual/en/mongogridfscursor.getnext.php
- * @return MongoGridFSFile Returns the next file
- */
+ * Return the next file to which this cursor points, and advance the cursor
+ * @link https://php.net/manual/en/mongogridfscursor.getnext.php
+ * @return MongoGridFSFile Returns the next file
+ */
public function getNext() {}
/**
- * Returns the current file
- * @link https://php.net/manual/en/mongogridfscursor.current.php
- * @return MongoGridFSFile The current file
- */
+ * Returns the current file
+ * @link https://php.net/manual/en/mongogridfscursor.current.php
+ * @return MongoGridFSFile The current file
+ */
public function current() {}
/**
- * Returns the current result's filename
- * @link https://php.net/manual/en/mongogridfscursor.key.php
- * @return string The current results filename
- */
+ * Returns the current result's filename
+ * @link https://php.net/manual/en/mongogridfscursor.key.php
+ * @return string The current results filename
+ */
public function key() {}
-
}
/**
* A unique identifier created for database objects.
* @link https://secure.php.net/manual/en/class.mongoid.php
*/
-class MongoId {
- /**
- * @var string $id Note: The property name begins with a $ character. It may be accessed using
- * {@link https://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex complex variable parsed syntax} (e.g. $mongoId->{'$id'}).
- */
- public $id = NULL;
+class MongoId
+{
+ /**
+ * @var string Note: The property name begins with a $ character. It may be accessed using
+ * {@link https://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex complex variable parsed syntax} (e.g. $mongoId->{'$id'}).
+ */
+ public $id = null;
/**
* (PECL mongo >= 0.8.0)
- * Creates a new id
- * @link https://secure.php.net/manual/en/mongoid.construct.php
- * @param string $id [optional] A string to use as the id. Must be 24 hexidecimal characters. If an invalid string is passed to this constructor, the constructor will ignore it and create a new id value.
+ * Creates a new id
+ * @link https://secure.php.net/manual/en/mongoid.construct.php
+ * @param MongoId|string $id [optional] A string to use as the id. Must be 24 hexadecimal characters. If an invalid string is passed to this constructor, the constructor will ignore it and create a new id value.
*/
- public function __construct($id = NULL) {}
+ public function __construct($id = null) {}
/**
* (PECL mongo >= 0.8.0)
@@ -1916,12 +1946,13 @@ public function __construct($id = NULL) {}
*
*/
public static function isValid($value) {}
- /**
- * (PECL mongo >= 0.8.0)
- * Returns a hexidecimal representation of this id
- * @link https://secure.php.net/manual/en/mongoid.tostring.php
- * @return string This id.
- */
+
+ /**
+ * (PECL mongo >= 0.8.0)
+ * Returns a hexadecimal representation of this id
+ * @link https://secure.php.net/manual/en/mongoid.tostring.php
+ * @return string This id.
+ */
public function __toString() {}
/**
@@ -1940,12 +1971,12 @@ public function getInc() {}
*/
public function getPID() {}
- /**
- * (PECL mongo >= 1.0.1)
- * Gets the number of seconds since the epoch that this id was created
- * @link https://secure.php.net/manual/en/mongoid.gettimestamp.php
- * @return int
- */
+ /**
+ * (PECL mongo >= 1.0.1)
+ * Gets the number of seconds since the epoch that this id was created
+ * @link https://secure.php.net/manual/en/mongoid.gettimestamp.php
+ * @return int
+ */
public function getTimestamp() {}
/**
@@ -1966,15 +1997,16 @@ public static function getHostname() {}
public static function __set_state(array $props) {}
}
-class MongoCode {
+class MongoCode
+{
/**
- * @var $code
- */
+ * @var string
+ */
public $code;
/**
- * @var $scope
- */
+ * @var array
+ */
public $scope;
/**
@@ -1984,25 +2016,26 @@ class MongoCode {
* @param string $code A string of code
* @param array $scope The scope to use for the code
*/
- public function __construct($code, array $scope = array()) {}
+ public function __construct($code, array $scope = []) {}
/**
- * Returns this code as a string
- * @return string
- */
+ * Returns this code as a string
+ * @return string
+ */
public function __toString() {}
}
-class MongoRegex {
+class MongoRegex
+{
/**
* @link https://php.net/manual/en/class.mongoregex.php#mongoregex.props.regex
- * @var $regex
+ * @var string
*/
public $regex;
/**
* @link https://php.net/manual/en/class.mongoregex.php#mongoregex.props.flags
- * @var $flags
+ * @var string
*/
public $flags;
@@ -2015,22 +2048,23 @@ class MongoRegex {
public function __construct($regex) {}
/**
- * Returns a string representation of this regular expression.
- * @return string This regular expression in the form "/expr/flags".
- */
+ * Returns a string representation of this regular expression.
+ * @return string This regular expression in the form "/expr/flags".
+ */
public function __toString() {}
}
-class MongoDate {
+class MongoDate
+{
/**
* @link https://php.net/manual/en/class.mongodate.php#mongodate.props.sec
- * @var int $sec
+ * @var int
*/
public $sec;
/**
* @link https://php.net/manual/en/class.mongodate.php#mongodate.props.usec
- * @var int $usec
+ * @var int
*/
public $usec;
@@ -2042,7 +2076,7 @@ class MongoDate {
* @param int $usec Microseconds
*/
public function __construct($sec = 0, $usec = 0) {}
-
+
/**
* Returns a DateTime object representing this date
* @link https://php.net/manual/en/mongodate.todatetime.php
@@ -2051,70 +2085,68 @@ public function __construct($sec = 0, $usec = 0) {}
public function toDateTime() {}
/**
- * Returns a string representation of this date
- * @return string
- */
+ * Returns a string representation of this date
+ * @return string
+ */
public function __toString() {}
}
-class MongoBinData {
- /**
- * Generic binary data.
- * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
- */
- const GENERIC = 0x0;
+class MongoBinData
+{
+ /**
+ * Generic binary data.
+ * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
+ */
+ public const GENERIC = 0x0;
- /**
- * Function
+ /**
+ * Function
* @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.func
*/
- const FUNC = 0x1;
+ public const FUNC = 0x1;
- /**
- * Generic binary data (deprecated in favor of MongoBinData::GENERIC)
+ /**
+ * Generic binary data (deprecated in favor of MongoBinData::GENERIC)
* @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.byte-array
*/
- const BYTE_ARRAY = 0x2;
+ public const BYTE_ARRAY = 0x2;
- /**
- * Universally unique identifier (deprecated in favor of MongoBinData::UUID_RFC4122)
+ /**
+ * Universally unique identifier (deprecated in favor of MongoBinData::UUID_RFC4122)
* @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.uuid
*/
- const UUID = 0x3;
+ public const UUID = 0x3;
- /**
- * Universally unique identifier (according to » RFC 4122)
- * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
- */
- const UUID_RFC4122 = 0x4;
+ /**
+ * Universally unique identifier (according to » RFC 4122)
+ * @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
+ */
+ public const UUID_RFC4122 = 0x4;
-
- /**
- * MD5
+ /**
+ * MD5
* @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.md5
*/
- const MD5 = 0x5;
+ public const MD5 = 0x5;
- /**
- * User-defined type
+ /**
+ * User-defined type
* @link https://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom
*/
- const CUSTOM = 0x80;
-
+ public const CUSTOM = 0x80;
/**
* @link https://php.net/manual/en/class.mongobindata.php#mongobindata.props.bin
- * @var $bin
+ * @var string
*/
public $bin;
/**
* @link https://php.net/manual/en/class.mongobindata.php#mongobindata.props.type
- * @var $type
+ * @var int
*/
public $type;
-
/**
* Creates a new binary data object.
*
@@ -2125,30 +2157,28 @@ class MongoBinData {
public function __construct($data, $type = 2) {}
/**
- * Returns the string representation of this binary data object.
- * @return string
- */
+ * Returns the string representation of this binary data object.
+ * @return string
+ */
public function __toString() {}
}
-class MongoDBRef {
+class MongoDBRef
+{
/**
- * @static
- * @var $refKey
- */
+ * @var string
+ */
protected static $refKey = '$ref';
/**
- * @static
- * @var $idKey
- */
+ * @var string
+ */
protected static $idKey = '$id';
/**
* If no database is given, the current database is used.
*
* @link https://php.net/manual/en/mongodbref.create.php
- * @static
* @param string $collection Collection name (without the database name)
* @param mixed $id The _id field of the object to which to link
* @param string $database Database name
@@ -2161,7 +2191,6 @@ public static function create($collection, $id, $database = null) {}
* It merely checks that $ref is in valid database reference format (in that it is an object or array with $ref and $id fields).
*
* @link https://php.net/manual/en/mongodbref.isref.php
- * @static
* @param mixed $ref Array or object to check
* @return bool Returns true if $ref is a reference
*/
@@ -2170,7 +2199,6 @@ public static function isRef($ref) {}
/**
* Fetches the object pointed to by a reference
* @link https://php.net/manual/en/mongodbref.get.php
- * @static
* @param MongoDB $db Database to use
* @param array $ref Reference to fetch
* @return array|null Returns the document to which the reference refers or null if the document does not exist (the reference is broken)
@@ -2180,158 +2208,137 @@ public static function get($db, $ref) {}
class MongoWriteBatch
{
-
- const COMMAND_INSERT = 1;
- const COMMAND_UPDATE = 2;
- const COMMAND_DELETE = 3;
-
-
- /**
- * (PECL mongo >= 1.5.0)
- * MongoWriteBatch constructor.
- * @link https://php.net/manual/en/mongowritebatch.construct.php
- * @param MongoCollection $collection The {@see MongoCollection} to execute the batch on.
- * Its {@link https://php.net/manual/en/mongo.writeconcerns.php write concern}
- * will be copied and used as the default write concern if none is given as $write_options
or during
- * {@see MongoWriteBatch::execute()}.
- * @param string $batch_type [optional]
- * One of:
- *
- * - 0 - make an MongoWriteBatch::COMMAND_INSERT batch
- * - 1 - make an MongoWriteBatch::COMMAND_UPDATE batch
- * - 2 - make a MongoWriteBatch::COMMAND_DELETE batch
- *
- * @param array $write_options [optional]
- * An array of Write Options.
key value meaning
- *
- * w (int|string) {@link https://php.net/manual/en/mongo.writeconcerns.php Write concern} value
- * wtimeout (int) {@link https://php.net/manual/en/mongo.writeconcerns.php Maximum time to wait for replication}
- * ordered Determins if MongoDB must apply this batch in order (sequentally, one item at a time) or can rearrange it.
- * Defaults to TRUE
- * j (bool) Wait for journaling on the primary. This value is discouraged, use WriteConcern instead
- * fsync (bool) Wait for fsync on the primary. This value is discouraged, use WriteConcern instead
- *
- */
- protected function __construct($collection, $batch_type, $write_options)
- {
- }
-
- /**
- * (PECL mongo >= 1.5.0)
- * Adds a write operation to a batch
- * @link https://php.net/manual/en/mongowritebatch.add.php
- * @param array $item
- * An array that describes a write operation. The structure of this value
- * depends on the batch's operation type.
- *
- *
- *
- * Batch type
- * Argument expectation
- *
- *
- *
- *
- *
- *
- * MongoWriteBatch::COMMAND_INSERT
- *
- * The document to add.
- *
- *
- *
- * MongoWriteBatch::COMMAND_UPDATE
- *
- * Raw update operation.
- * Required keys are "q" and "u", which correspond to the
- * $criteria
and parameters of {@see MongoCollection::update()}, respectively.
- * Optional keys are "multi" and "upsert", which correspond to the
- * "multiple" and "upsert" options for {@see MongoCollection::update()}, respectively.
- * If unspecified, both options default to FALSE
.
- *
- *
- *
- * MongoWriteBatch::COMMAND_DELETE
- *
- * Raw delete operation.
- * Required keys are: "q" and "limit", which correspond to the $criteria
parameter
- * and "justOne" option of {@see MongoCollection::remove()}, respectively.
- * The "limit" option is an integer; however, MongoDB only supports 0 (i.e. remove all matching
- * ocuments) and 1 (i.e. remove at most one matching document) at this time.
- *
- *
- *
- *
- * @return bool Returns TRUE on success and throws an exception on failure.
- */
- public function add(array $item)
- {
- }
-
- /**
- * (PECL mongo >= 1.5.0)
- * Executes a batch of write operations
- * @link https://php.net/manual/en/mongowritebatch.execute.php
- * @param array $write_options See {@see MongoWriteBatch::__construct}
- * @return array Returns an array containing statistical information for the full batch.
- * If the batch had to be split into multiple batches, the return value will aggregate the values from individual batches and return only the totals.
- * If the batch was empty, an array containing only the 'ok' field is returned (as TRUE(PECL mongo >= 1.5.0)
+ * MongoWriteBatch constructor.
+ * @link https://php.net/manual/en/mongowritebatch.construct.php
+ * @param MongoCollection $collection The {@see MongoCollection} to execute the batch on.
+ * Its {@link https://php.net/manual/en/mongo.writeconcerns.php write concern}
+ * will be copied and used as the default write concern if none is given as $write_options
or during
+ * {@see MongoWriteBatch::execute()}.
+ * @param string $batch_type [optional]
+ * One of:
+ *
+ * - 0 - make an MongoWriteBatch::COMMAND_INSERT batch
+ * - 1 - make an MongoWriteBatch::COMMAND_UPDATE batch
+ * - 2 - make a MongoWriteBatch::COMMAND_DELETE batch
+ *
+ * @param array $write_options [optional]
+ * An array of Write Options.
key value meaning
+ *
+ * w (int|string) {@link https://php.net/manual/en/mongo.writeconcerns.php Write concern} value
+ * wtimeout (int) {@link https://php.net/manual/en/mongo.writeconcerns.php Maximum time to wait for replication}
+ * ordered Determins if MongoDB must apply this batch in order (sequentally, one item at a time) or can rearrange it.
+ * Defaults to TRUE
+ * j (bool) Wait for journaling on the primary. This value is discouraged, use WriteConcern instead
+ * fsync (bool) Wait for fsync on the primary. This value is discouraged, use WriteConcern instead
+ *
+ */
+ protected function __construct($collection, $batch_type, $write_options) {}
+
+ /**
+ * (PECL mongo >= 1.5.0)
+ * Adds a write operation to a batch
+ * @link https://php.net/manual/en/mongowritebatch.add.php
+ * @param array $item
+ * An array that describes a write operation. The structure of this value
+ * depends on the batch's operation type.
+ *
+ *
+ *
+ * Batch type
+ * Argument expectation
+ *
+ *
+ *
+ *
+ *
+ *
+ * MongoWriteBatch::COMMAND_INSERT
+ *
+ * The document to add.
+ *
+ *
+ *
+ * MongoWriteBatch::COMMAND_UPDATE
+ *
+ * Raw update operation.
+ * Required keys are "q" and "u", which correspond to the
+ * $criteria
and $new_object
parameters of {@see MongoCollection::update()}, respectively.
+ * Optional keys are "multi" and "upsert", which correspond to the
+ * "multiple" and "upsert" options for {@see MongoCollection::update()}, respectively.
+ * If unspecified, both options default to FALSE
.
+ *
+ *
+ *
+ * MongoWriteBatch::COMMAND_DELETE
+ *
+ * Raw delete operation.
+ * Required keys are: "q" and "limit", which correspond to the $criteria
parameter
+ * and "justOne" option of {@see MongoCollection::remove()}, respectively.
+ * The "limit" option is an integer; however, MongoDB only supports 0 (i.e. remove all matching
+ * ocuments) and 1 (i.e. remove at most one matching document) at this time.
+ *
+ *
+ *
+ *
+ * @return bool Returns TRUE on success and throws an exception on failure.
+ */
+ public function add(array $item) {}
+
+ /**
+ * (PECL mongo >= 1.5.0)
+ * Executes a batch of write operations
+ * @link https://php.net/manual/en/mongowritebatch.execute.php
+ * @param array $write_options See {@see MongoWriteBatch::__construct}
+ * @return array Returns an array containing statistical information for the full batch.
+ * If the batch had to be split into multiple batches, the return value will aggregate the values from individual batches and return only the totals.
+ * If the batch was empty, an array containing only the 'ok' field is returned (as TRUE) although nothing will be shipped over the wire (NOOP).
+ */
+ final public function execute(array $write_options) {}
}
class MongoUpdateBatch extends MongoWriteBatch
{
-
- /**
- * (PECL mongo >= 1.5.0)
- * MongoUpdateBatch constructor.
- * @link https://php.net/manual/en/mongoupdatebatch.construct.php
- * @param MongoCollection $collection The MongoCollection to execute the batch on.
- * Its write concern will be copied and used as the default write concern
- * if none is given as $write_options or during {@see MongoWriteBatch::execute()}.
- * @param array $write_options An array of Write Options.
key value meaning
- *
- * w (int|string) {@link https://php.net/manual/en/mongo.writeconcerns.php Write concern} value
- * wtimeout (int) {@link https://php.net/manual/en/mongo.writeconcerns.php Maximum time to wait for replication}
- * ordered Determins if MongoDB must apply this batch in order (sequentally, one item at a time) or can rearrange it. Defaults to TRUE
- * j (bool) Wait for journaling on the primary. This value is discouraged, use WriteConcern instead
- * fsync (bool) Wait for fsync on the primary. This value is discouraged, use WriteConcern instead
- *
- */
- public function __construct(MongoCollection $collection, array $write_options)
- {
- }
-
-
-}
-
-class MongoException extends Exception {
-}
-
-class MongoCursorException extends MongoException {
-
+ /**
+ * (PECL mongo >= 1.5.0)
+ * MongoUpdateBatch constructor.
+ * @link https://php.net/manual/en/mongoupdatebatch.construct.php
+ * @param MongoCollection $collection The MongoCollection to execute the batch on.
+ * Its write concern will be copied and used as the default write concern
+ * if none is given as $write_options or during {@see MongoWriteBatch::execute()}.
+ * @param array $write_options An array of Write Options.
key value meaning
+ *
+ * w (int|string) {@link https://php.net/manual/en/mongo.writeconcerns.php Write concern} value
+ * wtimeout (int) {@link https://php.net/manual/en/mongo.writeconcerns.php Maximum time to wait for replication}
+ * ordered Determins if MongoDB must apply this batch in order (sequentally, one item at a time) or can rearrange it. Defaults to TRUE
+ * j (bool) Wait for journaling on the primary. This value is discouraged, use WriteConcern instead
+ * fsync (bool) Wait for fsync on the primary. This value is discouraged, use WriteConcern instead
+ *
+ */
+ public function __construct(MongoCollection $collection, array $write_options) {}
}
-class MongoCursorTimeoutException extends MongoCursorException {
+class MongoException extends Exception {}
-}
+class MongoCursorException extends MongoException {}
-class MongoConnectionException extends MongoException {
+class MongoCursorTimeoutException extends MongoCursorException {}
-}
+class MongoConnectionException extends MongoException {}
-class MongoGridFSException extends MongoException {
-
-}
+class MongoGridFSException extends MongoException {}
/**
* (PECL mongo >= 1.5.0)
* @link https://php.net/manual/en/class.mongowriteconcernexception.php#class.mongowriteconcernexception
*/
-class MongoWriteConcernException extends MongoCursorException {
+class MongoWriteConcernException extends MongoCursorException
+{
/**
* Get the error document
* @link https://php.net/manual/en/mongowriteconcernexception.getdocument.php
@@ -2355,43 +2362,39 @@ class MongoProtocolException extends MongoException {}
* (PECL mongo >= 1.5.0)
* @link https://php.net/manual/en/class.mongoduplicatekeyexception.php
*/
-class MongoDuplicateKeyException extends MongoWriteConcernException {
-
-}
+class MongoDuplicateKeyException extends MongoWriteConcernException {}
/**
* (PECL mongo >= 1.3.0)
* @link https://php.net/manual/en/class.mongoresultexception.php#mongoresultexception.props.document
- *
*/
-class MongoResultException extends MongoException {
+class MongoResultException extends MongoException
+{
/**
* (PECL mongo >= 1.3.0)
* Retrieve the full result document
* https://secure.php.net/manual/en/mongoresultexception.getdocument.php
* @return array The full result document as an array, including partial data if available and additional keys.
*/
- public function getDocument () {}
-
+ public function getDocument() {}
public $document;
-
-
}
-class MongoTimestamp {
+class MongoTimestamp
+{
/**
* @link https://php.net/manual/en/class.mongotimestamp.php#mongotimestamp.props.sec
- * @var $sec
+ * @var int
*/
public $sec;
/**
* @link https://php.net/manual/en/class.mongotimestamp.php#mongotimestamp.props.inc
- * @var $inc
+ * @var int
*/
public $inc;
- /**
+ /**
* Creates a new timestamp. If no parameters are given, the current time is used
* and the increment is automatically provided. The increment is set to 0 when the
* module is loaded and is incremented every time this constructor is called
@@ -2404,19 +2407,19 @@ class MongoTimestamp {
public function __construct($sec = 0, $inc) {}
/**
- * @return string
- */
+ * @return string
+ */
public function __toString() {}
}
-class MongoInt32 {
+class MongoInt32
+{
/**
* @link https://php.net/manual/en/class.mongoint32.php#mongoint32.props.value
- * @var $value
+ * @var string
*/
public $value;
-
/**
* Creates a new 32-bit number with the given value.
*
@@ -2426,19 +2429,19 @@ class MongoInt32 {
public function __construct($value) {}
/**
- * @return string
- */
+ * @return string
+ */
public function __toString() {}
}
-class MongoInt64 {
+class MongoInt64
+{
/**
* @link https://php.net/manual/en/class.mongoint64.php#mongoint64.props.value
- * @var $value
+ * @var string
*/
public $value;
-
/**
* Creates a new 64-bit number with the given value.
*
@@ -2448,63 +2451,63 @@ class MongoInt64 {
public function __construct($value) {}
/**
- * @return string
- */
+ * @return string
+ */
public function __toString() {}
}
-class MongoLog {
- /**
+class MongoLog
+{
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.none
*/
- const NONE = 0;
+ public const NONE = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.all
*/
- const ALL = 0;
+ public const ALL = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.warning
*/
- const WARNING = 0;
+ public const WARNING = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.info
*/
- const INFO = 0;
+ public const INFO = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.fine
*/
- const FINE = 0;
+ public const FINE = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.rs
*/
- const RS = 0;
+ public const RS = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.pool
*/
- const POOL = 0;
+ public const POOL = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.io
*/
- const IO = 0;
+ public const IO = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.server
*/
- const SERVER = 0;
+ public const SERVER = 0;
- /**
+ /**
* @link https://php.net/manual/en/class.mongolog.php#mongolog.constants.parse
*/
- const PARSE = 0;
-
- const CON = 2;
+ public const PARSE = 0;
+ public const CON = 2;
/**
* (PECL mongo >= 1.3.0)
@@ -2531,7 +2534,7 @@ class MongoLog {
* level
*
* One of the {@link https://secure.php.net/manual/en/class.mongolog.php#mongolog.constants.level MongoLog level constants}.
- *
*
* message
*
@@ -2539,7 +2542,7 @@ class MongoLog {
*
* @return bool Returns TRUE on success or FALSE on failure.
*/
- public static function setCallback ( callable $log_function ) {}
+ public static function setCallback(callable $log_function) {}
/**
* This function can be used to set how verbose logging should be and the types of
@@ -2547,7 +2550,6 @@ public static function setCallback ( callable $log_function ) {}
* section with bitwise operators to specify levels.
*
* @link https://php.net/manual/en/mongolog.setlevel.php
- * @static
* @param int $level The levels you would like to log
* @return void
*/
@@ -2558,7 +2560,6 @@ public static function setLevel($level) {}
* MongoLog section with bitwise operators to check the level.
*
* @link https://php.net/manual/en/mongolog.getlevel.php
- * @static
* @return int Returns the current level
*/
public static function getLevel() {}
@@ -2569,7 +2570,6 @@ public static function getLevel() {}
* bitwise operators to specify modules.
*
* @link https://php.net/manual/en/mongolog.setmodule.php
- * @static
* @param int $module The module(s) you would like to log
* @return void
*/
@@ -2581,18 +2581,17 @@ public static function setModule($module) {}
* operators to check if specific modules are being logged.
*
* @link https://php.net/manual/en/mongolog.getmodule.php
- * @static
* @return int Returns the modules currently being logged
*/
public static function getModule() {}
}
-class MongoPool {
+class MongoPool
+{
/**
* Returns an array of information about all connection pools.
*
* @link https://php.net/manual/en/mongopool.info.php
- * @static
* @return array Each connection pool has an identifier, which starts with the host. For
* each pool, this function shows the following fields: $in use The number of
* connections currently being used by Mongo instances. $in pool The number of
@@ -2620,7 +2619,6 @@ public static function info() {}
* Sets the max number of connections new pools will be able to create.
*
* @link https://php.net/manual/en/mongopool.setsize.php
- * @static
* @param int $size The max number of connections future pools will be able to
* create. Negative numbers mean that the pool will spawn an infinite number of
* connections
@@ -2632,16 +2630,11 @@ public static function setSize($size) {}
* .
*
* @link https://php.net/manual/en/mongopool.getsize.php
- * @static
* @return int Returns the current pool size
*/
public static function getSize() {}
}
+class MongoMaxKey {}
-class MongoMaxKey {
-}
-
-class MongoMinKey {
-}
-
+class MongoMinKey {}
diff --git a/mongodb/BSON/Binary.php b/mongodb/BSON/Binary.php
new file mode 100644
index 000000000..92652ae2d
--- /dev/null
+++ b/mongodb/BSON/Binary.php
@@ -0,0 +1,84 @@
+= 1.0.1 are `tlsv1.2`, `tlsv1.1` and `tlsv1`.
+ * @param string|null $ciphers A string describing the ciphers available for use. See the `openssl ciphers` tool for more information. If `null`, the default set will be used.
+ * @return int
+ */
+ public function setTlsOptions($certReqs, $tlsVersion = null, $ciphers = null) {}
+
+ /**
+ * Configure the client for pre-shared-key based TLS support. Must be called before `connect`. Cannot be used in
+ * conjunction with setTlsCertificates.
+ *
+ * @param string $psk The pre-shared key in hex format with no leading "0x".
+ * @param string $identity The identity of this client. May be used as the username depending on server settings.
+ * @param string|null $ciphers Optional. A string describing the ciphers available for use. See the `openssl ciphers` tool for more information. If `null`, the default set will be used.
+ * @return int
+ */
+ public function setTlsPSK($psk, $identity, $ciphers = null) {}
+
+ /**
+ * Set the client “last will and testament”, which will be sent on an unclean disconnection from the broker.
+ * Must be called before `connect`.
+ *
+ * @param string $topic The topic on which to publish the will.
+ * @param string $payload The data to send.
+ * @param int $qos Optional. Default 0. Integer 0, 1, or 2 indicating the Quality of Service to be used.
+ * @param bool $retain Optional. Default false. If true, the message will be retained.
+ */
+ public function setWill($topic, $payload, $qos = 0, $retain = false) {}
+
+ /**
+ * Remove a previously-set will. No parameters.
+ */
+ public function clearWill() {}
+
+ /**
+ * Control the behaviour of the client when it has unexpectedly disconnected in Client::loopForever().
+ * The default behaviour if this method is not used is to repeatedly attempt to reconnect with a delay of 1 second
+ * until the connection succeeds.
+ *
+ * @param int $reconnectDelay Set delay between successive reconnection attempts.
+ * @param int $exponentialDelay Set max delay between successive reconnection attempts when exponential backoff is enabled
+ * @param bool $exponentialBackoff Pass `true` to enable exponential backoff
+ */
+ public function setReconnectDelay($reconnectDelay, $exponentialDelay = 0, $exponentialBackoff = false) {}
+
+ /**
+ * Connect to an MQTT broker.
+ *
+ * @param string $host Hostname to connect to
+ * @param int $port Optional. Port number to connect to. Defaults to 1883.
+ * @param int $keepalive Optional. Number of sections after which the broker should PING the client if no messages have been received.
+ * @param string|null $interface Optional. The address or hostname of a local interface to bind to for this connection.
+ * @return int
+ */
+ public function connect($host, $port = 1883, $keepalive = 60, $interface = null) {}
+
+ /**
+ * Disconnect from the broker. No parameters.
+ */
+ public function disconnect() {}
+
+ /**
+ * Set the connect callback. This is called when the broker sends a CONNACK message in response to a connection.
+ *
+ * (int) $rc, (string) $message
+ * function ($rc, $message) {}
+ *
+ * Response codes:
+ * 0 = Success
+ * 1 = Connection refused (unacceptable protocol version)
+ * 2 = Connection refused (identifier rejected)
+ * 3 = Connection refused (broker unavailable)
+ * 4-255 = Reserved for future use
+ *
+ * @param callable $callback
+ */
+ public function onConnect($callback) {}
+
+ /**
+ * Set the disconnect callback. This is called when the broker has received the DISCONNECT command and has
+ * disconnected the client.
+ *
+ * (int) $rc
+ * function ($rc) {}
+ *
+ * Response codes:
+ * 0 = requested by client
+ * <0 = indicates an unexpected disconnection.
+ *
+ * @param callable $callback
+ */
+ public function onDisconnect($callback) {}
+
+ /**
+ * Set the logging callback.
+ *
+ * (int) $level, (string) $str
+ * function ($level, $str) {}
+ *
+ * Log levels:
+ * Client::LOG_DEBUG
+ * Client::LOG_INFO
+ * Client::LOG_NOTICE
+ * Client::LOG_WARNING
+ * Client::LOG_ERR
+ *
+ * @param callable $callback
+ */
+ public function onLog($callback) {}
+
+ /**
+ * Set the subscribe callback. This is called when the broker responds to a subscription request.
+ *
+ * (int) $mid, (int) $qosCount
+ * function ($mid, $qosCount) {}
+ *
+ * @param callable $callback
+ */
+ public function onSubscribe($callback) {}
+
+ /**
+ * Set the unsubscribe callback. This is called when the broker responds to a unsubscribe request.
+ *
+ * (int) $mid
+ * function ($mid) {}
+ *
+ * @param callable $callback
+ */
+ public function onUnsubscribe($callback) {}
+
+ /**
+ * Set the message callback. This is called when a message is received from the broker.
+ *
+ * (object) $message
+ * function (Mosquitto\Message $message) {}
+ *
+ * @param callable $callback
+ */
+ public function onMessage($callback) {}
+
+ /**
+ * Set the publish callback. This is called when a message is published by the client itself.
+ *
+ * Warning: this may be called before the method publish returns the message id, so, you need to create a queue to
+ * deal with the MID list.
+ *
+ * (int) $mid - the message id returned by `publish`
+ * function ($mid) {}
+ *
+ * @param callable $callback
+ */
+ public function onPublish($callback) {}
+
+ /**
+ * Set the number of QoS 1 and 2 messages that can be “in flight” at one time. An in flight message is part way
+ * through its delivery flow. Attempts to send further messages with publish will result in the messages
+ * being queued until the number of in flight messages reduces.
+ *
+ * Set to 0 for no maximum.
+ *
+ * @param int $maxInFlightMessages
+ */
+ public function setMaxInFlightMessages($maxInFlightMessages) {}
+
+ /**
+ * Set the number of seconds to wait before retrying messages. This applies to publishing messages with QoS > 0.
+ * May be called at any time.
+ *
+ * @param int $messageRetryPeriod The retry period
+ */
+ public function setMessageRetry($messageRetryPeriod) {}
+
+ /**
+ * Publish a message on a given topic.
+ * Return the message ID returned by the broker. Warning: the message ID is not unique.
+ *
+ * @param string $topic The topic to publish on
+ * @param string $payload The message payload
+ * @param int $qos Integer value 0, 1 or 2 indicating the QoS for this message
+ * @param bool $retain If true, retain this message
+ * @return int
+ */
+ public function publish($topic, $payload, $qos = 0, $retain = false) {}
+
+ /**
+ * Subscribe to a topic.
+ * Return the message ID of the subscription message, so this can be matched up in the `onSubscribe` callback.
+ *
+ * @param string $topic
+ * @param int $qos
+ * @return int
+ */
+ public function subscribe($topic, $qos) {}
+
+ /**
+ * Unsubscribe from a topic.
+ * Return the message ID of the subscription message, so this can be matched up in the `onUnsubscribe` callback.
+ *
+ * @param string $topic
+ * @param int $qos
+ * @return int
+ */
+ public function unsubscribe($topic, $qos) {}
+
+ /**
+ * The main network loop for the client. You must call this frequently in order to keep communications between
+ * the client and broker working. If incoming data is present it will then be processed. Outgoing commands,
+ * from e.g. `publish`, are normally sent immediately that their function is called, but this is not always possible.
+ * `loop` will also attempt to send any remaining outgoing messages, which also includes commands that are part
+ * of the flow for messages with QoS > 0.
+ *
+ * @param int $timeout Optional. Number of milliseconds to wait for network activity. Pass 0 for instant timeout.
+ */
+ public function loop($timeout = 1000) {}
+
+ /**
+ * Call loop() in an infinite blocking loop. Callbacks will be called as required. This will handle reconnecting
+ * if the connection is lost. Call `disconnect` in a callback to disconnect and return from the loop. Alternatively,
+ * call `exitLoop` to exit the loop without disconnecting. You will need to re-enter the loop again afterwards
+ * to maintain the connection.
+ *
+ * @param int $timeout Optional. Number of milliseconds to wait for network activity. Pass 0 for instant timeout.
+ */
+ public function loopForever($timeout = 1000) {}
+
+ /**
+ * Exit the `loopForever` event loop without disconnecting. You will need to re-enter the loop afterwards
+ * in order to maintain the connection.
+ */
+ public function exitLoop() {}
+}
+
+/**
+ * @link https://mosquitto-php.readthedocs.io/en/latest/message.html
+ */
+class Message
+{
+ /** @var string */
+ public $topic;
+
+ /** @var string */
+ public $payload;
+
+ /** @var int */
+ public $mid;
+
+ /** @var int */
+ public $qos;
+
+ /** @var bool */
+ public $retain;
+
+ /**
+ * Returns true if the supplied topic matches the supplied description, and otherwise false.
+ *
+ * @param string $topic The topic to match
+ * @param string $subscription The subscription to match
+ * @return bool
+ */
+ public static function topicMatchesSub($topic, $subscription) {}
+
+ /**
+ * Tokenise a topic or subscription string into an array of strings representing the topic hierarchy.
+ *
+ * @param string $topic
+ * @return array
+ */
+ public static function tokeniseTopic($topic) {}
+}
+
+/**
+ * @link https://mosquitto-php.readthedocs.io/en/latest/exception.html
+ */
+class Exception extends \Exception {}
diff --git a/mqseries/mqseries.php b/mqseries/mqseries.php
index 0f9880d72..30575ab05 100644
--- a/mqseries/mqseries.php
+++ b/mqseries/mqseries.php
@@ -2,143 +2,119 @@
/**
* @param resource $hconn
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_back($hconn, &$compCode, &$reason)
-{
-}
+function mqseries_back($hconn, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hconn
* @param array $beginOptions
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_begin($hconn, array $beginOptions, &$compCode, &$reason)
-{
-}
+function mqseries_begin($hconn, array $beginOptions, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hconn
* @param resource $hobj
* @param int $options
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_close($hconn, $hobj, $options, &$compCode, &$reason)
-{
-}
+function mqseries_close($hconn, $hobj, $options, &$compCode, &$reason) {}
/**
* @param resource $hconn
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_cmit($hconn, &$compCode, &$reason)
-{
-}
+function mqseries_cmit($hconn, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param string $qManagerName
- * @param resource $hconn
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$hconn
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_conn($qManagerName, &$hconn, &$compCode, &$reason)
-{
-}
+function mqseries_conn($qManagerName, &$hconn, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param string $qManagerName
- * @param array $connOptions
- * @param resource $hconn
- * @param resource $compCode
- * @param resource $reason
+ * @param array &$connOptions
+ * @param resource &$hconn
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_connx($qManagerName, array &$connOptions, &$hconn, &$compCode, &$reason)
-{
-}
+function mqseries_connx($qManagerName, array &$connOptions, &$hconn, &$compCode, &$reason) {}
/**
* @param resource $hconn
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_disc($hconn, &$compCode, &$reason)
-{
-}
+function mqseries_disc($hconn, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hConn
* @param resource $hObj
- * @param array $md
- * @param array $gmo
- * @param int $bufferLength
- * @param string $msg
- * @param int $data_length
- * @param resource $compCode
- * @param resource $reason
+ * @param array &$md
+ * @param array &$gmo
+ * @param int &$bufferLength
+ * @param string &$msg
+ * @param int &$data_length
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_get($hConn, $hObj, array &$md, array &$gmo, &$bufferLength, &$msg, &$data_length, &$compCode, &$reason)
-{
-}
+function mqseries_get($hConn, $hObj, array &$md, array &$gmo, &$bufferLength, &$msg, &$data_length, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hconn
* @param resource $hobj
* @param int $selectorCount
* @param array $selectors
* @param int $intAttrCount
- * @param resource $intAttr
+ * @param resource &$intAttr
* @param int $charAttrLength
- * @param resource $charAttr
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$charAttr
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_inq($hconn, $hobj, $selectorCount, array $selectors, $intAttrCount, &$intAttr, $charAttrLength, &$charAttr, &$compCode, &$reason)
-{
-}
+function mqseries_inq($hconn, $hobj, $selectorCount, array $selectors, $intAttrCount, &$intAttr, $charAttrLength, &$charAttr, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hconn
- * @param array $objDesc
+ * @param array &$objDesc
* @param int $option
- * @param resource $hobj
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$hobj
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_open($hconn, array &$objDesc, $option, &$hobj, &$compCode, &$reason)
-{
-}
+function mqseries_open($hconn, array &$objDesc, $option, &$hobj, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hconn
- * @param resource $objDesc
- * @param resource $msgDesc
- * @param resource $pmo
- * @param string $buffer
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$objDesc
+ * @param resource &$msgDesc
+ * @param resource &$pmo
+ * @param string &$buffer
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_put1($hconn, &$objDesc, &$msgDesc, &$pmo, $buffer, &$compCode, &$reason)
-{
-}
+function mqseries_put1($hconn, &$objDesc, &$msgDesc, &$pmo, $buffer, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hConn
* @param resource $hObj
- * @param array $md
- * @param array $pmo
+ * @param array &$md
+ * @param array &$pmo
* @param string $message
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_put($hConn, $hObj, array &$md, array &$pmo, $message, &$compCode, &$reason)
-{
-}
+function mqseries_put($hConn, $hObj, array &$md, array &$pmo, $message, &$compCode, &$reason) {}
-/** @noinspection MoreThanThreeArgumentsInspection
+/**
* @param resource $hconn
* @param resource $hobj
* @param int $selectorcount
@@ -147,12 +123,10 @@ function mqseries_put($hConn, $hObj, array &$md, array &$pmo, $message, &$compCo
* @param array $intattrs
* @param int $charattrlength
* @param array $charattrs
- * @param resource $compCode
- * @param resource $reason
+ * @param resource &$compCode
+ * @param resource &$reason
*/
-function mqseries_set($hconn, $hobj, $selectorcount, array $selectors, $intattrcount, array $intattrs, $charattrlength, array $charattrs, &$compCode, &$reason)
-{
-}
+function mqseries_set($hconn, $hobj, $selectorcount, array $selectors, $intattrcount, array $intattrs, $charattrlength, array $charattrs, &$compCode, &$reason) {}
/**
* @param int $reason
@@ -1487,4 +1461,3 @@ function mqseries_strerror($reason)
define('MQSERIES_MQSTAT_TYPE_ASYNC_ERROR', 0);
define('MQSERIES_MQSTAT_TYPE_RECONNECTION', 1);
define('MQSERIES_MQSTAT_TYPE_RECONNECTION_ERROR', 2);
-
diff --git a/msgpack/msgpack.php b/msgpack/msgpack.php
index 6a518c480..a071bb1cb 100644
--- a/msgpack/msgpack.php
+++ b/msgpack/msgpack.php
@@ -8,7 +8,6 @@
* Serialize a variable into msgpack format
* @param mixed $value
* @return string
- * @since 5.0
*/
function msgpack_serialize($value) {}
@@ -19,15 +18,13 @@ function msgpack_serialize($value) {}
* Undocumented template parameter
*
* @return mixed
- * @since 5.0
*/
-function msgpack_unserialize($str, $object=NULL) {}
+function msgpack_unserialize($str, $object = null) {}
/**
* Alias of msgpack_serialize
* @param mixed $value
* @return string
- * @since 5.0
*/
function msgpack_pack($value) {}
@@ -38,67 +35,54 @@ function msgpack_pack($value) {}
* Undocumented template parameter
*
* @return mixed
- * @since 5.0
*/
-function msgpack_unpack($str, $object = null)
-{
-}
+function msgpack_unpack($str, $object = null) {}
class MessagePack
{
- const OPT_PHPONLY = 1;
-
- public function __construct($opt)
- {
- }
+ public const OPT_PHPONLY = -1001;
- public function setOption($option, $value)
- {
- }
+ /**
+ * @param $opt [optional]
+ */
+ public function __construct($opt) {}
- public function pack($value)
- {
- }
+ public function setOption($option, $value) {}
- public function unpack($str, $object)
- {
- }
+ public function pack($value) {}
- public function unpacker()
- {
+ /**
+ * @param $str
+ * @param $object [optional]
+ */
+ public function unpack($str, $object) {}
- }
+ public function unpacker() {}
}
class MessagePackUnpacker
{
- public function __construct($opt)
- {
- }
-
- public function __destruct()
- {
- }
-
- public function setOption($option, $value)
- {
- }
+ /**
+ * @param $opt [optional]
+ */
+ public function __construct($opt) {}
- public function feed($str)
- {
- }
+ public function __destruct() {}
- public function execute($str, &$offset)
- {
- }
+ public function setOption($option, $value) {}
- public function data($object)
- {
+ public function feed($str) {}
- }
+ /**
+ * @param $str [optional]
+ * @param $offset [optional]
+ */
+ public function execute($str, &$offset) {}
- public function reset()
- {
+ /**
+ * @param $object [optional]
+ */
+ public function data($object) {}
- }
+ public function reset() {}
}
diff --git a/mssql/mssql.php b/mssql/mssql.php
index e60749d34..8d950c6d9 100644
--- a/mssql/mssql.php
+++ b/mssql/mssql.php
@@ -12,10 +12,10 @@
* hostname,port (Windows).
*
* @param string $username [optional]
- * The username.
+ * The username.
*
* @param string $password [optional]
- * The password.
+ * The password.
*
* @param bool $new_link [optional]
* If a second call is made to mssql_connect with the
@@ -26,22 +26,23 @@
* called before with the same parameters.
*
* @return resource|false a MS SQL link identifier on success, or false on error.
+ * @removed 7.0
*/
-function mssql_connect ($servername = null, $username = null, $password = null, $new_link = false) {}
+function mssql_connect($servername = null, $username = null, $password = null, $new_link = false) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
* Open persistent MS SQL connection
* @link https://php.net/manual/en/function.mssql-pconnect.php
* @param string $servername [optional]
- * The MS SQL server. It can also include a port number. e.g.
+ * The MS SQL server. It can also include a port number. e.g.
* hostname:port.
*
* @param string $username [optional]
- * The username.
+ * The username.
*
* @param string $password [optional]
- * The password.
+ * The password.
*
* @param bool $new_link [optional]
* If a second call is made to mssql_pconnect with
@@ -52,17 +53,18 @@ function mssql_connect ($servername = null, $username = null, $password = null,
* mssql_pconnect was called before with the same
* parameters.
*
- * @return resource a positive MS SQL persistent link identifier on success, or
+ * @return resource|false a positive MS SQL persistent link identifier on success, or
* false on error.
+ * @removed 7.0
*/
-function mssql_pconnect ($servername = null, $username = null, $password = null, $new_link = false) {}
+function mssql_pconnect($servername = null, $username = null, $password = null, $new_link = false) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
* Close MS SQL Server connection
* @link https://php.net/manual/en/function.mssql-close.php
* @param resource $link_identifier [optional]
- * A MS SQL link identifier, returned by
+ * A MS SQL link identifier, returned by
* mssql_connect.
*
*
@@ -70,8 +72,9 @@ function mssql_pconnect ($servername = null, $username = null, $password = null,
* mssql_pconnect.
*
* @return bool true on success or false on failure.
+ * @removed 7.0
*/
-function mssql_close ($link_identifier = null) {}
+function mssql_close($link_identifier = null) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -88,8 +91,8 @@ function mssql_close ($link_identifier = null) {}
* also a reserved word (such as primary).
*
* @param resource $link_identifier [optional]
- * A MS SQL link identifier, returned by
- * mssql_connect or
+ * A MS SQL link identifier, returned by
+ * mssql_connect or
* mssql_pconnect.
*
*
@@ -98,8 +101,9 @@ function mssql_close ($link_identifier = null) {}
* mssql_connect was called, and use it.
*
* @return bool true on success or false on failure.
+ * @removed 7.0
*/
-function mssql_select_db ($database_name, $link_identifier = null) {}
+function mssql_select_db($database_name, $link_identifier = null) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -109,8 +113,8 @@ function mssql_select_db ($database_name, $link_identifier = null) {}
* An SQL query.
*
* @param resource $link_identifier [optional]
- * A MS SQL link identifier, returned by
- * mssql_connect or
+ * A MS SQL link identifier, returned by
+ * mssql_connect or
* mssql_pconnect.
*
*
@@ -121,10 +125,11 @@ function mssql_select_db ($database_name, $link_identifier = null) {}
* @param int $batch_size [optional]
* The number of records to batch in the buffer.
*
- * @return mixed a MS SQL result resource on success, true if no rows were
+ * @return resource|bool a MS SQL result resource on success, true if no rows were
* returned, or false on error.
+ * @removed 7.0
*/
-function mssql_query ($query, $link_identifier = null, $batch_size = 0) {}
+function mssql_query($query, $link_identifier = null, $batch_size = 0) {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PECL odbtp >= 1.1.1)
@@ -135,21 +140,23 @@ function mssql_query ($query, $link_identifier = null, $batch_size = 0) {}
* call to mssql_query.
*
* @return int the batch number as an integer.
+ * @removed 7.0
*/
-function mssql_fetch_batch ($result) {}
+function mssql_fetch_batch($result) {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PECL odbtp >= 1.1.1)
* Returns the number of records affected by the query
* @link https://php.net/manual/en/function.mssql-rows-affected.php
* @param resource $link_identifier
- * A MS SQL link identifier, returned by
- * mssql_connect or
+ * A MS SQL link identifier, returned by
+ * mssql_connect or
* mssql_pconnect.
*
* @return int the number of records affected by last operation.
+ * @removed 7.0
*/
-function mssql_rows_affected ($link_identifier) {}
+function mssql_rows_affected($link_identifier) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -160,17 +167,19 @@ function mssql_rows_affected ($link_identifier) {}
* call to mssql_query.
*
* @return bool true on success or false on failure.
+ * @removed 7.0
*/
-function mssql_free_result ($result) {}
+function mssql_free_result($result) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
* Returns the last message from the server
* @link https://php.net/manual/en/function.mssql-get-last-message.php
- * @return string last error message from server, or an empty string if
+ * @return string last error message from server, or an empty string if
* no error messages are returned from MSSQL.
+ * @removed 7.0
*/
-function mssql_get_last_message () {}
+function mssql_get_last_message() {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -181,8 +190,9 @@ function mssql_get_last_message () {}
* call to mssql_query.
*
* @return int the number of rows, as an integer.
+ * @removed 7.0
*/
-function mssql_num_rows ($result) {}
+function mssql_num_rows($result) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -193,8 +203,9 @@ function mssql_num_rows ($result) {}
* call to mssql_query.
*
* @return int the number of fields, as an integer.
+ * @removed 7.0
*/
-function mssql_num_fields ($result) {}
+function mssql_num_fields($result) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -210,11 +221,9 @@ function mssql_num_fields ($result) {}
* field_offset starts at 0.
*
* @return object an object containing field information.
- *
- *
- * The properties of the object are:
+ * @removed 7.0
*/
-function mssql_fetch_field ($result, $field_offset = -1) {}
+function mssql_fetch_field($result, $field_offset = -1) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -226,8 +235,9 @@ function mssql_fetch_field ($result, $field_offset = -1) {}
*
* @return array|false an array that corresponds to the fetched row, or false if there
* are no more rows.
+ * @removed 7.0
*/
-function mssql_fetch_row ($result) {}
+function mssql_fetch_row($result) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -239,14 +249,15 @@ function mssql_fetch_row ($result) {}
*
* @param int $result_type [optional]
* The type of array that is to be fetched. It's a constant and can take
- * the following values: MSSQL_ASSOC,
+ * the following values: MSSQL_ASSOC,
* MSSQL_NUM, and
* MSSQL_BOTH.
*
* @return array|false an array that corresponds to the fetched row, or false if there
* are no more rows.
+ * @removed 7.0
*/
-function mssql_fetch_array ($result, $result_type = MSSQL_BOTH) {}
+function mssql_fetch_array($result, $result_type = MSSQL_BOTH) {}
/**
* (PHP 4 >= 4.2.0, PHP 5, PECL odbtp >= 1.1.1)
@@ -258,8 +269,9 @@ function mssql_fetch_array ($result, $result_type = MSSQL_BOTH) {}
*
* @return array an associative array that corresponds to the fetched row, or
* false if there are no more rows.
+ * @removed 7.0
*/
-function mssql_fetch_assoc ($result_id) {}
+function mssql_fetch_assoc($result_id) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -271,8 +283,9 @@ function mssql_fetch_assoc ($result_id) {}
*
* @return object an object with properties that correspond to the fetched row, or
* false if there are no more rows.
+ * @removed 7.0
*/
-function mssql_fetch_object ($result) {}
+function mssql_fetch_object($result) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -286,8 +299,9 @@ function mssql_fetch_object ($result) {}
* The field offset, starts at 0. If omitted, the current field is used.
*
* @return int|false The length of the specified field index on success or false on failure.
+ * @removed 7.0
*/
-function mssql_field_length ($result, $offset = null) {}
+function mssql_field_length($result, $offset = null) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -301,8 +315,9 @@ function mssql_field_length ($result, $offset = null) {}
* The field offset, starts at 0. If omitted, the current field is used.
*
* @return string|false The name of the specified field index on success or false on failure.
+ * @removed 7.0
*/
-function mssql_field_name ($result, $offset = -1) {}
+function mssql_field_name($result, $offset = -1) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -316,22 +331,24 @@ function mssql_field_name ($result, $offset = -1) {}
* The field offset, starts at 0. If omitted, the current field is used.
*
* @return string|false The type of the specified field index on success or false on failure.
+ * @removed 7.0
*/
-function mssql_field_type ($result, $offset = -1) {}
+function mssql_field_type($result, $offset = -1) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
* Moves internal row pointer
* @link https://php.net/manual/en/function.mssql-data-seek.php
* @param resource $result_identifier
- * The result resource that is being evaluated.
+ * The result resource that is being evaluated.
*
* @param int $row_number
- * The desired row number of the new result pointer.
+ * The desired row number of the new result pointer.
*
* @return bool true on success or false on failure.
+ * @removed 7.0
*/
-function mssql_data_seek ($result_identifier, $row_number) {}
+function mssql_data_seek($result_identifier, $row_number) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -345,8 +362,9 @@ function mssql_data_seek ($result_identifier, $row_number) {}
* The field offset, starts at 0.
*
* @return bool true on success or false on failure.
+ * @removed 7.0
*/
-function mssql_field_seek ($result, $field_offset) {}
+function mssql_field_seek($result, $field_offset) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -367,13 +385,14 @@ function mssql_field_seek ($result, $field_offset) {}
*
*
* Specifying a numeric offset for the field
- * argument is much quicker than specifying a
- * fieldname or
+ * argument is much quicker than specifying a
+ * fieldname or
* tablename.fieldname argument.
*
* @return string the contents of the specified cell.
+ * @removed 7.0
*/
-function mssql_result ($result, $row, $field) {}
+function mssql_result($result, $row, $field) {}
/**
* (PHP 4 >= 4.0.5, PHP 5, PECL odbtp >= 1.1.1)
@@ -385,8 +404,9 @@ function mssql_result ($result, $row, $field) {}
*
* @return bool true if an additional result set was available or false
* otherwise.
+ * @removed 7.0
*/
-function mssql_next_result ($result_id) {}
+function mssql_next_result($result_id) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -395,9 +415,10 @@ function mssql_next_result ($result_id) {}
* @param int $severity
* The new error severity.
*
- * @return void
+ * @return void
+ * @removed 7.0
*/
-function mssql_min_error_severity ($severity) {}
+function mssql_min_error_severity($severity) {}
/**
* (PHP 4, PHP 5, PECL odbtp >= 1.1.1)
@@ -406,9 +427,10 @@ function mssql_min_error_severity ($severity) {}
* @param int $severity
* The new message severity.
*
- * @return void
+ * @return void
+ * @removed 7.0
*/
-function mssql_min_message_severity ($severity) {}
+function mssql_min_message_severity($severity) {}
/**
* (PHP 4 >= 4.0.7, PHP 5, PECL odbtp >= 1.1.1)
@@ -416,17 +438,18 @@ function mssql_min_message_severity ($severity) {}
* @link https://php.net/manual/en/function.mssql-init.php
* @param string $sp_name
* Stored procedure name, like ownew.sp_name or
- * otherdb.owner.sp_name.
+ * otherdb.owner.sp_name.
*
* @param resource $link_identifier [optional]
- * A MS SQL link identifier, returned by
+ * A MS SQL link identifier, returned by
* mssql_connect.
*
- * @return resource a resource identifier "statement", used in subsequent calls to
+ * @return resource|false a resource identifier "statement", used in subsequent calls to
* mssql_bind and mssql_execute,
* or false on errors.
+ * @removed 7.0
*/
-function mssql_init ($sp_name, $link_identifier = null) {}
+function mssql_init($sp_name, $link_identifier = null) {}
/**
* (PHP 4 >= 4.0.7, PHP 5, PECL odbtp >= 1.1.1)
@@ -441,25 +464,25 @@ function mssql_init ($sp_name, $link_identifier = null) {}
*
* You have to include the @ character, like in the
* T-SQL syntax. See the explanation included in
- * mssql_execute.
+ * mssql_execute.
*
- * @param mixed $var
+ * @param mixed &$var
* The PHP variable you'll bind the MSSQL parameter to. It is passed by
* reference, to retrieve OUTPUT and RETVAL values after
- * the procedure execution.
+ * the procedure execution.
*
* @param int $type
- * One of: SQLTEXT,
+ * One of: SQLTEXT,
* SQLVARCHAR, SQLCHAR,
* SQLINT1, SQLINT2,
* SQLINT4, SQLBIT,
* SQLFLT4, SQLFLT8,
- * SQLFLTN.
+ * SQLFLTN.
*
* @param bool $is_output [optional]
* Whether the value is an OUTPUT parameter or not. If it's an OUTPUT
* parameter and you don't mention it, it will be treated as a normal
- * input parameter and no error will be thrown.
+ * input parameter and no error will be thrown.
*
* @param bool $is_null [optional]
* Whether the parameter is null or not. Passing the null value as
@@ -467,26 +490,28 @@ function mssql_init ($sp_name, $link_identifier = null) {}
*
* @param int $maxlen [optional]
* Used with char/varchar values. You have to indicate the length of the
- * data so if the parameter is a varchar(50), the type must be
+ * data so if the parameter is a varchar(50), the type must be
* SQLVARCHAR and this value 50.
*
* @return bool true on success or false on failure.
+ * @removed 7.0
*/
-function mssql_bind ($stmt, $param_name, &$var, $type, $is_output = false, $is_null = false, $maxlen = -1) {}
+function mssql_bind($stmt, $param_name, &$var, $type, $is_output = false, $is_null = false, $maxlen = -1) {}
/**
* (PHP 4 >= 4.0.7, PHP 5, PECL odbtp >= 1.1.1)
* Executes a stored procedure on a MS SQL server database
* @link https://php.net/manual/en/function.mssql-execute.php
* @param resource $stmt
- * Statement handle obtained with mssql_init.
+ * Statement handle obtained with mssql_init.
*
* @param bool $skip_results [optional]
* Whenever to skip the results or not.
*
- * @return mixed
+ * @return mixed
+ * @removed 7.0
*/
-function mssql_execute ($stmt, $skip_results = false) {}
+function mssql_execute($stmt, $skip_results = false) {}
/**
* (PHP 4 >= 4.3.2, PHP 5, PECL odbtp >= 1.1.1)
@@ -496,8 +521,9 @@ function mssql_execute ($stmt, $skip_results = false) {}
* Statement resource, obtained with mssql_init.
*
* @return bool true on success or false on failure.
+ * @removed 7.0
*/
-function mssql_free_statement ($stmt) {}
+function mssql_free_statement($stmt) {}
/**
* (PHP 4 >= 4.0.7, PHP 5, PECL odbtp >= 1.1.1)
@@ -510,99 +536,98 @@ function mssql_free_statement ($stmt) {}
* Whenever to use short format.
*
* @return string the converted string on success.
+ * @removed 7.0
*/
-function mssql_guid_string ($binary, $short_format = null) {}
-
+function mssql_guid_string($binary, $short_format = null) {}
/**
- * Return an associative array. Used on
- * mssql_fetch_array's
+ * Return an associative array. Used on
+ * mssql_fetch_array's
* result_type parameter.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('MSSQL_ASSOC', 1);
+define('MSSQL_ASSOC', 1);
/**
- * Return an array with numeric keys. Used on
- * mssql_fetch_array's
+ * Return an array with numeric keys. Used on
+ * mssql_fetch_array's
* result_type parameter.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('MSSQL_NUM', 2);
+define('MSSQL_NUM', 2);
/**
- * Return an array with both numeric keys and
- * keys with their field name. This is the
- * default value for mssql_fetch_array's
+ * Return an array with both numeric keys and
+ * keys with their field name. This is the
+ * default value for mssql_fetch_array's
* result_type parameter.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('MSSQL_BOTH', 3);
+define('MSSQL_BOTH', 3);
/**
- * Indicates the 'TEXT' type in MSSQL, used by
- * mssql_bind's type
+ * Indicates the 'TEXT' type in MSSQL, used by
+ * mssql_bind's type
* parameter.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLTEXT', 35);
+define('SQLTEXT', 35);
/**
- * Indicates the 'VARCHAR' type in MSSQL, used by
- * mssql_bind's type
+ * Indicates the 'VARCHAR' type in MSSQL, used by
+ * mssql_bind's type
* parameter.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLVARCHAR', 39);
+define('SQLVARCHAR', 39);
/**
- * Indicates the 'CHAR' type in MSSQL, used by
- * mssql_bind's type
+ * Indicates the 'CHAR' type in MSSQL, used by
+ * mssql_bind's type
* parameter.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLCHAR', 47);
+define('SQLCHAR', 47);
/**
* Represents one byte, with a range of -128 to 127.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLINT1', 48);
+define('SQLINT1', 48);
/**
- * Represents two bytes, with a range of -32768
+ * Represents two bytes, with a range of -32768
* to 32767.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLINT2', 52);
+define('SQLINT2', 52);
/**
- * Represents four bytes, with a range of -2147483648
+ * Represents four bytes, with a range of -2147483648
* to 2147483647.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLINT4', 56);
+define('SQLINT4', 56);
/**
- * Indicates the 'BIT' type in MSSQL, used by
- * mssql_bind's type
+ * Indicates the 'BIT' type in MSSQL, used by
+ * mssql_bind's type
* parameter.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLBIT', 50);
+define('SQLBIT', 50);
/**
* Represents an four byte float.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLFLT4', 59);
+define('SQLFLT4', 59);
/**
* Represents an eight byte float.
* @link https://php.net/manual/en/mssql.constants.php
*/
-define ('SQLFLT8', 62);
-define ('SQLFLTN', 109);
+define('SQLFLT8', 62);
+define('SQLFLTN', 109);
// End of mssql v.
-?>
diff --git a/mysql/mysql.php b/mysql/mysql.php
index e6a8ae1f5..261cdb5eb 100644
--- a/mysql/mysql.php
+++ b/mysql/mysql.php
@@ -2,30 +2,30 @@
// Start of mysql v.1.0
// @deprecated 5.5 entire extension is deprecated in favor of mysqli
+use JetBrains\PhpStorm\Deprecated;
/**
- * @deprecated 5.5
* Open a connection to a MySQL Server
* @link https://php.net/manual/en/function.mysql-connect.php
* @param string $server [optional]
- * The MySQL server. It can also include a port number. e.g.
- * "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for
+ * The MySQL server. It can also include a port number. e.g.
+ * "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for
* the localhost.
*
*
- * If the PHP directive
- * mysql.default_host is undefined (default), then the default
- * value is 'localhost:3306'. In &sqlsafemode;, this parameter is ignored
+ * If the PHP directive
+ * mysql.default_host is undefined (default), then the default
+ * value is 'localhost:3306'. In "ini.sql.safe-mode", this parameter is ignored
* and value 'localhost:3306' is always used.
*
* @param string $username [optional]
* The username. Default value is defined by mysql.default_user. In
- * &sqlsafemode;, this parameter is ignored and the name of the user that
+ * "ini.sql.safe-mode", this parameter is ignored and the name of the user that
* owns the server process is used.
*
* @param string $password [optional]
* The password. Default value is defined by mysql.default_password. In
- * &sqlsafemode;, this parameter is ignored and empty password is used.
+ * "ini.sql.safe-mode", this parameter is ignored and empty password is used.
*
* @param bool $new_link [optional]
* If a second call is made to mysql_connect
@@ -35,7 +35,7 @@
* behavior and makes mysql_connect always open
* a new link, even if mysql_connect was called
* before with the same parameters.
- * In &sqlsafemode;, this parameter is ignored.
+ * In "ini.sql.safe-mode", this parameter is ignored.
*
* @param int $client_flags [optional]
* The client_flags parameter can be a combination
@@ -46,26 +46,25 @@
* MYSQL_CLIENT_IGNORE_SPACE or
* MYSQL_CLIENT_INTERACTIVE.
* Read the section about for further information.
- * In &sqlsafemode;, this parameter is ignored.
+ * In "ini.sql.safe-mode", this parameter is ignored.
*
* @return resource|false a MySQL link identifier on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_connect ($server = 'ini_get("mysql.default_host")', $username = 'ini_get("mysql.default_user")', $password = 'ini_get("mysql.default_password")', $new_link = false, $client_flags = 0) {}
+#[Deprecated(since: '5.5')]
+function mysql_connect($server = 'ini_get("mysql.default_host")', $username = 'ini_get("mysql.default_user")', $password = 'ini_get("mysql.default_password")', $new_link = false, $client_flags = 0) {}
/**
- * @deprecated 5.5
* Open a persistent connection to a MySQL server
* @link https://php.net/manual/en/function.mysql-pconnect.php
* @param string $server [optional]
- * The MySQL server. It can also include a port number. e.g.
- * "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for
+ * The MySQL server. It can also include a port number. e.g.
+ * "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for
* the localhost.
*
*
- * If the PHP directive
- * mysql.default_host is undefined (default), then the default
+ * If the PHP directive
+ * mysql.default_host is undefined (default), then the default
* value is 'localhost:3306'
*
* @param string $username [optional]
@@ -86,38 +85,35 @@ function mysql_connect ($server = 'ini_get("mysql.default_host")', $username = '
*
* @return resource|false a MySQL persistent link identifier on success, or false on
* failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_pconnect ($server = 'ini_get("mysql.default_host")', $username = 'ini_get("mysql.default_user")', $password = 'ini_get("mysql.default_password")', $client_flags = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_pconnect($server = 'ini_get("mysql.default_host")', $username = 'ini_get("mysql.default_user")', $password = 'ini_get("mysql.default_password")', $client_flags = null) {}
/**
- * @deprecated 5.5
* Close MySQL connection
* @link https://php.net/manual/en/function.mysql-close.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return bool true on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_close ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_close($link_identifier = null) {}
/**
- * @deprecated 5.5
* Select a MySQL database
* @link https://php.net/manual/en/function.mysql-select-db.php
* @param string $database_name
* The name of the database that is to be selected.
*
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return bool true on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_select_db ($database_name, $link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_select_db($database_name, $link_identifier = null) {}
/**
- * @deprecated 5.5
* Send a MySQL query
* @link https://php.net/manual/en/function.mysql-query.php
* @param string $query
@@ -127,7 +123,7 @@ function mysql_select_db ($database_name, $link_identifier = null) {}
* The query string should not end with a semicolon.
* Data inside the query should be properly escaped.
*
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return resource|bool For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset,
* mysql_query
* returns a resource on success, or false on
@@ -154,10 +150,10 @@ function mysql_select_db ($database_name, $link_identifier = null) {}
* mysql_query will also fail and return false
* if the user does not have permission to access the table(s) referenced by
* the query.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_query ($query, $link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_query($query, $link_identifier = null) {}
/**
* @deprecated 5.5
@@ -169,8 +165,8 @@ function mysql_query ($query, $link_identifier = null) {}
*
* Data inside the query should be properly escaped.
*
- * @param resource $link_identifier [optional]
- * @return resource For SELECT, SHOW, DESCRIBE or EXPLAIN statements,
+ * @param resource $link_identifier [optional]
+ * @return resource|bool For SELECT, SHOW, DESCRIBE or EXPLAIN statements,
* mysql_unbuffered_query
* returns a resource on success, or false on
* error.
@@ -179,15 +175,14 @@ function mysql_query ($query, $link_identifier = null) {}
* For other type of SQL statements, UPDATE, DELETE, DROP, etc,
* mysql_unbuffered_query returns true on success
* or false on error.
- * @since 4.0.6
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_unbuffered_query ($query, $link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_unbuffered_query($query, $link_identifier = null) {}
/**
* Selects a database and executes a query on it
* @link https://php.net/manual/en/function.mysql-db-query.php
- * @deprecated 5.3 Use mysql_select_db() and mysql_query() instead
* @param string $database
* The name of the database that will be selected.
*
@@ -197,29 +192,30 @@ function mysql_unbuffered_query ($query, $link_identifier = null) {}
*
* Data inside the query should be properly escaped.
*
- * @param resource $link_identifier [optional]
- * @return resource a positive MySQL result resource to the query result,
+ * @param resource $link_identifier [optional]
+ * @return resource|bool a positive MySQL result resource to the query result,
* or false on error. The function also returns true/false for
* INSERT/UPDATE/DELETE
* queries to indicate success/failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
+ * @see mysql_select_db()
+ * @see mysql_query()
*/
-function mysql_db_query ($database, $query, $link_identifier = null) {}
+#[Deprecated('Use mysql_select_db() and mysql_query() instead', since: '5.3')]
+function mysql_db_query($database, $query, $link_identifier = null) {}
/**
* List databases available on a MySQL server
* @link https://php.net/manual/en/function.mysql-list-dbs.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return resource|false a result pointer resource on success, or false on
* failure. Use the mysql_tablename function to traverse
- * this result pointer, or any function for result tables, such as
+ * this result pointer, or any function for result tables, such as
* mysql_fetch_array.
- * @deprecated 5.4
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_list_dbs ($link_identifier = null) {}
+#[Deprecated(since: '5.4')]
+function mysql_list_dbs($link_identifier = null) {}
/**
* List tables in a MySQL database
@@ -227,21 +223,19 @@ function mysql_list_dbs ($link_identifier = null) {}
* @param string $database
* The name of the database
*
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return resource|false A result pointer resource on success or false on failure.
- *
*
* Use the mysql_tablename function to
* traverse this result pointer, or any function for result tables,
* such as mysql_fetch_array.
- * @deprecated 5.2
- * @since 4.0
- * @since 5.0
+ *
+ * @removed 7.0
*/
-function mysql_list_tables ($database, $link_identifier = null) {}
+#[Deprecated(since: '5.3')]
+function mysql_list_tables($database, $link_identifier = null) {}
/**
- * @deprecated 5.5
* List MySQL table fields
* @link https://php.net/manual/en/function.mysql-list-fields.php
* @param string $database_name
@@ -250,60 +244,56 @@ function mysql_list_tables ($database, $link_identifier = null) {}
* @param string $table_name
* The name of the table that's being queried.
*
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return resource|false A result pointer resource on success, or false on
* failure.
*
*
* The returned result can be used with mysql_field_flags,
* mysql_field_len,
- * mysql_field_name&listendand;
+ * mysql_field_name
* mysql_field_type.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_list_fields ($database_name, $table_name, $link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_list_fields($database_name, $table_name, $link_identifier = null) {}
/**
- * @deprecated 5.5
* List MySQL processes
* @link https://php.net/manual/en/function.mysql-list-processes.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return resource|false A result pointer resource on success or false on failure.
- * @since 4.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_list_processes ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_list_processes($link_identifier = null) {}
/**
- * @deprecated 5.5
* Returns the text of the error message from previous MySQL operation
* @link https://php.net/manual/en/function.mysql-error.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return string the error text from the last MySQL function, or
* '' (empty string) if no error occurred.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_error ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_error($link_identifier = null) {}
/**
- * @deprecated 5.5
* Returns the numerical value of the error message from previous MySQL operation
* @link https://php.net/manual/en/function.mysql-errno.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return int the error number from the last MySQL function, or
* 0 (zero) if no error occurred.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_errno ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_errno($link_identifier = null) {}
/**
- * @deprecated 5.5
* Get number of affected rows in previous MySQL operation
* @link https://php.net/manual/en/function.mysql-affected-rows.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return int the number of affected rows on success, and -1 if the last query
* failed.
*
@@ -313,89 +303,84 @@ function mysql_errno ($link_identifier = null) {}
* function will return zero with MySQL versions prior to 4.1.2.
*
*
- * When using UPDATE, MySQL will not update columns where the new value is the
- * same as the old value. This creates the possibility that
+ * When using UPDATE, MySQL will not update columns where the new value is the
+ * same as the old value. This creates the possibility that
* mysql_affected_rows may not actually equal the number
- * of rows matched, only the number of rows that were literally affected by
+ * of rows matched, only the number of rows that were literally affected by
* the query.
*
*
- * The REPLACE statement first deletes the record with the same primary key
- * and then inserts the new record. This function returns the number of
+ * The REPLACE statement first deletes the record with the same primary key
+ * and then inserts the new record. This function returns the number of
* deleted records plus the number of inserted records.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_affected_rows ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_affected_rows($link_identifier = null) {}
/**
- * @deprecated 5.5
* Get the ID generated in the last query
* @link https://php.net/manual/en/function.mysql-insert-id.php
- * @param resource $link_identifier [optional]
- * @return int The ID generated for an AUTO_INCREMENT column by the previous
+ * @param resource $link_identifier [optional]
+ * @return int The ID generated for an AUTO_INCREMENT column by the previous
* query on success, 0 if the previous
* query does not generate an AUTO_INCREMENT value, or false if
* no MySQL connection was established.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_insert_id ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_insert_id($link_identifier = null) {}
/**
- * @deprecated 5.5
* Get result data
* @link https://php.net/manual/en/function.mysql-result.php
- * @param resource $result
+ * @param resource $result
* @param int $row
- * The row number from the result that's being retrieved. Row numbers
+ * The row number from the result that's being retrieved. Row numbers
* start at 0.
*
* @param mixed $field [optional]
* The name or offset of the field being retrieved.
*
*
- * It can be the field's offset, the field's name, or the field's table
+ * It can be the field's offset, the field's name, or the field's table
* dot field name (tablename.fieldname). If the column name has been
- * aliased ('select foo as bar from...'), use the alias instead of the
+ * aliased ('select foo as bar from...'), use the alias instead of the
* column name. If undefined, the first field is retrieved.
*
- * @return string The contents of one cell from a MySQL result set on success, or
+ * @return string The contents of one cell from a MySQL result set on success, or
* false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_result ($result, $row, $field = 0) {}
+#[Deprecated(since: '5.5')]
+function mysql_result($result, $row, $field = 0) {}
/**
* Get number of rows in result
* @link https://php.net/manual/en/function.mysql-num-rows.php
* @param resource $result The result resource that is being evaluated. This result comes from a call to mysql_query().
* @return int|false The number of rows in the result set on success or FALSE on failure.
- * @since 4.0
- * @since 5.0
- * @deprecated 5.5
+ * @removed 7.0
*/
-function mysql_num_rows ($result) {}
+#[Deprecated(since: '5.5')]
+function mysql_num_rows($result) {}
/**
- * @deprecated 5.5
* Get number of fields in result
* @link https://php.net/manual/en/function.mysql-num-fields.php
- * @param resource $result
+ * @param resource $result
* @return int the number of fields in the result set resource on
* success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_num_fields ($result) {}
+#[Deprecated(since: '5.5')]
+function mysql_num_fields($result) {}
/**
- * @deprecated 5.5
* Get a result row as an enumerated array
* @link https://php.net/manual/en/function.mysql-fetch-row.php
- * @param resource $result
- * @return array an numerical array of strings that corresponds to the fetched row, or
+ * @param resource $result
+ * @return array an numerical array of strings that corresponds to the fetched row, or
* false if there are no more rows.
*
*
@@ -403,16 +388,15 @@ function mysql_num_fields ($result) {}
* the result associated with the specified result identifier. The
* row is returned as an array. Each result column is stored in an
* array offset, starting at offset 0.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_fetch_row ($result) {}
+#[Deprecated(since: '5.5')]
+function mysql_fetch_row($result) {}
/**
- * @deprecated 5.5
* Fetch a result row as an associative array, a numeric array, or both
* @link https://php.net/manual/en/function.mysql-fetch-array.php
- * @param resource $result
+ * @param resource $result
* @param int $result_type [optional]
* The type of array that is to be fetched. It's a constant and can
* take the following values: MYSQL_ASSOC,
@@ -434,17 +418,16 @@ function mysql_fetch_row ($result) {}
* of the same name, you must use the numeric index of the column or
* make an alias for the column. For aliased columns, you cannot
* access the contents with the original column name.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_fetch_array ($result, $result_type = MYSQL_BOTH) {}
+#[Deprecated(since: '5.5')]
+function mysql_fetch_array($result, $result_type = MYSQL_BOTH) {}
/**
- * @deprecated 5.5
* Fetch a result row as an associative array
* @link https://php.net/manual/en/function.mysql-fetch-assoc.php
- * @param resource $result
- * @return array an associative array of strings that corresponds to the fetched row, or
+ * @param resource $result
+ * @return array an associative array of strings that corresponds to the fetched row, or
* false if there are no more rows.
*
*
@@ -455,17 +438,18 @@ function mysql_fetch_array ($result, $result_type = MYSQL_BOTH) {}
* mysql_fetch_row or add alias names.
* See the example at the mysql_fetch_array
* description about aliases.
- * @since 4.0.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_fetch_assoc ($result) {}
+#[Deprecated(since: '5.5')]
+function mysql_fetch_assoc($result) {}
/**
- * @deprecated 5.5
+ * @template T
+ *
* Fetch a result row as an object
* @link https://php.net/manual/en/function.mysql-fetch-object.php
- * @param resource $result
- * @param string $class_name [optional]
+ * @param resource $result
+ * @param class-string $class_name [optional]
* The name of the class to instantiate, set the properties of and return.
* If not specified, a stdClass object is returned.
*
@@ -473,7 +457,7 @@ function mysql_fetch_assoc ($result) {}
* An optional array of parameters to pass to the constructor
* for class_name objects.
*
- * @return stdClass|object an object with string properties that correspond to the
+ * @return T|stdClass an object with string properties that correspond to the
* fetched row, or false if there are no more rows.
*
*
@@ -481,47 +465,44 @@ function mysql_fetch_assoc ($result) {}
* the result associated with the specified result identifier. The
* row is returned as an array. Each result column is stored in an
* array offset, starting at offset 0.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_fetch_object ($result, $class_name = 'stdClass', array $params = null ) {}
+#[Deprecated(since: '5.5')]
+function mysql_fetch_object($result, $class_name = 'stdClass', array $params = null) {}
/**
- * @deprecated 5.5
* Move internal result pointer
* @link https://php.net/manual/en/function.mysql-data-seek.php
- * @param resource $result
+ * @param resource $result
* @param int $row_number
* The desired row number of the new result pointer.
*
* @return bool true on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_data_seek ($result, $row_number) {}
+#[Deprecated(since: '5.5')]
+function mysql_data_seek($result, $row_number) {}
/**
- * @deprecated 5.5
* Get the length of each output in a result
* @link https://php.net/manual/en/function.mysql-fetch-lengths.php
- * @param resource $result
+ * @param resource $result
* @return array|false An array of lengths on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_fetch_lengths ($result) {}
+#[Deprecated(since: '5.5')]
+function mysql_fetch_lengths($result) {}
/**
- * @deprecated 5.5
* Get column information from a result and return as an object
* @link https://php.net/manual/en/function.mysql-fetch-field.php
- * @param resource $result
+ * @param resource $result
* @param int $field_offset [optional]
- * The numerical field offset. If the field offset is not specified, the
- * next field that was not yet retrieved by this function is retrieved.
+ * The numerical field offset. If the field offset is not specified, the
+ * next field that was not yet retrieved by this function is retrieved.
* The field_offset starts at 0.
*
- * @return object an object containing field information. The properties
+ * @return object an object containing field information. The properties
* of the object are:
*
*
@@ -538,320 +519,313 @@ function mysql_fetch_lengths ($result) {}
* type - the type of the column
* unsigned - 1 if the column is unsigned
* zerofill - 1 if the column is zero-filled
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_fetch_field ($result, $field_offset = 0) {}
+#[Deprecated(since: '5.5')]
+function mysql_fetch_field($result, $field_offset = 0) {}
/**
- * @deprecated 5.5
* Set result pointer to a specified field offset
* @link https://php.net/manual/en/function.mysql-field-seek.php
- * @param resource $result
- * @param int $field_offset
+ * @param resource $result
+ * @param int $field_offset
* @return bool true on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_field_seek ($result, $field_offset) {}
+#[Deprecated(since: '5.5')]
+function mysql_field_seek($result, $field_offset) {}
/**
- * @deprecated 5.5
* Free result memory
* @link https://php.net/manual/en/function.mysql-free-result.php
- * @param resource $result
+ * @param resource $result
* @return bool true on success or false on failure.
- *
*
* If a non-resource is used for the result, an
* error of level E_WARNING will be emitted. It's worth noting that
* mysql_query only returns a resource
* for SELECT, SHOW, EXPLAIN, and DESCRIBE queries.
- * @since 4.0
- * @since 5.0
+ *
+ * @removed 7.0
*/
-function mysql_free_result ($result) {}
+#[Deprecated(since: '5.5')]
+function mysql_free_result($result) {}
/**
- * @deprecated 5.5
* Get the name of the specified field in a result
* @link https://php.net/manual/en/function.mysql-field-name.php
- * @param resource $result
- * @param int $field_offset
+ * @param resource $result
+ * @param int $field_offset
* @return string|false The name of the specified field index on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_field_name ($result, $field_offset) {}
+#[Deprecated(since: '5.5')]
+function mysql_field_name($result, $field_offset) {}
/**
- * @deprecated 5.5
* Get name of the table the specified field is in
* @link https://php.net/manual/en/function.mysql-field-table.php
- * @param resource $result
- * @param int $field_offset
+ * @param resource $result
+ * @param int $field_offset
* @return string The name of the table on success.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_field_table ($result, $field_offset) {}
+#[Deprecated(since: '5.5')]
+function mysql_field_table($result, $field_offset) {}
/**
- * @deprecated 5.5
* Returns the length of the specified field
* @link https://php.net/manual/en/function.mysql-field-len.php
- * @param resource $result
- * @param int $field_offset
+ * @param resource $result
+ * @param int $field_offset
* @return int|false The length of the specified field index on success or false on failure.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_field_len ($result, $field_offset) {}
+#[Deprecated(since: '5.5')]
+function mysql_field_len($result, $field_offset) {}
/**
- * @deprecated 5.5
* Get the type of the specified field in a result
* @link https://php.net/manual/en/function.mysql-field-type.php
- * @param resource $result
- * @param int $field_offset
+ * @param resource $result
+ * @param int $field_offset
* @return string The returned field type
- * will be one of "int", "real",
+ * will be one of "int", "real",
* "string", "blob", and others as
* detailed in the MySQL
* documentation.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_field_type ($result, $field_offset) {}
+#[Deprecated(since: '5.5')]
+function mysql_field_type($result, $field_offset) {}
/**
- * @deprecated 5.5
* Get the flags associated with the specified field in a result
* @link https://php.net/manual/en/function.mysql-field-flags.php
- * @param resource $result
- * @param int $field_offset
+ * @param resource $result
+ * @param int $field_offset
* @return string|false a string of flags associated with the result or false on failure.
- *
*
* The following flags are reported, if your version of MySQL
- * is current enough to support them: "not_null",
- * "primary_key", "unique_key",
- * "multiple_key", "blob",
+ * is current enough to support them: "not_null",
+ * "primary_key", "unique_key",
+ * "multiple_key", "blob",
* "unsigned", "zerofill",
- * "binary", "enum",
+ * "binary", "enum",
* "auto_increment" and "timestamp".
- * @since 4.0
- * @since 5.0
+ *
+ * @removed 7.0
*/
-function mysql_field_flags ($result, $field_offset) {}
+#[Deprecated(since: '5.5')]
+function mysql_field_flags($result, $field_offset) {}
/**
* Escapes a string for use in a mysql_query
* @link https://php.net/manual/en/function.mysql-escape-string.php
- * @deprecated 5.3 Use mysql_real_escape_string() instead
* @param string $unescaped_string
* The string that is to be escaped.
*
* @return string the escaped string.
- * @since 4.0.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_escape_string ($unescaped_string) {}
+#[Deprecated(replacement: 'mysql_real_escape_string(%parameter0%)', since: '5.3')]
+function mysql_escape_string($unescaped_string) {}
/**
- * @deprecated 5.5
* Escapes special characters in a string for use in an SQL statement
* @link https://php.net/manual/en/function.mysql-real-escape-string.php
* @param string $unescaped_string
* The string that is to be escaped.
*
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return string|false the escaped string, or false on error.
- * @since 4.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_real_escape_string ($unescaped_string, $link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_real_escape_string($unescaped_string, $link_identifier = null) {}
/**
- * @deprecated 5.5
* Get current system status
* @link https://php.net/manual/en/function.mysql-stat.php
- * @param resource $link_identifier [optional]
- * @return string a string with the status for uptime, threads, queries, open tables,
- * flush tables and queries per second. For a complete list of other status
- * variables, you have to use the SHOW STATUS SQL command.
+ * @param resource $link_identifier [optional]
+ * @return string a string with the status for uptime, threads, queries, open tables,
+ * flush tables and queries per second. For a complete list of other status
+ * variables, you have to use the SHOW STATUS SQL command.
* If link_identifier is invalid, null is returned.
- * @since 4.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_stat ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_stat($link_identifier = null) {}
/**
- * @deprecated 5.5
* Return the current thread ID
* @link https://php.net/manual/en/function.mysql-thread-id.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return int|false The thread ID on success or false on failure.
- * @since 4.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_thread_id ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_thread_id($link_identifier = null) {}
/**
- * @deprecated 5.5
* Returns the name of the character set
* @link https://php.net/manual/en/function.mysql-client-encoding.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return string the default character set name for the current connection.
- * @since 4.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_client_encoding ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_client_encoding($link_identifier = null) {}
/**
- * @deprecated 5.5
* Ping a server connection or reconnect if there is no connection
* @link https://php.net/manual/en/function.mysql-ping.php
- * @param resource $link_identifier [optional]
- * @return bool true if the connection to the server MySQL server is working,
+ * @param resource $link_identifier [optional]
+ * @return bool true if the connection to the server MySQL server is working,
* otherwise false.
- * @since 4.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_ping ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_ping($link_identifier = null) {}
/**
- * @deprecated 5.5
* Get MySQL client info
* @link https://php.net/manual/en/function.mysql-get-client-info.php
* @return string The MySQL client version.
- * @since 4.0.5
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_get_client_info () {}
+#[Deprecated(since: '5.5')]
+function mysql_get_client_info() {}
/**
- * @deprecated 5.5
* Get MySQL host info
* @link https://php.net/manual/en/function.mysql-get-host-info.php
- * @param resource $link_identifier [optional]
- * @return string a string describing the type of MySQL connection in use for the
+ * @param resource $link_identifier [optional]
+ * @return string a string describing the type of MySQL connection in use for the
* connection or false on failure.
- * @since 4.0.5
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_get_host_info ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_get_host_info($link_identifier = null) {}
/**
- * @deprecated 5.5
* Get MySQL protocol info
* @link https://php.net/manual/en/function.mysql-get-proto-info.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return int|false the MySQL protocol on success or false on failure.
- * @since 4.0.5
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_get_proto_info ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_get_proto_info($link_identifier = null) {}
/**
- * @deprecated 5.5
* Get MySQL server info
* @link https://php.net/manual/en/function.mysql-get-server-info.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return string|false the MySQL server version on success or false on failure.
- * @since 4.0.5
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_get_server_info ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_get_server_info($link_identifier = null) {}
/**
- * @deprecated 5.5
* Get information about the most recent query
* @link https://php.net/manual/en/function.mysql-info.php
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return string|false information about the statement on success, or false on
* failure. See the example below for which statements provide information,
- * and what the returned value may look like. Statements that are not listed
+ * and what the returned value may look like. Statements that are not listed
* will return false.
- * @since 4.3
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_info ($link_identifier = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_info($link_identifier = null) {}
/**
- * @deprecated 5.5 Use mysqli_set_charset instead.
* Sets the client character set
* @link https://php.net/manual/en/function.mysql-set-charset.php
* @param string $charset
* A valid character set name.
*
- * @param resource $link_identifier [optional]
+ * @param resource $link_identifier [optional]
* @return bool true on success or false on failure.
* @since 5.2.3
+ * @removed 7.0
+ * @see mysqli_set_charset()
*/
-function mysql_set_charset ($charset, $link_identifier = null) {}
+#[Deprecated(replacement: 'Use mysqli_set_charset instead', since: '5.5')]
+function mysql_set_charset($charset, $link_identifier = null) {}
/**
* @param $database_name
* @param $query
* @param $link_identifier [optional]
- * @deprecated 5.3 Use mysql_db_query instead.
+ * @removed 7.0
*/
-function mysql ($database_name, $query, $link_identifier) {}
+#[Deprecated(replacement: "mysql_db_query(%parametersList%)", since: '5.3')]
+function mysql($database_name, $query, $link_identifier) {}
/**
* @param $result
* @param $field_index
- * @deprecated 5.5 Use mysql_field_name instead.
+ * @removed 7.0
*/
-function mysql_fieldname ($result, $field_index) {}
+#[Deprecated(replacement: 'mysql_field_name(%parametersList%)', since: '5.5')]
+function mysql_fieldname($result, $field_index) {}
/**
* @param $result
* @param $field_offset
- * @deprecated 5.5 Use mysql_field_table instead.
+ * @removed 7.0
*/
-function mysql_fieldtable ($result, $field_offset) {}
+#[Deprecated(replacement: 'mysql_field_table(%parametersList%)', since: '5.5')]
+function mysql_fieldtable($result, $field_offset) {}
/**
* @param $result
* @param $field_offset
- * @deprecated 5.5 Use mysql_field_len instead.
+ * @removed 7.0
*/
-function mysql_fieldlen ($result, $field_offset) {}
+#[Deprecated(replacement: 'mysql_field_len(%parametersList%)', since: '5.5')]
+function mysql_fieldlen($result, $field_offset) {}
/**
* @param $result
* @param $field_offset
- * @deprecated 5.5 Use mysql_field_type instead.
+ * @removed 7.0
*/
-function mysql_fieldtype ($result, $field_offset) {}
+#[Deprecated(replacement: 'mysql_field_type(%parametersList%)', since: '5.5')]
+function mysql_fieldtype($result, $field_offset) {}
/**
* @param $result
* @param $field_offset
- * @deprecated 5.5 Use mysql_field_flags instead.
+ * @removed 7.0
*/
-function mysql_fieldflags ($result, $field_offset) {}
+#[Deprecated(replacement: 'mysql_field_flags(%parametersList%)', since: '5.5')]
+function mysql_fieldflags($result, $field_offset) {}
/**
* @param $database_name
* @param $link_identifier [optional]
- * @deprecated 5.5 Use mysql_select_db instead.
+ * @removed 7.0
*/
-function mysql_selectdb ($database_name, $link_identifier) {}
+#[Deprecated(replacement: 'mysql_select_db(%parametersList%)', since: '5.5')]
+function mysql_selectdb($database_name, $link_identifier) {}
/**
* @param $result
- * @deprecated 5.5 Use mysql_free_result instead.
+ * @removed 7.0
*/
-function mysql_freeresult ($result) {}
+#[Deprecated(replacement: 'mysql_free_result(%parametersList%)', since: '5.5')]
+function mysql_freeresult($result) {}
/**
* @param $result
- * @deprecated 5.5 Use mysql_num_fields instead.
+ * @removed 7.0
*/
-function mysql_numfields ($result) {}
+#[Deprecated(replacement: 'mysql_num_fields(%parametersList%)', since: '5.5')]
+function mysql_numfields($result) {}
/**
* (PHP 4, PHP 5)
@@ -859,34 +833,37 @@ function mysql_numfields ($result) {}
* @link https://php.net/manual/en/function.mysql-num-rows.php
* @param resource $result The result resource that is being evaluated. This result comes from a call to mysql_query().
* @return int|false The number of rows in the result set on success or FALSE on failure.
- * @deprecated 5.5 Use mysql_num_rows instead.
+ * @removed 7.0
*/
-function mysql_numrows ($result) {}
+#[Deprecated(replacement: 'mysql_num_rows(%parametersList%)', since: '5.5')]
+function mysql_numrows($result) {}
/**
* @param $link_identifier [optional]
- * @deprecated 5.5 Use mysql_list_dbs instead.
+ * @removed 7.0
*/
-function mysql_listdbs ($link_identifier) {}
+#[Deprecated(replacement: 'mysql_list_dbs(%parametersList%)', since: '5.5')]
+function mysql_listdbs($link_identifier) {}
/**
* @param $database_name
* @param $link_identifier [optional]
- * @deprecated 5.5 Use mysql_list_tables instead.
+ * @removed 7.0
*/
-function mysql_listtables ($database_name, $link_identifier) {}
+#[Deprecated(replacement: 'mysql_list_tables(%parametersList%)', since: '5.5')]
+function mysql_listtables($database_name, $link_identifier) {}
/**
* @param $database_name
* @param $table_name
* @param $link_identifier [optional]
- * @deprecated 5.5 Use mysql_list_fields instead.
+ * @removed 7.0
*/
-function mysql_listfields ($database_name, $table_name, $link_identifier) {}
+#[Deprecated(replacement: 'mysql_list_fields(%parametersList%)', since: '5.5')]
+function mysql_listfields($database_name, $table_name, $link_identifier) {}
/**
- * @deprecated 5.5
- * Retrieves database name from the call to mysql_list_dbs
+ * Retrieves database name from the call to {@see mysql_list_dbs}
* @link https://php.net/manual/en/function.mysql-db-name.php
* @param resource $result
* The result pointer from a call to mysql_list_dbs.
@@ -900,80 +877,84 @@ function mysql_listfields ($database_name, $table_name, $link_identifier) {}
* @return string|false the database name on success, and false on failure. If false
* is returned, use mysql_error to determine the nature
* of the error.
- * @since 4.0
- * @since 5.0
+ * @removed 7.0
*/
-function mysql_db_name ($result, $row, $field = null) {}
+#[Deprecated(since: '5.5')]
+function mysql_db_name($result, $row, $field = null) {}
/**
* @param $result
* @param $row
* @param $field [optional]
- * @deprecated 5.5 Use mysql_db_name instead.
+ * @removed 7.0
*/
-function mysql_dbname ($result, $row, $field) {}
+#[Deprecated(replacement: 'mysql_db_name(%parametersList%)', since: '5.5')]
+function mysql_dbname($result, $row, $field) {}
/**
- * @deprecated 5.5
* Get table name of field
* @link https://php.net/manual/en/function.mysql-tablename.php
* @param resource $result
- * A result pointer resource that's returned from
+ * A result pointer resource that's returned from
* mysql_list_tables.
*
* @param int $i
* The integer index (row/table number)
*
* @return string|false The name of the table on success or false on failure.
- *
*
* Use the mysql_tablename function to
* traverse this result pointer, or any function for result tables,
* such as mysql_fetch_array.
- * @since 4.0
- * @since 5.0
+ *
+ * @removed 7.0
*/
-function mysql_tablename ($result, $i) {}
+#[Deprecated(since: '5.5')]
+function mysql_tablename($result, $i) {}
/**
- * @deprecated 5.5
* @param $result
* @param $row
* @param $field [optional]
+ * @removed 7.0
*/
-function mysql_table_name ($result, $row, $field) {}
-
+#[Deprecated(since: '5.5')]
+function mysql_table_name($result, $row, $field) {}
/**
* Columns are returned into the array having the fieldname as the array
* index.
* @link https://php.net/manual/en/mysql.constants.php
* @deprecated 5.5
+ * @removed 7.0
*/
-define ('MYSQL_ASSOC', 1);
+define('MYSQL_ASSOC', 1);
/**
* Columns are returned into the array having a numerical index to the
* fields. This index starts with 0, the first field in the result.
* @link https://php.net/manual/en/mysql.constants.php
* @deprecated 5.5
+ * @removed 7.0
*/
-define ('MYSQL_NUM', 2);
+define('MYSQL_NUM', 2);
/**
* Columns are returned into the array having both a numerical index
* and the fieldname as the array index.
* @link https://php.net/manual/en/mysql.constants.php
* @deprecated 5.5
+ * @removed 7.0
*/
-define ('MYSQL_BOTH', 3);
+define('MYSQL_BOTH', 3);
/**
* Use compression protocol
* @link https://php.net/manual/en/mysql.constants.php
* @deprecated 5.5
+ * @removed 7.0
*/
-define ('MYSQL_CLIENT_COMPRESS', 32);
+define('MYSQL_CLIENT_COMPRESS', 32);
/**
* Use SSL encryption. This flag is only available with version 4.x
@@ -981,23 +962,25 @@ function mysql_table_name ($result, $row, $field) {}
* with PHP 4 and Windows binaries of PHP 5.
* @link https://php.net/manual/en/mysql.constants.php
* @deprecated 5.5
+ * @removed 7.0
*/
-define ('MYSQL_CLIENT_SSL', 2048);
+define('MYSQL_CLIENT_SSL', 2048);
/**
* Allow interactive_timeout seconds (instead of wait_timeout) of
* inactivity before closing the connection.
* @link https://php.net/manual/en/mysql.constants.php
* @deprecated 5.5
+ * @removed 7.0
*/
-define ('MYSQL_CLIENT_INTERACTIVE', 1024);
+define('MYSQL_CLIENT_INTERACTIVE', 1024);
/**
* Allow space after function names
* @link https://php.net/manual/en/mysql.constants.php
* @deprecated 5.5
+ * @removed 7.0
*/
-define ('MYSQL_CLIENT_IGNORE_SPACE', 256);
+define('MYSQL_CLIENT_IGNORE_SPACE', 256);
// End of mysql v.1.0
-?>
diff --git a/mysql_xdevapi/mysql_xdevapi.php b/mysql_xdevapi/mysql_xdevapi.php
index fb97a0ae1..7ab0b89f4 100644
--- a/mysql_xdevapi/mysql_xdevapi.php
+++ b/mysql_xdevapi/mysql_xdevapi.php
@@ -6,46 +6,46 @@
* @author Mathijs Giesbers
* @package mysql_xdevapi
*/
+
namespace mysql_xdevapi;
define('MYSQLX_LOCK_DEFAULT', 0);
-define('MYSQLX_TYPE_DECIMAL',0);
-define('MYSQLX_TYPE_TINY',1);
-define('MYSQLX_TYPE_SHORT',2);
-define('MYSQLX_TYPE_SMALLINT',17);
-define('MYSQLX_TYPE_MEDIUMINT',18);
-define('MYSQLX_TYPE_INT',19);
-define('MYSQLX_TYPE_BIGINT',20);
-define('MYSQLX_TYPE_LONG',3);
-define('MYSQLX_TYPE_FLOAT',4);
-define('MYSQLX_TYPE_DOUBLE',5);
-define('MYSQLX_TYPE_NULL',6);
-define('MYSQLX_TYPE_TIMESTAMP',7);
-define('MYSQLX_TYPE_LONGLONG',8);
-define('MYSQLX_TYPE_INT24',9);
-define('MYSQLX_TYPE_DATE',10);
-define('MYSQLX_TYPE_TIME',11);
-define('MYSQLX_TYPE_DATETIME',12);
-define('MYSQLX_TYPE_YEAR',13);
-define('MYSQLX_TYPE_NEWDATE',14);
-define('MYSQLX_TYPE_ENUM',247);
-define('MYSQLX_TYPE_SET',248);
-define('MYSQLX_TYPE_TINY_BLOB',249);
-define('MYSQLX_TYPE_MEDIUM_BLOB',250);
-define('MYSQLX_TYPE_LONG_BLOB',251);
-define('MYSQLX_TYPE_BLOB',252);
-define('MYSQLX_TYPE_VAR_STRING',253);
-define('MYSQLX_TYPE_STRING',254);
-define('MYSQLX_TYPE_CHAR',1);
-define('MYSQLX_TYPE_BYTES',21);
-define('MYSQLX_TYPE_INTERVAL',247);
-define('MYSQLX_TYPE_GEOMETRY',255);
-define('MYSQLX_TYPE_JSON',245);
-define('MYSQLX_TYPE_NEWDECIMAL',246);
-define('MYSQLX_TYPE_BIT',16);
-define('MYSQLX_LOCK_NOWAIT',1);
-define('MYSQLX_LOCK_SKIP_LOCKED',2);
-
+define('MYSQLX_TYPE_DECIMAL', 0);
+define('MYSQLX_TYPE_TINY', 1);
+define('MYSQLX_TYPE_SHORT', 2);
+define('MYSQLX_TYPE_SMALLINT', 17);
+define('MYSQLX_TYPE_MEDIUMINT', 18);
+define('MYSQLX_TYPE_INT', 19);
+define('MYSQLX_TYPE_BIGINT', 20);
+define('MYSQLX_TYPE_LONG', 3);
+define('MYSQLX_TYPE_FLOAT', 4);
+define('MYSQLX_TYPE_DOUBLE', 5);
+define('MYSQLX_TYPE_NULL', 6);
+define('MYSQLX_TYPE_TIMESTAMP', 7);
+define('MYSQLX_TYPE_LONGLONG', 8);
+define('MYSQLX_TYPE_INT24', 9);
+define('MYSQLX_TYPE_DATE', 10);
+define('MYSQLX_TYPE_TIME', 11);
+define('MYSQLX_TYPE_DATETIME', 12);
+define('MYSQLX_TYPE_YEAR', 13);
+define('MYSQLX_TYPE_NEWDATE', 14);
+define('MYSQLX_TYPE_ENUM', 247);
+define('MYSQLX_TYPE_SET', 248);
+define('MYSQLX_TYPE_TINY_BLOB', 249);
+define('MYSQLX_TYPE_MEDIUM_BLOB', 250);
+define('MYSQLX_TYPE_LONG_BLOB', 251);
+define('MYSQLX_TYPE_BLOB', 252);
+define('MYSQLX_TYPE_VAR_STRING', 253);
+define('MYSQLX_TYPE_STRING', 254);
+define('MYSQLX_TYPE_CHAR', 1);
+define('MYSQLX_TYPE_BYTES', 21);
+define('MYSQLX_TYPE_INTERVAL', 247);
+define('MYSQLX_TYPE_GEOMETRY', 255);
+define('MYSQLX_TYPE_JSON', 245);
+define('MYSQLX_TYPE_NEWDECIMAL', 246);
+define('MYSQLX_TYPE_BIT', 16);
+define('MYSQLX_LOCK_NOWAIT', 1);
+define('MYSQLX_LOCK_SKIP_LOCKED', 2);
/**
* @link https://secure.php.net/manual/en/function.mysql-xdevapi-getsession.php
@@ -61,26 +61,25 @@ function getSession($uri) {}
*/
function expression($expression) {}
-
/**
* Interface BaseResult
* @package mysql_xdevapi
*/
-interface BaseResult {
-
+interface BaseResult
+{
/**
* Fetch warnings from last operation
* @link https://www.php.net/manual/en/mysql-xdevapi-baseresult.getwarnings.php
* @return array
*/
- public function getWarnings () : array;
+ public function getWarnings(): array;
/**
* Fetch warning count from last operation
* @link https://www.php.net/manual/en/mysql-xdevapi-baseresult.getwarningscount.php
* @return int
*/
- public function getWarningsCount () : int;
+ public function getWarningsCount(): int;
}
/**
@@ -88,8 +87,8 @@ public function getWarningsCount () : int;
* @link https://www.php.net/manual/en/class.mysql-xdevapi-collection.php
* @package mysql_xdevapi
*/
-class Collection {
-
+class Collection
+{
/**
* Collection constructor
* @link https://www.php.net/manual/en/mysql-xdevapi-collection.construct.php
@@ -102,7 +101,7 @@ public function __construct() {}
* @param mixed $document
* @return \mysql_xdevapi\CollectionAdd
*/
- public function add($document) : \mysql_xdevapi\CollectionAdd {}
+ public function add($document): CollectionAdd {}
/**
* Add or replace collection document
@@ -111,14 +110,14 @@ public function add($document) : \mysql_xdevapi\CollectionAdd {}
* @param mixed $document
* @return \mysql_xdevapi\Result
*/
- public function addOrReplaceOne($id,$document) : \mysql_xdevapi\Result {}
+ public function addOrReplaceOne($id, $document): Result {}
/**
* Get document count
* @link https://www.php.net/manual/en/mysql-xdevapi-collection.count.php
- * @return integer The number of documents in the collection.
+ * @return int The number of documents in the collection.
*/
- public function count() : int {}
+ public function count(): int {}
/**
* Create collection index
@@ -134,28 +133,28 @@ public function createIndex($index_name, $index_desc_json) {}
* @param string $index_name
* @return bool
*/
- public function dropIndex($index_name, $index_desc_json) : bool {}
+ public function dropIndex($index_name): bool {}
/**
* Check if collection exists in database
* @link https://www.php.net/manual/en/mysql-xdevapi-collection.existsindatabase.php
* @return bool
*/
- public function existsInDatabase() : bool {}
+ public function existsInDatabase(): bool {}
/**
* @link https://secure.php.net/manual/en/mysql-xdevapi-collection.find.php
* @param string $search_condition
* @return \mysql_xdevapi\CollectionFind
*/
- public function find($search_condition) : \mysql_xdevapi\CollectionFind {}
+ public function find($search_condition): CollectionFind {}
/**
* Get collection name
* @link https://www.php.net/manual/en/mysql-xdevapi-collection.getname.php
* @return string
*/
- public function getName() : string {}
+ public function getName(): string {}
/**
* Get one document
@@ -171,14 +170,14 @@ public function getOne($id) {}
* @link https://www.php.net/manual/en/mysql-xdevapi-collection.getschema.php
* @return \mysql_xdevapi\Schema
*/
- public function getSchema() : \mysql_xdevapi\Schema {}
+ public function getSchema(): Schema {}
/**
* Get a new Session object from the Collection object.
* @link https://www.php.net/manual/en/mysql-xdevapi-collection.getsession.php
* @return \mysql_xdevapi\Session
*/
- public function getSession() : \mysql_xdevapi\Session {}
+ public function getSession(): Session {}
/**
* Modify collections that meet specific search conditions. Multiple operations are allowed, and parameter binding is supported.
@@ -186,7 +185,7 @@ public function getSession() : \mysql_xdevapi\Session {}
* @param string $search_condition
* @return \mysql_xdevapi\CollectionModify
*/
- public function modify($search_condition) : \mysql_xdevapi\CollectionModify {}
+ public function modify($search_condition): CollectionModify {}
/**
* Remove collections that meet specific search conditions. Multiple operations are allowed, and parameter binding is supported.
@@ -194,16 +193,16 @@ public function modify($search_condition) : \mysql_xdevapi\CollectionModify {}
* @param string $search_condition
* @return \mysql_xdevapi\CollectionRemove
*/
- public function remove($search_condition) : \mysql_xdevapi\CollectionRemove {}
+ public function remove($search_condition): CollectionRemove {}
/**
* Remove one collection document
- * Remove one document from the collection with the correspending ID. This is a shortcut for Collection.remove("_id = :id").bind("id", id).execute().
+ * Remove one document from the collection with the corresponding ID. This is a shortcut for Collection.remove("_id = :id").bind("id", id).execute().
* @link https://www.php.net/manual/en/mysql-xdevapi-collection.removeone.php
* @param string $id
* @return \mysql_xdevapi\Result
*/
- public function removeOne($id) : \mysql_xdevapi\Result {}
+ public function removeOne($id): Result {}
/**
* Updates (or replaces) the document identified by ID, if it exists.
@@ -212,30 +211,28 @@ public function removeOne($id) : \mysql_xdevapi\Result {}
* @param string $doc
* @return \mysql_xdevapi\Result
*/
- public function replaceOne($id, $doc) : \mysql_xdevapi\Result {}
+ public function replaceOne($id, $doc): Result {}
}
-
/**
* Class CollectionAdd
* @package mysql_xdevapi
*/
-class CollectionAdd implements \mysql_xdevapi\Executable {
-
+class CollectionAdd implements \mysql_xdevapi\Executable
+{
/**
* @return \mysql_xdevapi\Result
*/
- public function execute () : \mysql_xdevapi\Result {}
+ public function execute(): Result {}
}
-
/**
* Class CollectionFind
* @link https://www.php.net/manual/en/class.mysql-xdevapi-collectionfind.php
* @package mysql_xdevapi
*/
-class CollectionFind implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSortable {
-
+class CollectionFind implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSortable
+{
/**
* Bind value to query placeholder
* It allows the user to bind a parameter to the placeholder in the search condition of the find operation. The placeholder has the form of :NAME where ':' is a common prefix that must always exists before any NAME, NAME is the actual name of the placeholder. The bind function accepts a list of placeholders if multiple entities have to be substituted in the search condition.
@@ -243,14 +240,14 @@ class CollectionFind implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOp
* @param array $placeholder_values
* @return \mysql_xdevapi\CollectionFind
*/
- public function bind ( array $placeholder_values ) : \mysql_xdevapi\CollectionFind {}
+ public function bind(array $placeholder_values): CollectionFind {}
/**
* Execute the find operation; this functionality allows for method chaining.
* @link https://www.php.net/manual/en/mysql-xdevapi-collectionfind.execute.php
* @return \mysql_xdevapi\DocResult
*/
- public function execute () : \mysql_xdevapi\DocResult {}
+ public function execute(): DocResult {}
/**
* Defined the columns for the query to return. If not defined then all columns are used.
@@ -258,7 +255,7 @@ public function execute () : \mysql_xdevapi\DocResult {}
* @param string $projection
* @return \mysql_xdevapi\CollectionFind
*/
- public function fields ( string $projection ) : \mysql_xdevapi\CollectionFind {}
+ public function fields(string $projection): CollectionFind {}
/**
* This function can be used to group the result-set by one more columns, frequently this is used with aggregate functions like COUNT,MAX,MIN,SUM etc.
@@ -266,7 +263,7 @@ public function fields ( string $projection ) : \mysql_xdevapi\CollectionFind {}
* @param string $sort_expr
* @return \mysql_xdevapi\CollectionFind
*/
- public function groupBy ( string $sort_expr ) : \mysql_xdevapi\CollectionFind {}
+ public function groupBy(string $sort_expr): CollectionFind {}
/**
* This function can be used after the 'field' operation in order to make a selection on the documents to extract.
@@ -274,7 +271,7 @@ public function groupBy ( string $sort_expr ) : \mysql_xdevapi\CollectionFind {}
* @param string $sort_expr
* @return \mysql_xdevapi\CollectionFind
*/
- public function having ( string $sort_expr ) : \mysql_xdevapi\CollectionFind {}
+ public function having(string $sort_expr): CollectionFind {}
/**
* Set the maximum number of documents to return.
@@ -282,7 +279,7 @@ public function having ( string $sort_expr ) : \mysql_xdevapi\CollectionFind {}
* @param int $rows
* @return \mysql_xdevapi\CollectionFind
*/
- public function limit ( int $rows ) : \mysql_xdevapi\CollectionFind {}
+ public function limit(int $rows): CollectionFind {}
/**
* Execute operation with EXCLUSIVE LOCK
@@ -295,7 +292,7 @@ public function limit ( int $rows ) : \mysql_xdevapi\CollectionFind {}
* @param int $lock_waiting_option
* @return \mysql_xdevapi\CollectionFind
*/
- public function lockExclusive (int $lock_waiting_option) : \mysql_xdevapi\CollectionFind {}
+ public function lockExclusive(int $lock_waiting_option): CollectionFind {}
/**
* Execute operation with SHARED LOCK
@@ -310,7 +307,7 @@ public function lockExclusive (int $lock_waiting_option) : \mysql_xdevapi\Collec
* @param int $lock_waiting_option
* @return \mysql_xdevapi\CollectionFind
*/
- public function lockShared ( int $lock_waiting_option ) : \mysql_xdevapi\CollectionFind {}
+ public function lockShared(int $lock_waiting_option): CollectionFind {}
/**
* Skip given number of elements to be returned
@@ -323,7 +320,7 @@ public function lockShared ( int $lock_waiting_option ) : \mysql_xdevapi\Collect
* @param int $position
* @return \mysql_xdevapi\CollectionFind
*/
- public function offset ( int $position ) : \mysql_xdevapi\CollectionFind {}
+ public function offset(int $position): CollectionFind {}
/**
* Set the sorting criteria
@@ -335,15 +332,15 @@ public function offset ( int $position ) : \mysql_xdevapi\CollectionFind {}
* @param string $sort_expr
* @return CollectionFind
*/
- public function sort ( string $sort_expr ) : \mysql_xdevapi\CollectionFind {}
+ public function sort(string $sort_expr): CollectionFind {}
}
-
/**
* Class CollectionModify
* @package mysql_xdevapi
*/
-class CollectionModify implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSkippable, \mysql_xdevapi\CrudOperationSortable {
+class CollectionModify implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSkippable, \mysql_xdevapi\CrudOperationSortable
+{
/**
* Add an element to a document's field, as multiple elements of a field are represented as an array. Unlike arrayInsert(), arrayAppend() always appends the new element at the end of the array, whereas arrayInsert() can define the location.
* @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.arrayappend.php
@@ -351,7 +348,7 @@ class CollectionModify implements \mysql_xdevapi\Executable, \mysql_xdevapi\Cru
* @param string $expression_or_literal
* @return \mysql_xdevapi\CollectionModify
*/
- public function arrayAppend ( string $collection_field , string $expression_or_literal ) : \mysql_xdevapi\CollectionModify {}
+ public function arrayAppend(string $collection_field, string $expression_or_literal): CollectionModify {}
/**
* Add an element to a document's field, as multiple elements of a field are represented as an array. Unlike arrayAppend(), arrayInsert() allows you to specify where the new element is inserted by defining which item it is after, whereas arrayAppend() always appends the new element at the end of the array.
@@ -360,7 +357,7 @@ public function arrayAppend ( string $collection_field , string $expression_or_l
* @param string $expression_or_literal
* @return \mysql_xdevapi\CollectionModify
*/
- public function arrayInsert ( string $collection_field , string $expression_or_literal ) : \mysql_xdevapi\CollectionModify {}
+ public function arrayInsert(string $collection_field, string $expression_or_literal): CollectionModify {}
/**
* Bind a parameter to the placeholder in the search condition of the modify operation.
@@ -369,14 +366,14 @@ public function arrayInsert ( string $collection_field , string $expression_or_l
* @param array $placeholder_values
* @return \mysql_xdevapi\CollectionModify
*/
- public function bind ( array $placeholder_values ) : \mysql_xdevapi\CollectionModify {}
+ public function bind(array $placeholder_values): CollectionModify {}
/**
* The execute method is required to send the CRUD operation request to the MySQL server.
* @link https://www.php.net/manual/en/mysql-xdevapi-collectionmodify.execute.php
* @return \mysql_xdevapi\Result
*/
- public function execute () : \mysql_xdevapi\Result {}
+ public function execute(): Result {}
/**
* Limit the number of documents modified by this operation. Optionally combine with skip() to define an offset value.
@@ -384,7 +381,7 @@ public function execute () : \mysql_xdevapi\Result {}
* @param int $rows
* @return \mysql_xdevapi\CollectionModify
*/
- public function limit ( int $rows ) : \mysql_xdevapi\CollectionModify {}
+ public function limit(int $rows): CollectionModify {}
/**
* Takes a patch object and applies it on one or more documents, and can update multiple document properties.
@@ -392,7 +389,7 @@ public function limit ( int $rows ) : \mysql_xdevapi\CollectionModify {}
* @param string $document
* @return \mysql_xdevapi\CollectionModify
*/
- public function patch ( string $document ) : \mysql_xdevapi\CollectionModify {}
+ public function patch(string $document): CollectionModify {}
/**
* Replace (update) a given field value with a new one.
@@ -401,7 +398,7 @@ public function patch ( string $document ) : \mysql_xdevapi\CollectionModify {}
* @param string $expression_or_literal
* @return \mysql_xdevapi\CollectionModify
*/
- public function replace ( string $collection_field , string $expression_or_literal ) : \mysql_xdevapi\CollectionModify {}
+ public function replace(string $collection_field, string $expression_or_literal): CollectionModify {}
/**
* Sets or updates attributes on documents in a collection.
@@ -410,7 +407,7 @@ public function replace ( string $collection_field , string $expression_or_liter
* @param string $expression_or_literal
* @return \mysql_xdevapi\CollectionModify
*/
- public function set ( string $collection_field , string $expression_or_literal ) : \mysql_xdevapi\CollectionModify {}
+ public function set(string $collection_field, string $expression_or_literal): CollectionModify {}
/**
* Skip the first N elements that would otherwise be returned by a find operation. If the number of elements skipped is larger than the size of the result set, then the find operation returns an empty set.
@@ -418,7 +415,7 @@ public function set ( string $collection_field , string $expression_or_literal )
* @param int $position
* @return \mysql_xdevapi\CollectionModify
*/
- public function skip ( int $position ) : \mysql_xdevapi\CollectionModify {}
+ public function skip(int $position): CollectionModify {}
/**
* Sort the result set by the field selected in the sort_expr argument. The allowed orders are ASC (Ascending) or DESC (Descending). This operation is equivalent to the 'ORDER BY' SQL operation and it follows the same set of rules.
@@ -426,7 +423,7 @@ public function skip ( int $position ) : \mysql_xdevapi\CollectionModify {}
* @param string $sort_expr
* @return \mysql_xdevapi\CollectionModify
*/
- public function sort ( string $sort_expr ) : \mysql_xdevapi\CollectionModify {}
+ public function sort(string $sort_expr): CollectionModify {}
/**
* Removes attributes from documents in a collection.
@@ -434,14 +431,11 @@ public function sort ( string $sort_expr ) : \mysql_xdevapi\CollectionModify {}
* @param array $fields
* @return \mysql_xdevapi\CollectionModify
*/
- public function unset ( array $fields ) : \mysql_xdevapi\CollectionModify {}
+ public function unset(array $fields): CollectionModify {}
}
-
-
-
-class CollectionRemove implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSortable {
-
+class CollectionRemove implements \mysql_xdevapi\Executable, \mysql_xdevapi\CrudOperationBindable, \mysql_xdevapi\CrudOperationLimitable, \mysql_xdevapi\CrudOperationSortable
+{
/**
* Bind a parameter to the placeholder in the search condition of the remove operation.
* The placeholder has the form of :NAME where ':' is a common prefix that must always exists before any NAME where NAME is the name of the placeholder. The bind method accepts a list of placeholders if multiple entities have to be substituted in the search condition of the remove operation.
@@ -449,14 +443,14 @@ class CollectionRemove implements \mysql_xdevapi\Executable, \mysql_xdevapi\Crud
* @param array $placeholder_values
* @return \mysql_xdevapi\CollectionRemove
*/
- public function bind ( array $placeholder_values ) : \mysql_xdevapi\CollectionRemove {}
+ public function bind(array $placeholder_values): CollectionRemove {}
/**
* The execute function needs to be invoked in order to trigger the client to send the CRUD operation request to the server.
* @link https://www.php.net/manual/en/mysql-xdevapi-collectionremove.execute.php
* @return \mysql_xdevapi\Result
*/
- public function execute () : \mysql_xdevapi\Result {}
+ public function execute(): Result {}
/**
* Sets the maximum number of documents to remove.
@@ -464,7 +458,7 @@ public function execute () : \mysql_xdevapi\Result {}
* @param int $rows
* @return \mysql_xdevapi\CollectionRemove
*/
- public function limit ( int $rows ) : \mysql_xdevapi\CollectionRemove {}
+ public function limit(int $rows): CollectionRemove {}
/**
* Sort the result set by the field selected in the sort_expr argument. The allowed orders are ASC (Ascending) or DESC (Descending). This operation is equivalent to the 'ORDER BY' SQL operation and it follows the same set of rules.
@@ -472,228 +466,227 @@ public function limit ( int $rows ) : \mysql_xdevapi\CollectionRemove {}
* @param string $sort_expr
* @return \mysql_xdevapi\CollectionRemove
*/
- public function sort ( string $sort_expr ) : \mysql_xdevapi\CollectionRemove {}
+ public function sort(string $sort_expr): CollectionRemove {}
}
-
/**
* Class ColumnResult
* @package mysql_xdevapi
*/
-class ColumnResult {
+class ColumnResult
+{
/**
* Get character set
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcharactersetname.php
* @return string
*/
- public function getCharacterSetName () : string {}
+ public function getCharacterSetName(): string {}
/**
* Get collation name
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcollationname.php
* @return string
*/
- public function getCollationName () : string {}
+ public function getCollationName(): string {}
/**
* Get column label
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcolumnlabel.php
* @return string
*/
- public function getColumnLabel () : string {}
+ public function getColumnLabel(): string {}
/**
* Get column name
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getcolumnname.php
* @return string
*/
- public function getColumnName () : string {}
+ public function getColumnName(): string {}
/**
* Get fractional digit length
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getfractionaldigits.php
* @return int
*/
- public function getFractionalDigits () : int {}
+ public function getFractionalDigits(): int {}
/**
* Get column field length
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getlength.php
* @return int
*/
- public function getLength () : int {}
+ public function getLength(): int {}
/**
* Get schema name
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.getschemaname.php
* @return string
*/
- public function getSchemaName () : string {}
+ public function getSchemaName(): string {}
/**
* Get table label
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.gettablelabel.php
* @return string
*/
- public function getTableLabel () : string {}
+ public function getTableLabel(): string {}
/**
* Get table name
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.gettablename.php
* @return string
*/
- public function getTableName () : string {}
+ public function getTableName(): string {}
/**
* Get column type
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.gettype.php
* @return int
*/
- public function getType () : int {}
+ public function getType(): int {}
/**
* Check if signed type
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.isnumbersigned.php
* @return int
*/
- public function isNumberSigned () : int {}
+ public function isNumberSigned(): int {}
/**
* Check if padded
* @link https://www.php.net/manual/en/mysql-xdevapi-columnresult.ispadded.php
* @return int
*/
- public function isPadded () : int {}
+ public function isPadded(): int {}
}
-
/**
* Interface CrudOperationBindable
* @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationbindable.php
* @package mysql_xdevapi
*/
-interface CrudOperationBindable {
+interface CrudOperationBindable
+{
/**
* Binds a value to a specific placeholder.
* @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationbindable.bind.php
* @param array $placeholder_values
* @return CrudOperationBindable
*/
- public function bind ( array $placeholder_values ) : \mysql_xdevapi\CrudOperationBindable;
+ public function bind(array $placeholder_values): CrudOperationBindable;
}
-
/**
* Interface CrudOperationLimitable
* @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationlimitable.php
* @package mysql_xdevapi
*/
-interface CrudOperationLimitable {
+interface CrudOperationLimitable
+{
/**
* Set result limit
* @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationlimitable.limit.php
* @param int $rows
* @return CrudOperationLimitable
*/
- public function limit ( int $rows ) : \mysql_xdevapi\CrudOperationLimitable;
+ public function limit(int $rows): CrudOperationLimitable;
}
-
/**
* Interface CrudOperationSkippable
* @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationskippable.php
* @package mysql_xdevapi
*/
-interface CrudOperationSkippable {
+interface CrudOperationSkippable
+{
/**
* Number of operations to skip
* @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationskippable.skip.php
* @param int $skip
* @return CrudOperationSkippable
*/
- public function skip ( int $skip ) : \mysql_xdevapi\CrudOperationSkippable;
+ public function skip(int $skip): CrudOperationSkippable;
}
-
-
/**
* Interface CrudOperationSortable
* @link https://www.php.net/manual/en/class.mysql-xdevapi-crudoperationsortable.php
* @package mysql_xdevapi
*/
-interface CrudOperationSortable {
+interface CrudOperationSortable
+{
/**
* Sort results
* @link https://www.php.net/manual/en/mysql-xdevapi-crudoperationsortable.sort.php
* @param string $sort_expr
* @return CrudOperationSortable
*/
- public function sort ( string $sort_expr ) : \mysql_xdevapi\CrudOperationSortable;
+ public function sort(string $sort_expr): CrudOperationSortable;
}
-
/**
* Interface DatabaseObject
* @link https://www.php.net/manual/en/class.mysql-xdevapi-databaseobject.php
* @package mysql_xdevapi
*/
-interface DatabaseObject {
+interface DatabaseObject
+{
/**
* Check if object exists in database
* @link https://www.php.net/manual/en/mysql-xdevapi-databaseobject.existsindatabase.php
* @return bool
*/
- public function existsInDatabase () : bool;
+ public function existsInDatabase(): bool;
/**
* Get object name
* @link https://www.php.net/manual/en/mysql-xdevapi-databaseobject.getname.php
* @return string
*/
- public function getName () : string;
+ public function getName(): string;
/**
* Get session name
* @link https://www.php.net/manual/en/mysql-xdevapi-databaseobject.getsession.php
* @return \mysql_xdevapi\Session
*/
- public function getSession () : \mysql_xdevapi\Session;
+ public function getSession(): Session;
}
-
/**
* Class DocResult
* @link https://www.php.net/manual/en/class.mysql-xdevapi-docresult.php
* @package mysql_xdevapi
*/
-class DocResult implements \mysql_xdevapi\BaseResult, \Traversable {
+class DocResult implements \mysql_xdevapi\BaseResult, \Traversable
+{
/**
* Get all rows
* @link https://www.php.net/manual/en/mysql-xdevapi-docresult.fetchall.php
* @return array
*/
- public function fetchAll () : array {}
+ public function fetchAll(): array {}
/**
* Fetch one result from a result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-docresult.fetchone.php
* @return array
*/
- public function fetchOne () : array {}
+ public function fetchOne(): array {}
/**
* Fetches warnings generated by MySQL server's last operation.
* @link https://www.php.net/manual/en/mysql-xdevapi-docresult.getwarnings.php
- * @return array|\mysql_xdevapi\Warning
+ * @return \mysql_xdevapi\Warning[]
*/
- public function getWarnings () : array {}
+ public function getWarnings(): array {}
/**
* Returns the number of warnings raised by the last operation. Specifically, these warnings are raised by the MySQL server.
* @link https://www.php.net/manual/en/mysql-xdevapi-docresult.getwarningscount.php
* @return int
*/
- public function getWarningsCount () : int {}
+ public function getWarningsCount(): int {}
}
/**
@@ -702,153 +695,151 @@ public function getWarningsCount () : int {}
*/
class Exception extends \RuntimeException implements \Throwable {}
-
/**
* Interface Executable
* @link https://www.php.net/manual/en/class.mysql-xdevapi-exception.php
* @package mysql_xdevapi
*/
-interface Executable {
+interface Executable
+{
/**
* Execute statement
* @link https://www.php.net/manual/en/class.mysql-xdevapi-executable.php
* @return Result
*/
- public function execute () : \mysql_xdevapi\Result;
+ public function execute(): Result;
}
-
/**
* Class ExecutionStatus
* @link https://www.php.net/manual/en/class.mysql-xdevapi-executionstatus.php
* @package mysql_xdevapi
*/
-class ExecutionStatus {
- public $affectedItems ;
- public $matchedItems ;
- public $foundItems ;
- public $lastInsertId ;
- public $lastDocumentId ;
+class ExecutionStatus
+{
+ public $affectedItems;
+ public $matchedItems;
+ public $foundItems;
+ public $lastInsertId;
+ public $lastDocumentId;
}
-
/**
* Class Expression
* @link https://www.php.net/manual/en/class.mysql-xdevapi-expression.php
* @package mysql_xdevapi
*/
-class Expression {
+class Expression
+{
/* Properties */
- public $name ;
+ public $name;
/* Constructor */
- public function __construct ( string $expression ) {}
+ public function __construct(string $expression) {}
}
-
/**
* Class Result
* @link https://www.php.net/manual/en/class.mysql-xdevapi-result.php
* @package mysql_xdevapi
*/
-class Result implements \mysql_xdevapi\BaseResult , \Traversable {
+class Result implements \mysql_xdevapi\BaseResult, \Traversable
+{
/**
* Get the last AUTO_INCREMENT value (last insert id).
* @link https://www.php.net/manual/en/mysql-xdevapi-result.getautoincrementvalue.php
* @return int
*/
- public function getAutoIncrementValue () : int {}
+ public function getAutoIncrementValue(): int {}
/**
* Fetch the generated _id values from the last operation. The unique _id field is generated by the MySQL server.
* @link https://www.php.net/manual/en/mysql-xdevapi-result.getgeneratedids.php
- * @return array|string[]
+ * @return string[]
*/
- public function getGeneratedIds () : array {}
-
+ public function getGeneratedIds(): array {}
/**
* Retrieve warnings from the last Result operation.
* @link https://www.php.net/manual/en/mysql-xdevapi-result.getwarnings.php
- * @return array|\mysql_xdevapi\Warning[]
+ * @return \mysql_xdevapi\Warning[]
*/
- public function getWarnings () : array {}
+ public function getWarnings(): array {}
/**
* Retrieve the number of warnings from the last Result operation.
* @link https://www.php.net/manual/en/mysql-xdevapi-result.getwarningscount.php
* @return int
*/
- public function getWarningsCount () : int {}
+ public function getWarningsCount(): int {}
}
-
/**
* Class RowResult
* @link https://www.php.net/manual/en/class.mysql-xdevapi-rowresult.php
* @package mysql_xdevapi
*/
-class RowResult implements \mysql_xdevapi\BaseResult , \Traversable {
-
+class RowResult implements \mysql_xdevapi\BaseResult, \Traversable
+{
/**
* Fetch all the rows from the result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.fetchall.php
* @return array A numerical array with all results from the query; each result is an associative array. An empty array is returned if no rows are present.
*/
- public function fetchAll () : array {}
+ public function fetchAll(): array {}
/**
* Fetch one result from the result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.fetchone.php
* @return array The result, as an associative array or NULL if no results are present.
*/
- public function fetchOne () : array {}
+ public function fetchOne(): array {}
/**
* Retrieve the column count for columns present in the result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getcolumncount.php
* @return int
*/
- public function getColumnsCount () : int {}
+ public function getColumnsCount(): int {}
/**
* Retrieve column names for columns present in the result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getcolumnnames.php
* @return array
*/
- public function getColumnNames () : array {}
+ public function getColumnNames(): array {}
/**
* Retrieve column metadata for columns present in the result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getcolumns.php
- * @return array|\mysql_xdevapi\FieldMetadata[]
+ * @return \mysql_xdevapi\FieldMetadata[]
*/
- public function getColumns () : array {}
+ public function getColumns(): array {}
/**
* Retrieve warnings from the last RowResult operation.
* @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getwarnings.php
- * @return array|\mysql_xdevapi\Warning[]
+ * @return \mysql_xdevapi\Warning[]
*/
- public function getWarnings () : array {}
+ public function getWarnings(): array {}
/**
* Retrieve the number of warnings from the last RowResult operation.
* @link https://www.php.net/manual/en/mysql-xdevapi-rowresult.getwarningscount.php
* @return int
*/
- public function getWarningsCount () : int {}
+ public function getWarningsCount(): int {}
}
-
/**
* Class Schema
* @link https://www.php.net/manual/en/class.mysql-xdevapi-schema.php
* @package mysql_xdevapi
*/
-class Schema implements \mysql_xdevapi\DatabaseObject {
+class Schema implements \mysql_xdevapi\DatabaseObject
+{
/* Properties */
- public $name ;
+ public $name;
/* Methods */
/**
@@ -857,7 +848,7 @@ class Schema implements \mysql_xdevapi\DatabaseObject {
* @param string $name
* @return \mysql_xdevapi\Collection
*/
- public function createCollection ( string $name ) : \mysql_xdevapi\Collection {}
+ public function createCollection(string $name): Collection {}
/**
* Drop collection from schema
@@ -865,7 +856,7 @@ public function createCollection ( string $name ) : \mysql_xdevapi\Collection {}
* @param string $collection_name
* @return bool
*/
- public function dropCollection ( string $collection_name ) : bool {}
+ public function dropCollection(string $collection_name): bool {}
/**
* Check if exists in database
@@ -873,7 +864,7 @@ public function dropCollection ( string $collection_name ) : bool {}
* @link https://www.php.net/manual/en/mysql-xdevapi-schema.existsindatabase.php
* @return bool
*/
- public function existsInDatabase () : bool {}
+ public function existsInDatabase(): bool {}
/**
* Get a collection from the schema.
@@ -881,7 +872,7 @@ public function existsInDatabase () : bool {}
* @param string $name
* @return \mysql_xdevapi\Collection
*/
- public function getCollection ( string $name ) : \mysql_xdevapi\Collection {}
+ public function getCollection(string $name): Collection {}
/**
* Get a collection, but as a Table object instead of a Collection object.
@@ -889,28 +880,28 @@ public function getCollection ( string $name ) : \mysql_xdevapi\Collection {}
* @param string $name
* @return \mysql_xdevapi\Table
*/
- public function getCollectionAsTable ( string $name ) : \mysql_xdevapi\Table {}
+ public function getCollectionAsTable(string $name): Table {}
/**
* Fetch a list of collections for this schema.
* @link https://www.php.net/manual/en/mysql-xdevapi-schema.getcollections.php
- * @return array|\mysql_xdevapi\Collection[] Array of all collections in this schema, where each array element value is a Collection object with the collection name as the key.
+ * @return \mysql_xdevapi\Collection[] Array of all collections in this schema, where each array element value is a Collection object with the collection name as the key.
*/
- public function getCollections () : array {}
+ public function getCollections(): array {}
/**
* Get the name of the schema.
* @link https://www.php.net/manual/en/mysql-xdevapi-schema.getname.php
* @return string
*/
- public function getName () : string {}
+ public function getName(): string {}
/**
* Get a new Session object from the Schema object.
* @link https://www.php.net/manual/en/mysql-xdevapi-schema.getsession.php
* @return \mysql_xdevapi\Session
*/
- public function getSession () : \mysql_xdevapi\Session {}
+ public function getSession(): Session {}
/**
* Fetch a Table object for the provided table in the schema.
@@ -918,49 +909,47 @@ public function getSession () : \mysql_xdevapi\Session {}
* @param string $name
* @return \mysql_xdevapi\Table
*/
- public function getTable ( string $name ) : \mysql_xdevapi\Table {}
+ public function getTable(string $name): Table {}
/**
* Get schema tables
* @link https://www.php.net/manual/en/mysql-xdevapi-schema.gettables.php
- * @return array|\mysql_xdevapi\Table[] Array of all tables in this schema, where each array element value is a Table object with the table name as the key.
+ * @return \mysql_xdevapi\Table[] Array of all tables in this schema, where each array element value is a Table object with the table name as the key.
*/
- public function getTables () : array {}
+ public function getTables(): array {}
}
-
/**
* Interface SchemaObject
* @link https://www.php.net/manual/en/class.mysql-xdevapi-schemaobject.php
* @package mysql_xdevapi
*/
-interface SchemaObject extends \mysql_xdevapi\DatabaseObject {
+interface SchemaObject extends \mysql_xdevapi\DatabaseObject
+{
/* Methods */
- function getSchema () : \mysql_xdevapi\Schema;
+ public function getSchema(): Schema;
}
-
-
/**
* Class Session
* @link https://www.php.net/manual/en/class.mysql-xdevapi-session.php
* @package mysql_xdevapi
*/
-class Session {
-
+class Session
+{
/**
* Close the session with the server.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.close.php
* @return bool
*/
- public function close () : bool {}
+ public function close(): bool {}
/**
* Commit the transaction.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.commit.php
- * @return Object
+ * @return object
*/
- public function commit () : Object {}
+ public function commit(): object {}
/**
* Creates a new schema.
@@ -968,7 +957,7 @@ public function commit () : Object {}
* @param string $schema_name
* @return \mysql_xdevapi\Schema
*/
- public function createSchema ( string $schema_name ) : \mysql_xdevapi\Schema {}
+ public function createSchema(string $schema_name): Schema {}
/**
* Drop a schema (database).
@@ -976,14 +965,14 @@ public function createSchema ( string $schema_name ) : \mysql_xdevapi\Schema {}
* @param string $schema_name
* @return bool
*/
- public function dropSchema ( string $schema_name ) : bool {}
+ public function dropSchema(string $schema_name): bool {}
/**
* Generate a Universal Unique IDentifier (UUID) generated according to » RFC 4122.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.generateuuid.php
* @return string
*/
- public function generateUUID () : string {}
+ public function generateUUID(): string {}
/**
* Get a new schema object
@@ -991,28 +980,28 @@ public function generateUUID () : string {}
* @param string $schema_name
* @return \mysql_xdevapi\Schema
*/
- public function getSchema ( string $schema_name ) : \mysql_xdevapi\Schema {}
+ public function getSchema(string $schema_name): Schema {}
/**
* Get schema objects for all schemas available to the session.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.getschemas.php
* @return \mysql_xdevapi\Schema[]
*/
- public function getSchemas () : array {}
+ public function getSchemas(): array {}
/**
* Retrieve the MySQL server version for the session.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.getserverversion.php
* @return int
*/
- public function getServerVersion () : int {}
+ public function getServerVersion(): int {}
/**
* Get a list of client connections to the session's MySQL server.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.listclients.php
* @return array
*/
- public function listClients () : array {}
+ public function listClients(): array {}
/**
* Add quotes
@@ -1021,27 +1010,27 @@ public function listClients () : array {}
* @param string $name
* @return string
*/
- public function quoteName ( string $name ) : string {}
+ public function quoteName(string $name): string {}
/**
* Release a previously set savepoint.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.releasesavepoint.php
* @param string $name
*/
- public function releaseSavepoint ( string $name ) : void {}
+ public function releaseSavepoint(string $name): void {}
/**
* Rollback the transaction.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.rollback.php
*/
- public function rollback () : void {}
+ public function rollback(): void {}
/**
* Rollback transaction to savepoint
* @link https://www.php.net/manual/en/mysql-xdevapi-session.rollbackto.php
* @param string $name
*/
- public function rollbackTo ( string $name ) : void {}
+ public function rollbackTo(string $name): void {}
/**
* Create a new savepoint for the transaction.
@@ -1049,7 +1038,7 @@ public function rollbackTo ( string $name ) : void {}
* @param string $name
* @return string
*/
- public function setSavepoint (string $name ) : string {}
+ public function setSavepoint(string $name): string {}
/**
* Create a native SQL statement. Placeholders are supported using the native "?" syntax. Use the execute method to execute the SQL statement.
@@ -1057,28 +1046,28 @@ public function setSavepoint (string $name ) : string {}
* @param string $query
* @return SqlStatement
*/
- public function sql ( string $query ) : \mysql_xdevapi\SqlStatement {}
+ public function sql(string $query): SqlStatement {}
/**
* Start a new transaction.
* @link https://www.php.net/manual/en/mysql-xdevapi-session.starttransaction.php
*/
- public function startTransaction () : void {}
+ public function startTransaction(): void {}
}
-
/**
* Class SqlStatement
* @link https://www.php.net/manual/en/class.mysql-xdevapi-sqlstatement.php
* @package mysql_xdevapi
*/
-class SqlStatement {
+class SqlStatement
+{
/* Constants */
- const EXECUTE_ASYNC = 1 ;
- const BUFFERED = 2 ;
+ public const EXECUTE_ASYNC = 1;
+ public const BUFFERED = 2;
/* Properties */
- public $statement ;
+ public $statement;
/* Methods */
/**
@@ -1087,140 +1076,140 @@ class SqlStatement {
* @param string $param
* @return \mysql_xdevapi\SqlStatement
*/
- public function bind ( string $param ) : \mysql_xdevapi\SqlStatement {}
+ public function bind(string $param): SqlStatement {}
/**
* Execute the operation
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.execute.php
* @return \mysql_xdevapi\Result
*/
- public function execute () : \mysql_xdevapi\Result {}
+ public function execute(): Result {}
/**
* Get next result
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.getnextresult.php
* @return \mysql_xdevapi\Result
*/
- public function getNextResult () : \mysql_xdevapi\Result {}
+ public function getNextResult(): Result {}
/**
* Get result
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.getresult.php
* @return \mysql_xdevapi\Result
*/
- public function getResult () : \mysql_xdevapi\Result {}
+ public function getResult(): Result {}
/**
* Check for more results
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatement.hasmoreresults.php
* @return bool
*/
- public function hasMoreResults () : bool {}
+ public function hasMoreResults(): bool {}
}
-
/**
* Class SqlStatementResult
* @link https://www.php.net/manual/en/class.mysql-xdevapi-sqlstatementresult.php
* @package mysql_xdevapi
*/
-class SqlStatementResult implements \mysql_xdevapi\BaseResult , \Traversable {
+class SqlStatementResult implements \mysql_xdevapi\BaseResult, \Traversable
+{
/* Methods */
/**
* Fetch all the rows from the result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.fetchall.php
* @return array
*/
- public function fetchAll () : array {}
+ public function fetchAll(): array {}
/**
* Fetch one row from the result set.
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.fetchone.php
* @return array
*/
- public function fetchOne () : array {}
+ public function fetchOne(): array {}
/**
* Get affected row count
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getaffecteditemscount.php
* @return int
*/
- public function getAffectedItemsCount () : int {}
+ public function getAffectedItemsCount(): int {}
/**
* Get column count
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getcolumncount.php
* @return int
*/
- public function getColumnsCount () : int {}
+ public function getColumnsCount(): int {}
/**
* Get column names
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getcolumnnames.php
* @return array
*/
- public function getColumnNames () : array {}
+ public function getColumnNames(): array {}
/**
* Get columns
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getcolumns.php
* @return array
*/
- public function getColumns () : array {}
+ public function getColumns(): array {}
/**
* Get generated ids
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getgeneratedids.php
* @return array
*/
- public function getGeneratedIds () : array {}
+ public function getGeneratedIds(): array {}
/**
* Get last insert id
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getlastinsertid.php
* @return string
*/
- public function getLastInsertId () : string {}
+ public function getLastInsertId(): string {}
/**
* Get warnings from last operation
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getwarnings.php
- * @return array|\mysql_xdevapi\Warning[]
+ * @return \mysql_xdevapi\Warning[]
*/
- public function getWarnings () : array {}
+ public function getWarnings(): array {}
/**
* Get warning count from last operation
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.getwarningcount.php
* @return int
*/
- public function getWarningCounts () : int {}
+ public function getWarningCounts(): int {}
/**
* Check if result has data
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.hasdata.php
* @return bool
*/
- public function hasData () : bool {}
+ public function hasData(): bool {}
/**
* Get next result
* @link https://www.php.net/manual/en/mysql-xdevapi-sqlstatementresult.nextresult.php
* @return \mysql_xdevapi\Result
*/
- public function nextResult () : \mysql_xdevapi\Result {}
+ public function nextResult(): Result {}
}
-
/**
* Class Statement
* @link https://www.php.net/manual/en/class.mysql-xdevapi-statement.php
* @package mysql_xdevapi
*/
-class Statement {
+class Statement
+{
/* Constants */
- const EXECUTE_ASYNC = 1 ;
- const BUFFERED = 2 ;
+ public const EXECUTE_ASYNC = 1;
+ public const BUFFERED = 2;
/* Methods */
/**
@@ -1228,33 +1217,32 @@ class Statement {
* @link https://www.php.net/manual/en/mysql-xdevapi-statement.getnextresult.php
* @return \mysql_xdevapi\Result
*/
- public function getNextResult () : \mysql_xdevapi\Result {}
+ public function getNextResult(): Result {}
/**
* Get result
* @link https://www.php.net/manual/en/mysql-xdevapi-statement.getresult.php
* @return Result
*/
- public function getResult () : \mysql_xdevapi\Result {}
+ public function getResult(): Result {}
/**
* Check if more results
* @link https://www.php.net/manual/en/mysql-xdevapi-statement.hasmoreresults.php
* @return bool
*/
- public function hasMoreResults () : bool {}
+ public function hasMoreResults(): bool {}
}
-
/**
* Class Table
* @link https://www.php.net/manual/en/class.mysql-xdevapi-table.php
* @package mysql_xdevapi
*/
-class Table implements \mysql_xdevapi\SchemaObject {
+class Table implements \mysql_xdevapi\SchemaObject
+{
/* Properties */
- public $name ;
-
+ public $name;
/* Methods */
/**
@@ -1262,42 +1250,42 @@ class Table implements \mysql_xdevapi\SchemaObject {
* @link https://www.php.net/manual/en/mysql-xdevapi-table.count.php
* @return int
*/
- public function count () : int {}
+ public function count(): int {}
/**
* Deletes rows from a table.
* @link https://www.php.net/manual/en/mysql-xdevapi-table.delete.php
* @return \mysql_xdevapi\TableDelete
*/
- public function delete () : \mysql_xdevapi\TableDelete {}
+ public function delete(): TableDelete {}
/**
* Verifies if this table exists in the database.
* @link https://www.php.net/manual/en/mysql-xdevapi-table.existsindatabase.php
* @return bool
*/
- public function existsInDatabase () : bool {}
+ public function existsInDatabase(): bool {}
/**
* Returns the name of this database object.
* @link https://www.php.net/manual/en/mysql-xdevapi-table.getname.php
* @return string
*/
- public function getName () : string {}
+ public function getName(): string {}
/**
* Fetch the schema associated with the table.
* @link https://www.php.net/manual/en/mysql-xdevapi-table.getschema.php
* @return \mysql_xdevapi\Schema
*/
- public function getSchema () : \mysql_xdevapi\Schema {}
+ public function getSchema(): Schema {}
/**
* Get session associated with the table.
* @link https://www.php.net/manual/en/mysql-xdevapi-table.getsession.php
* @return \mysql_xdevapi\Session
*/
- public function getSession () : \mysql_xdevapi\Session {}
+ public function getSession(): Session {}
/**
* Inserts rows into a table.
@@ -1306,14 +1294,14 @@ public function getSession () : \mysql_xdevapi\Session {}
* @param string|string[] ...$additionalColumns Additional columns definitions.
* @return \mysql_xdevapi\TableInsert
*/
- public function insert ( $columns, ...$additionalColumns ) : \mysql_xdevapi\TableInsert {}
+ public function insert($columns, ...$additionalColumns): TableInsert {}
/**
* Determine if the underlying object is a view or not.
* @link https://www.php.net/manual/en/mysql-xdevapi-table.isview.php
* @return bool
*/
- public function isView () : bool {}
+ public function isView(): bool {}
/**
* Fetches data from a table.
@@ -1322,23 +1310,23 @@ public function isView () : bool {}
* @param string|string[] ...$additionalColumns Additional columns parameter definitions.
* @return \mysql_xdevapi\TableSelect
*/
- public function select ( $columns, ...$additionalColumns ) : \mysql_xdevapi\TableSelect {}
+ public function select($columns, ...$additionalColumns): TableSelect {}
/**
* Updates columns in a table.
* @link https://www.php.net/manual/en/mysql-xdevapi-table.update.php
* @return \mysql_xdevapi\TableUpdate
*/
- public function update () : \mysql_xdevapi\TableUpdate {}
+ public function update(): TableUpdate {}
}
-
/**
* Class TableDelete
* @link https://www.php.net/manual/en/class.mysql-xdevapi-tabledelete.php
* @package mysql_xdevapi
*/
-class TableDelete implements \mysql_xdevapi\Executable {
+class TableDelete implements \mysql_xdevapi\Executable
+{
/* Methods */
/**
* Binds a value to a specific placeholder.
@@ -1346,14 +1334,14 @@ class TableDelete implements \mysql_xdevapi\Executable {
* @param array $placeholder_values
* @return \mysql_xdevapi\TableDelete
*/
- public function bind ( array $placeholder_values ) : \mysql_xdevapi\TableDelete {}
+ public function bind(array $placeholder_values): TableDelete {}
/**
* Execute the delete query.
* @link https://www.php.net/manual/en/mysql-xdevapi-tabledelete.execute.php
* @return \mysql_xdevapi\Result
*/
- public function execute () : \mysql_xdevapi\Result {}
+ public function execute(): Result {}
/**
* Sets the maximum number of records or documents to delete.
@@ -1361,7 +1349,7 @@ public function execute () : \mysql_xdevapi\Result {}
* @param int $rows
* @return \mysql_xdevapi\TableDelete
*/
- public function limit ( int $rows ) : \mysql_xdevapi\TableDelete {}
+ public function limit(int $rows): TableDelete {}
/**
* Set the order options for a result set.
@@ -1369,7 +1357,7 @@ public function limit ( int $rows ) : \mysql_xdevapi\TableDelete {}
* @param string $orderby_expr
* @return \mysql_xdevapi\TableDelete
*/
- public function orderby ( string $orderby_expr ) : \mysql_xdevapi\TableDelete {}
+ public function orderby(string $orderby_expr): TableDelete {}
/**
* Sets the search condition to filter.
@@ -1377,22 +1365,22 @@ public function orderby ( string $orderby_expr ) : \mysql_xdevapi\TableDelete {}
* @param string $where_expr
* @return \mysql_xdevapi\TableDelete
*/
- public function where ( string $where_expr ) : \mysql_xdevapi\TableDelete {}
+ public function where(string $where_expr): TableDelete {}
}
-
/**
* Class TableInsert
* @link https://www.php.net/manual/en/class.mysql-xdevapi-tableinsert.php
* @package mysql_xdevapi
*/
-class TableInsert implements \mysql_xdevapi\Executable {
+class TableInsert implements \mysql_xdevapi\Executable
+{
/**
* Execute the statement.
* @link https://www.php.net/manual/en/mysql-xdevapi-tableinsert.execute.php
* @return \mysql_xdevapi\Result
*/
- public function execute () : \mysql_xdevapi\Result {}
+ public function execute(): Result {}
/**
* Set the values to be inserted.
@@ -1400,30 +1388,30 @@ public function execute () : \mysql_xdevapi\Result {}
* @param array $row_values
* @return \mysql_xdevapi\TableInsert
*/
- public function values ( array $row_values ) : \mysql_xdevapi\TableInsert {}
+ public function values(array $row_values): TableInsert {}
}
-
/**
* Class TableSelect
* @link https://www.php.net/manual/en/class.mysql-xdevapi-tableselect.php
* @package mysql_xdevapi
*/
-class TableSelect implements mysql_xdevapi\Executable {
+class TableSelect implements \mysql_xdevapi\Executable
+{
/**
* Binds a value to a specific placeholder.
* @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.bind.php
* @param array $placeholder_values
* @return \mysql_xdevapi\TableSelect
*/
- public function bind ( array $placeholder_values ) : \mysql_xdevapi\TableSelect {}
+ public function bind(array $placeholder_values): TableSelect {}
/**
* Execute the select statement by chaining it with the execute() method.
* @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.execute.php
* @return \mysql_xdevapi\RowResult
*/
- public function execute () : \mysql_xdevapi\RowResult {}
+ public function execute(): RowResult {}
/**
* Sets a grouping criteria for the result set.
@@ -1431,7 +1419,7 @@ public function execute () : \mysql_xdevapi\RowResult {}
* @param mixed $sort_expr
* @return \mysql_xdevapi\TableSelect
*/
- public function groupBy ( mixed $sort_expr ) : \mysql_xdevapi\TableSelect {}
+ public function groupBy($sort_expr): TableSelect {}
/**
* Sets a condition for records to consider in aggregate function operations.
@@ -1439,7 +1427,7 @@ public function groupBy ( mixed $sort_expr ) : \mysql_xdevapi\TableSelect {}
* @param string $sort_expr
* @return \mysql_xdevapi\TableSelect
*/
- public function having ( string $sort_expr ) : \mysql_xdevapi\TableSelect {}
+ public function having(string $sort_expr): TableSelect {}
/**
* Sets the maximum number of records or documents to return.
@@ -1447,7 +1435,7 @@ public function having ( string $sort_expr ) : \mysql_xdevapi\TableSelect {}
* @param int $rows
* @return \mysql_xdevapi\TableSelect
*/
- public function limit ( int $rows ) : \mysql_xdevapi\TableSelect {}
+ public function limit(int $rows): TableSelect {}
/**
* Execute a read operation with EXCLUSIVE LOCK. Only one lock can be active at a time.
@@ -1455,7 +1443,7 @@ public function limit ( int $rows ) : \mysql_xdevapi\TableSelect {}
* @param int|null $lock_waiting_option
* @return \mysql_xdevapi\TableSelect
*/
- public function lockExclusive (?int $lock_waiting_option ) : \mysql_xdevapi\TableSelect {}
+ public function lockExclusive(?int $lock_waiting_option): TableSelect {}
/**
* Execute a read operation with SHARED LOCK. Only one lock can be active at a time.
@@ -1463,7 +1451,7 @@ public function lockExclusive (?int $lock_waiting_option ) : \mysql_xdevapi\Tabl
* @param int|null $lock_waiting_option
* @return \mysql_xdevapi\TableSelect
*/
- public function lockShared (?int $lock_waiting_option ) : \mysql_xdevapi\TableSelect {}
+ public function lockShared(?int $lock_waiting_option): TableSelect {}
/**
* Skip given number of rows in result.
@@ -1471,7 +1459,7 @@ public function lockShared (?int $lock_waiting_option ) : \mysql_xdevapi\TableSe
* @param int $position
* @return \mysql_xdevapi\TableSelect
*/
- public function offset ( int $position ) : \mysql_xdevapi\TableSelect {}
+ public function offset(int $position): TableSelect {}
/**
* Sets the order by criteria.
@@ -1479,7 +1467,7 @@ public function offset ( int $position ) : \mysql_xdevapi\TableSelect {}
* @param string|string[] ...$sort_expr
* @return \mysql_xdevapi\TableSelect
*/
- public function orderby ( ...$sort_expr ) : \mysql_xdevapi\TableSelect {}
+ public function orderby(...$sort_expr): TableSelect {}
/**
* Sets the search condition to filter.
@@ -1487,30 +1475,30 @@ public function orderby ( ...$sort_expr ) : \mysql_xdevapi\TableSelect {}
* @param string $where_expr
* @return \mysql_xdevapi\TableSelect
*/
- public function where ( string $where_expr ) : \mysql_xdevapi\TableSelect {}
+ public function where(string $where_expr): TableSelect {}
}
-
/**
* Class TableUpdate
* @link https://www.php.net/manual/en/class.mysql-xdevapi-tableupdate.php
* @package mysql_xdevapi
*/
-class TableUpdate implements \mysql_xdevapi\Executable {
+class TableUpdate implements \mysql_xdevapi\Executable
+{
/**
* Bind update query parameters
* @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.bind.php
* @param array $placeholder_values The name of the placeholder, and the value to bind, defined as a JSON array.
* @return \mysql_xdevapi\TableUpdate
*/
- public function bind ( array $placeholder_values ) : \mysql_xdevapi\TableUpdate {}
+ public function bind(array $placeholder_values): TableUpdate {}
/**
* Executes the update statement.
* @link https://www.php.net/manual/en/mysql-xdevapi-tableupdate.execute.php
* @return \mysql_xdevapi\TableUpdate
*/
- public function execute () : \mysql_xdevapi\TableUpdate {}
+ public function execute(): TableUpdate {}
/**
* Set the maximum number of records or documents update.
@@ -1518,7 +1506,7 @@ public function execute () : \mysql_xdevapi\TableUpdate {}
* @param int $rows
* @return \mysql_xdevapi\TableUpdate
*/
- public function limit ( int $rows ) : \mysql_xdevapi\TableUpdate {}
+ public function limit(int $rows): TableUpdate {}
/**
* Sets the sorting criteria.
@@ -1526,7 +1514,7 @@ public function limit ( int $rows ) : \mysql_xdevapi\TableUpdate {}
* @param ?string|?string[] ...$orderby_expr The expressions that define the order by criteria. Can be an array with one or more expressions, or a string.
* @return \mysql_xdevapi\TableUpdate
*/
- public function orderby ( ...$orderby_expr) : \mysql_xdevapi\TableUpdate {}
+ public function orderby(...$orderby_expr): TableUpdate {}
/**
* Updates the column value on records in a table.
@@ -1535,7 +1523,7 @@ public function orderby ( ...$orderby_expr) : \mysql_xdevapi\TableUpdate {}
* @param string $expression_or_literal
* @return \mysql_xdevapi\TableUpdate
*/
- public function set ( string $table_field , string $expression_or_literal ) : \mysql_xdevapi\TableUpdate {}
+ public function set(string $table_field, string $expression_or_literal): TableUpdate {}
/**
* Set the search condition to filter.
@@ -1543,26 +1531,25 @@ public function set ( string $table_field , string $expression_or_literal ) : \m
* @param string $where_expr
* @return \mysql_xdevapi\TableUpdate
*/
- public function where ( string $where_expr ) : \mysql_xdevapi\TableUpdate {}
+ public function where(string $where_expr): TableUpdate {}
}
-
/**
* Class Warning
* @link https://www.php.net/manual/en/class.mysql-xdevapi-warning.php
* @package mysql_xdevapi
*/
-class Warning {
+class Warning
+{
/* Properties */
- public $message ;
- public $level ;
- public $code ;
+ public $message;
+ public $level;
+ public $code;
/* Constructor */
- private function __construct () {}
+ private function __construct() {}
}
-
/**
* Class XSession
* @link https://www.php.net/manual/en/class.mysql-xdevapi-xsession.php
diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php
index 4cd90450a..b9dec2fa1 100644
--- a/mysqli/mysqli.php
+++ b/mysqli/mysqli.php
@@ -3,1881 +3,2103 @@
* Start of mysqli extension stubs v.0.1
* @link https://php.net/manual/en/book.mysqli.php
*/
+
+use JetBrains\PhpStorm\ArrayShape;
+use JetBrains\PhpStorm\Deprecated;
+use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
+use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
+use JetBrains\PhpStorm\Internal\TentativeType;
+
/**
* mysqli_sql_exception
*/
-class mysqli_sql_exception extends RuntimeException {
- /**
- * The sql state with the error.
- */
- protected $sqlstate;
+final class mysqli_sql_exception extends RuntimeException
+{
+ /**
+ * The sql state with the error.
+ *
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ protected $sqlstate;
+
+ /**
+ * The error code
+ *
+ * @var int
+ */
+ protected $code;
+
+ /**
+ * @since 8.1
+ */
+ public function getSqlState(): string {}
+}
+
+/**
+ * MySQLi Driver.
+ * @link https://php.net/manual/en/class.mysqli-driver.php
+ */
+final class mysqli_driver
+{
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $client_info;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $client_version;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $driver_version;
+
+ /**
+ * @var string
+ */
+ public $embedded;
+
+ /**
+ * @var bool
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'bool'], default: '')]
+ public $reconnect;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $report_mode;
}
-/**
- * MySQLi Driver.
- * @link https://php.net/manual/en/class.mysqli-driver.php
- */
-final class mysqli_driver {
- /**
- * @var string
- */
- public $client_info;
- /**
- * @var string
- */
- public $client_version;
- /**
- * @var string
- */
- public $driver_version;
- /**
- * @var string
- */
- public $embedded;
- /**
- * @var bool
- */
- public $reconnect;
- /**
- * @var int
- */
- public $report_mode;
+/**
+ * Represents a connection between PHP and a MySQL database.
+ * @link https://php.net/manual/en/class.mysqli.php
+ */
+class mysqli
+{
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string|int'], default: '')]
+ public $affected_rows;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $client_info;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $client_version;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $connect_errno;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
+ public $connect_error;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $errno;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $error;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $field_count;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $host_info;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string|null'], default: '')]
+ public $info;
+
+ /**
+ * @var int|string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
+ public $insert_id;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $server_info;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $server_version;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $sqlstate;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $protocol_version;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $thread_id;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $warning_count;
+
+ /**
+ * @var array A list of errors, each as an associative array containing the errno, error, and sqlstate.
+ * @link https://secure.php.net/manual/en/mysqli.error-list.php
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'array'], default: '')]
+ public $error_list;
+ public $stat;
+
+ /**
+ * Open a new connection to the MySQL server
+ * @link https://php.net/manual/en/mysqli.construct.php
+ * @param string $hostname [optional] Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol. Prepending host by p: opens a persistent connection. mysqli_change_user() is automatically called on connections opened from the connection pool. Defaults to ini_get("mysqli.default_host")
+ * @param string $username [optional] The MySQL user name. Defaults to ini_get("mysqli.default_user")
+ * @param string $password [optional] If not provided or NULL, the MySQL server will attempt to authenticate the user against those user records which have no password only. This allows one username to be used with different permissions (depending on if a password as provided or not). Defaults to ini_get("mysqli.default_pw")
+ * @param string $database [optional] If provided will specify the default database to be used when performing queries. Defaults to ""
+ * @param int $port [optional] Specifies the port number to attempt to connect to the MySQL server. Defaults to ini_get("mysqli.default_port")
+ * @param string $socket [optional] Specifies the socket or named pipe that should be used. Defaults to ini_get("mysqli.default_socket")
+ */
+ public function __construct(
+ ?string $hostname = null,
+ ?string $username = null,
+ ?string $password = null,
+ ?string $database = null,
+ ?int $port = null,
+ ?string $socket = null
+ ) {}
+
+ /**
+ * Turns on or off auto-committing database modifications
+ * @link https://php.net/manual/en/mysqli.autocommit.php
+ * @param bool $enable
+ * Whether to turn on auto-commit or not.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function autocommit(bool $enable): bool {}
+
+ /**
+ * Starts a transaction
+ * @link https://secure.php.net/manual/en/mysqli.begin-transaction.php
+ * @param int $flags [optional]
+ * @param string $name [optional]
+ * @return bool true on success or false on failure.
+ * @since 5.5
+ */
+ #[TentativeType]
+ public function begin_transaction(
+ #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
+ ): bool {}
+
+ /**
+ * Changes the user of the specified database connection
+ * @link https://php.net/manual/en/mysqli.change-user.php
+ * @param string $username
+ * The MySQL user name.
+ *
+ * @param string $password
+ * The MySQL password.
+ *
+ * @param string $database
+ * The database to change to.
+ *
+ *
+ * If desired, the null value may be passed resulting in only changing
+ * the user and not selecting a database. To select a database in this
+ * case use the mysqli_select_db function.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function change_user(string $username, string $password, ?string $database): bool {}
+
+ /**
+ * Returns the current character set of the database connection
+ * @link https://php.net/manual/en/mysqli.character-set-name.php
+ * @return string The current character set of the connection
+ */
+ #[TentativeType]
+ public function character_set_name(): string {}
+
+ /**
+ * @removed 5.4
+ */
+ #[Deprecated(since: '5.3')]
+ public function client_encoding() {}
+
+ /**
+ * Closes a previously opened database connection
+ * @link https://php.net/manual/en/mysqli.close.php
+ * @return bool true on success or false on failure.
+ */
+ public function close() {}
+
+ /**
+ * Commits the current transaction
+ * @link https://php.net/manual/en/mysqli.commit.php
+ * @param int $flags A bitmask of MYSQLI_TRANS_COR_* constants.
+ * @param string $name If provided then COMMIT $name is executed.
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function commit(int $flags = 0, ?string $name = null): bool {}
+
+ /**
+ * @link https://php.net/manual/en/function.mysqli-connect.php
+ * @param string|null $hostname [optional]
+ * @param string|null $username [optional]
+ * @param string|null $password [optional]
+ * @param string|null $database [optional]
+ * @param int|null $port [optional]
+ * @param string|null $socket [optional]
+ * @return bool
+ */
+ #[TentativeType]
+ public function connect(
+ ?string $hostname = null,
+ ?string $username = null,
+ ?string $password = null,
+ ?string $database = null,
+ ?int $port = null,
+ ?string $socket = null
+ ): bool {}
+
+ /**
+ * Dump debugging information into the log
+ * @link https://php.net/manual/en/mysqli.dump-debug-info.php
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function dump_debug_info(): bool {}
+
+ /**
+ * Performs debugging operations
+ * @link https://php.net/manual/en/mysqli.debug.php
+ * @param string $options
+ * A string representing the debugging operation to perform
+ *
+ * @return bool true.
+ */
+ public function debug(string $options) {}
+
+ /**
+ * Returns a character set object
+ * @link https://php.net/manual/en/mysqli.get-charset.php
+ * @return object|null The function returns a character set object with the following properties:
+ * charset
+ * Character set name
+ * collation
+ * Collation name
+ * dir
+ * Directory the charset description was fetched from (?) or "" for built-in character sets
+ * min_length
+ * Minimum character length in bytes
+ * max_length
+ * Maximum character length in bytes
+ * number
+ * Internal character set number
+ * state
+ * Character set status (?)
+ */
+ #[TentativeType]
+ public function get_charset(): ?object {}
+
+ /**
+ * @param mysqli $mysql
+ * @param string $query
+ * @param array|null $params
+ * @return mysqli_result|bool
+ * @see mysqli_execute_query
+ * @since 8.2
+ */
+ public function execute_query(string $query, ?array $params = null): mysqli_result|bool {}
+
+ /**
+ * Returns the MySQL client version as a string
+ * @link https://php.net/manual/en/mysqli.get-client-info.php
+ * @return string A string that represents the MySQL client library version
+ */
+ #[TentativeType]
+ public function get_client_info(): string {}
+
+ /**
+ * Returns statistics about the client connection
+ * @link https://php.net/manual/en/mysqli.get-connection-stats.php
+ * @return array an array with connection stats.
+ */
+ #[TentativeType]
+ public function get_connection_stats(): array {}
+
+ /**
+ * Returns the version of the MySQL server
+ * @link https://php.net/manual/en/mysqli.get-server-info.php
+ * @return string A character string representing the server version.
+ */
+ #[TentativeType]
+ public function get_server_info(): string {}
+
+ /**
+ * Get result of SHOW WARNINGS
+ * @link https://php.net/manual/en/mysqli.get-warnings.php
+ * @return mysqli_warning|false
+ */
+ #[TentativeType]
+ public function get_warnings(): mysqli_warning|false {}
+
+ /**
+ * Initializes MySQLi object
+ * @link https://php.net/manual/en/mysqli.init.php
+ * @return bool|null
+ * @deprecated 8.1
+ */
+ public function init() {}
+
+ /**
+ * Asks the server to kill a MySQL thread
+ * @link https://php.net/manual/en/mysqli.kill.php
+ * @param int $process_id
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function kill(int $process_id): bool {}
+
+ /**
+ * Performs one or more queries on the database
+ * @link https://php.net/manual/en/mysqli.multi-query.php
+ * @param string $query
+ * A string containing the queries to be executed.
+ * Multiple queries must be separated by a semicolon.
+ *
+ *
+ * If the query contains any variable input then parameterized
+ * prepared statements should be used instead. Alternatively,
+ * the data must be properly formatted and all strings must be
+ * escaped using the mysqli_real_escape_string function.
+ *
+ * @return bool false if the first statement failed.
+ * To retrieve subsequent errors from other statements you have to call
+ * mysqli_next_result first.
+ */
+ #[TentativeType]
+ public function multi_query(string $query): bool {}
+
+ /**
+ * @link https://php.net/manual/en/mysqli.construct.php
+ * @param string $host [optional]
+ * @param string $username [optional]
+ * @param string $password [optional]
+ * @param string $database [optional]
+ * @param int $port [optional]
+ * @param string $socket [optional]
+ *
+ * @removed 8.0
+ */
+ public function mysqli($host = null, $username = null, $password = null, $database = null, $port = null, $socket = null) {}
+
+ /**
+ * Check if there are any more query results from a multi query
+ * @link https://php.net/manual/en/mysqli.more-results.php
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function more_results(): bool {}
+
+ /**
+ * Prepare next result from multi_query
+ * @link https://php.net/manual/en/mysqli.next-result.php
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function next_result(): bool {}
+
+ /**
+ * Set options
+ * @link https://php.net/manual/en/mysqli.options.php
+ * @param int $option
+ * The option that you want to set. It can be one of the following values:
+ *
+ * Valid options
+ *
+ * Name
+ * Description
+ *
+ *
+ * MYSQLI_OPT_CONNECT_TIMEOUT
+ * connection timeout in seconds (supported on Windows with TCP/IP since PHP 5.3.1)
+ *
+ *
+ * MYSQLI_OPT_LOCAL_INFILE
+ * enable/disable use of LOAD LOCAL INFILE
+ *
+ *
+ * MYSQLI_INIT_COMMAND
+ * command to execute after when connecting to MySQL server
+ *
+ *
+ * MYSQLI_READ_DEFAULT_FILE
+ *
+ * Read options from named option file instead of my.cnf
+ *
+ *
+ *
+ * MYSQLI_READ_DEFAULT_GROUP
+ *
+ * Read options from the named group from my.cnf
+ * or the file specified with MYSQL_READ_DEFAULT_FILE
+ *
+ *
+ *
+ * MYSQLI_SERVER_PUBLIC_KEY
+ *
+ * RSA public key file used with the SHA-256 based authentication.
+ *
+ *
+ *
+ *
+ * @param string|int $value
+ * The value for the option.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function options(int $option, $value): bool {}
+
+ /**
+ * Pings a server connection, or tries to reconnect if the connection has gone down
+ * @link https://php.net/manual/en/mysqli.ping.php
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function ping(): bool {}
+
+ /**
+ * Prepares an SQL statement for execution
+ * @link https://php.net/manual/en/mysqli.prepare.php
+ * @param string $query
+ * The query, as a string. It must consist of a single SQL statement.
+ *
+ *
+ * The SQL statement may contain zero or more parameter markers
+ * represented by question mark (?) characters
+ * at the appropriate positions.
+ *
+ *
+ * The markers are legal only in certain places in SQL statements.
+ * For example, they are permitted in the VALUES()
+ * list of an INSERT statement (to specify column
+ * values for a row), or in a comparison with a column in a
+ * WHERE clause to specify a comparison value.
+ *
+ *
+ * However, they are not permitted for identifiers (such as table or
+ * column names), or to specify both operands of a binary operator such as the = equal
+ * sign. The latter restriction is necessary because it would be
+ * impossible to determine the parameter type.
+ * In general, parameters are legal
+ * only in Data Manipulation Language (DML) statements, and not in Data
+ * Definition Language (DDL) statements.
+ *
+ * @return mysqli_stmt|false mysqli_prepare returns a statement object or false if an error occurred.
+ */
+ #[TentativeType]
+ public function prepare(string $query): mysqli_stmt|false {}
+
+ /**
+ * Performs a query on the database
+ * @link https://php.net/manual/en/mysqli.query.php
+ * @param string $query
+ * The query string.
+ *
+ *
+ * If the query contains any variable input then parameterized
+ * prepared statements should be used instead. Alternatively,
+ * the data must be properly formatted and all strings must be
+ * escaped using the mysqli_real_escape_string function.
+ *
+ * @param int $result_mode [optional]
+ * The result mode can be one of 3 constants indicating
+ * how the result will be returned from the MySQL server.
+ *
+ *
+ * MYSQLI_STORE_RESULT (default) - returns a mysqli_result
+ * object with buffered result set.
+ *
+ *
+ * MYSQLI_USE_RESULT - returns a mysqli_result object
+ * with unbuffered result set. As long as there are pending records
+ * waiting to be fetched, the connection line will be busy and all
+ * subsequent calls will return error Commands out of sync. To avoid
+ * the error all records must be fetched from the server or the result
+ * set must be discarded by calling mysqli_free_result.
+ *
+ *
+ * MYSQLI_ASYNC (available with mysqlnd) - the query is performed
+ * asynchronously and no result set is immediately returned.
+ * mysqli_poll is then used to get results from such queries.
+ * Used in combination with either
+ * MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT constant.
+ *
+ * @return mysqli_result|bool Returns false on failure.
+ * For successful queries which produce a result set,
+ * such as SELECT, SHOW, DESCRIBE or EXPLAIN,
+ * mysqli_query will return a mysqli_result object.
+ * For other successful queries mysqli_query will
+ * return true.
+ */
+ #[TentativeType]
+ public function query(
+ string $query,
+ #[PhpStormStubsElementAvailable(from: '7.1')] int $result_mode = MYSQLI_STORE_RESULT
+ ): mysqli_result|bool {}
+
+ /**
+ * Opens a connection to a mysql server
+ * @link https://php.net/manual/en/mysqli.real-connect.php
+ * @param string $hostname [optional]
+ * Can be either a host name or an IP address. Passing the null value
+ * or the string "localhost" to this parameter, the local host is
+ * assumed. When possible, pipes will be used instead of the TCP/IP
+ * protocol.
+ *
+ * @param string $username [optional]
+ * The MySQL user name.
+ *
+ * @param string $password [optional]
+ * If provided or null, the MySQL server will attempt to authenticate
+ * the user against those user records which have no password only. This
+ * allows one username to be used with different permissions (depending
+ * on if a password as provided or not).
+ *
+ * @param string $database [optional]
+ * If provided will specify the default database to be used when
+ * performing queries.
+ *
+ * @param int $port [optional]
+ * Specifies the port number to attempt to connect to the MySQL server.
+ *
+ * @param string $socket [optional]
+ * Specifies the socket or named pipe that should be used.
+ *
+ *
+ * Specifying the socket parameter will not
+ * explicitly determine the type of connection to be used when
+ * connecting to the MySQL server. How the connection is made to the
+ * MySQL database is determined by the host
+ * parameter.
+ *
+ * @param int $flags [optional]
+ * With the parameter flags you can set different
+ * connection options:
+ *
+ *
+ * Supported flags
+ *
+ * Name
+ * Description
+ *
+ *
+ * MYSQLI_CLIENT_COMPRESS
+ * Use compression protocol
+ *
+ *
+ * MYSQLI_CLIENT_FOUND_ROWS
+ * return number of matched rows, not the number of affected rows
+ *
+ *
+ * MYSQLI_CLIENT_IGNORE_SPACE
+ * Allow spaces after function names. Makes all function names reserved words.
+ *
+ *
+ * MYSQLI_CLIENT_INTERACTIVE
+ *
+ * Allow interactive_timeout seconds (instead of
+ * wait_timeout seconds) of inactivity before closing the connection
+ *
+ *
+ *
+ * MYSQLI_CLIENT_SSL
+ * Use SSL (encryption)
+ *
+ *
+ *
+ * For security reasons the MULTI_STATEMENT flag is
+ * not supported in PHP. If you want to execute multiple queries use the
+ * mysqli_multi_query function.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function real_connect(
+ ?string $hostname = null,
+ ?string $username = null,
+ ?string $password = null,
+ ?string $database = null,
+ ?int $port = null,
+ ?string $socket = null,
+ int $flags = null
+ ): bool {}
+
+ /**
+ * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
+ * @link https://php.net/manual/en/mysqli.real-escape-string.php
+ * @param string $string
+ * The string to be escaped.
+ *
+ *
+ * Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and
+ * Control-Z.
+ *
+ * @return string an escaped string.
+ */
+ #[TentativeType]
+ public function real_escape_string(string $string): string {}
+
+ /**
+ * Poll connections
+ * @link https://php.net/manual/en/mysqli.poll.php
+ * @param array &$read
+ *
+ * @param array &$error
+ *
+ * @param array &$reject
+ *
+ * @param int $seconds
+ * Number of seconds to wait, must be non-negative.
+ *
+ * @param int $microseconds [optional]
+ * Number of microseconds to wait, must be non-negative.
+ *
+ * @return int|false number of ready connections in success, false otherwise.
+ */
+ #[TentativeType]
+ public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}
+
+ /**
+ * Get result from async query
+ * @link https://php.net/manual/en/mysqli.reap-async-query.php
+ * @return mysqli_result|false mysqli_result in success, false otherwise.
+ */
+ #[TentativeType]
+ public function reap_async_query(): mysqli_result|bool {}
+
+ /**
+ * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
+ * @param string $string The string to be escaped.
+ * Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
+ * @return string
+ * @link https://secure.php.net/manual/en/mysqli.real-escape-string.php
+ */
+ #[TentativeType]
+ public function escape_string(string $string): string {}
+
+ /**
+ * Execute an SQL query
+ * @link https://php.net/manual/en/mysqli.real-query.php
+ * @param string $query
+ * The query, as a string.
+ *
+ *
+ * If the query contains any variable input then parameterized
+ * prepared statements should be used instead. Alternatively,
+ * the data must be properly formatted and all strings must be
+ * escaped using the mysqli_real_escape_string function.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function real_query(string $query): bool {}
+
+ /**
+ * Removes the named savepoint from the set of savepoints of the current transaction
+ * @link https://php.net/manual/en/mysqli.release-savepoint.php
+ * @param string $name The identifier of the savepoint.
+ * @return bool Returns TRUE on success or FALSE on failure.
+ * @since 5.5
+ */
+ #[TentativeType]
+ public function release_savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
+
+ /**
+ * Rolls back current transaction
+ * @link https://php.net/manual/en/mysqli.rollback.php
+ * @param int $flags [optional] A bitmask of MYSQLI_TRANS_COR_* constants.
+ * @param string $name [optional] If provided then ROLLBACK $name is executed.
+ * @return bool true on success or false on failure.
+ * @since 5.5 Added flags and name parameters.
+ */
+ #[TentativeType]
+ public function rollback(
+ #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null
+ ): bool {}
+
+ /**
+ * Set a named transaction savepoint
+ * @link https://secure.php.net/manual/en/mysqli.savepoint.php
+ * @param string $name
+ * @return bool Returns TRUE on success or FALSE on failure.
+ * @since 5.5
+ */
+ #[TentativeType]
+ public function savepoint(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {}
+
+ /**
+ * Selects the default database for database queries
+ * @link https://php.net/manual/en/mysqli.select-db.php
+ * @param string $database
+ * The database name.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function select_db(string $database): bool {}
+
+ /**
+ * Sets the client character set
+ * @link https://php.net/manual/en/mysqli.set-charset.php
+ * @param string $charset
+ * The desired character set.
+ *
+ * @return bool true on success or false on failure
+ */
+ #[TentativeType]
+ public function set_charset(string $charset): bool {}
+
+ /**
+ * @link https://php.net/manual/en/function.mysqli-set-opt
+ * @param int $option
+ * @param string|int $value
+ */
+ #[TentativeType]
+ public function set_opt(int $option, $value): bool {}
+
+ /**
+ * Used for establishing secure connections using SSL
+ * @link https://secure.php.net/manual/en/mysqli.ssl-set.php
+ * @param string $key
+ * The path name to the key file.
+ *
+ * @param string $certificate
+ * The path name to the certificate file.
+ *
+ * @param string $ca_certificate
+ * The path name to the certificate authority file.
+ *
+ * @param string $ca_path
+ * The pathname to a directory that contains trusted SSL CA certificates in PEM format.
+ *
+ * @param string $cipher_algos
+ * A list of allowable ciphers to use for SSL encryption.
+ *
+ * @return bool This function always returns TRUE value.
+ */
+ public function ssl_set(?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos) {}
+
+ /**
+ * Gets the current system status
+ * @link https://php.net/manual/en/mysqli.stat.php
+ * @return string|false A string describing the server status. false if an error occurred.
+ */
+ #[TentativeType]
+ public function stat(): string|false {}
+
+ /**
+ * Initializes a statement and returns an object for use with mysqli_stmt_prepare
+ * @link https://php.net/manual/en/mysqli.stmt-init.php
+ * @return mysqli_stmt an object.
+ */
+ #[TentativeType]
+ public function stmt_init(): mysqli_stmt|false {}
+
+ /**
+ * Transfers a result set from the last query
+ * @link https://php.net/manual/en/mysqli.store-result.php
+ * @param int $mode [optional] The option that you want to set
+ * @return mysqli_result|false a buffered result object or false if an error occurred.
+ *
+ *
+ * mysqli_store_result returns false in case the query
+ * didn't return a result set (if the query was, for example an INSERT
+ * statement). This function also returns false if the reading of the
+ * result set failed. You can check if you have got an error by checking
+ * if mysqli_error doesn't return an empty string, if
+ * mysqli_errno returns a non zero value, or if
+ * mysqli_field_count returns a non zero value.
+ * Also possible reason for this function returning false after
+ * successful call to mysqli_query can be too large
+ * result set (memory for it cannot be allocated). If
+ * mysqli_field_count returns a non-zero value, the
+ * statement should have produced a non-empty result set.
+ */
+ #[TentativeType]
+ public function store_result(int $mode = 0): mysqli_result|false {}
+
+ /**
+ * Returns whether thread safety is given or not
+ * @link https://php.net/manual/en/mysqli.thread-safe.php
+ * @return bool true if the client library is thread-safe, otherwise false.
+ */
+ #[TentativeType]
+ public function thread_safe(): bool {}
+
+ /**
+ * Initiate a result set retrieval
+ * @link https://php.net/manual/en/mysqli.use-result.php
+ * @return mysqli_result|false an unbuffered result object or false if an error occurred.
+ */
+ #[TentativeType]
+ public function use_result(): mysqli_result|false {}
+
+ /**
+ * @link https://php.net/manual/en/mysqli.refresh
+ * @param int $flags MYSQLI_REFRESH_*
+ * @return bool TRUE if the refresh was a success, otherwise FALSE
+ * @since 5.3
+ */
+ #[TentativeType]
+ public function refresh(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): bool {}
+}
+
+/**
+ * Represents one or more MySQL warnings.
+ * @link https://php.net/manual/en/class.mysqli-warning.php
+ */
+final class mysqli_warning
+{
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $message;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $sqlstate;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $errno;
+
+ /**
+ * The __construct purpose
+ * @link https://php.net/manual/en/mysqli-warning.construct.php
+ */
+ #[PhpStormStubsElementAvailable(from: '8.0')]
+ private function __construct() {}
+
+ /**
+ * The __construct purpose
+ * @link https://php.net/manual/en/mysqli-warning.construct.php
+ */
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')]
+ protected function __construct() {}
+
+ /**
+ * Move to the next warning
+ * @link https://php.net/manual/en/mysqli-warning.next.php
+ * @return bool True if it successfully moved to the next warning
+ */
+ public function next(): bool {}
+}
+
+/**
+ * Represents the result set obtained from a query against the database.
+ * Implements Traversable since 5.4
+ * @link https://php.net/manual/en/class.mysqli-result.php
+ */
+class mysqli_result implements IteratorAggregate
+{
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $current_field;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $field_count;
+
+ /**
+ * @var array|null
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'array|null'], default: '')]
+ public $lengths;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
+ public $num_rows;
+
+ /**
+ * @var mixed
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $type;
+
+ /**
+ * Constructor (no docs available)
+ * @param object $mysql
+ * @param int $result_mode [optional]
+ */
+ public function __construct(
+ #[PhpStormStubsElementAvailable(from: '8.0')] mysqli $mysql,
+ #[PhpStormStubsElementAvailable(from: '8.0')] int $result_mode = MYSQLI_STORE_RESULT
+ ) {}
+
+ /**
+ * Frees the memory associated with a result
+ * @return void
+ * @link https://php.net/manual/en/mysqli-result.free.php
+ */
+ #[TentativeType]
+ public function close(): void {}
+
+ /**
+ * Frees the memory associated with a result
+ * @link https://php.net/manual/en/mysqli-result.free.php
+ * @return void
+ */
+ #[TentativeType]
+ public function free(): void {}
+
+ /**
+ * Adjusts the result pointer to an arbitrary row in the result
+ * @link https://php.net/manual/en/mysqli-result.data-seek.php
+ * @param int $offset
+ * The field offset. Must be between zero and the total number of rows
+ * minus one (0..mysqli_num_rows - 1).
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function data_seek(int $offset): bool {}
+
+ /**
+ * Returns the next field in the result set
+ * @link https://php.net/manual/en/mysqli-result.fetch-field.php
+ * @return object|false an object which contains field definition information or false
+ * if no field information is available.
+ *
+ *
+ *
+ * Object properties
+ *
+ * Property
+ * Description
+ *
+ *
+ * name
+ * The name of the column
+ *
+ *
+ * orgname
+ * Original column name if an alias was specified
+ *
+ *
+ * table
+ * The name of the table this field belongs to (if not calculated)
+ *
+ *
+ * orgtable
+ * Original table name if an alias was specified
+ *
+ *
+ * def
+ * Reserved for default value, currently always ""
+ *
+ *
+ * db
+ * Database (since PHP 5.3.6)
+ *
+ *
+ * catalog
+ * The catalog name, always "def" (since PHP 5.3.6)
+ *
+ *
+ * max_length
+ * The maximum width of the field for the result set.
+ *
+ *
+ * length
+ * The width of the field, as specified in the table definition.
+ *
+ *
+ * charsetnr
+ * The character set number for the field.
+ *
+ *
+ * flags
+ * An integer representing the bit-flags for the field.
+ *
+ *
+ * type
+ * The data type used for this field
+ *
+ *
+ * decimals
+ * The number of decimals used (for integer fields)
+ *
+ *
+ */
+ #[TentativeType]
+ public function fetch_field(): object|false {}
+
+ /**
+ * Returns an array of objects representing the fields in a result set
+ * @link https://php.net/manual/en/mysqli-result.fetch-fields.php
+ * @return array an array of objects containing field definition information.
+ *
+ *
+ *
+ * Object properties
+ *
+ * Property
+ * Description
+ *
+ *
+ * name
+ * The name of the column
+ *
+ *
+ * orgname
+ * Original column name if an alias was specified
+ *
+ *
+ * table
+ * The name of the table this field belongs to (if not calculated)
+ *
+ *
+ * orgtable
+ * Original table name if an alias was specified
+ *
+ *
+ * def
+ * The default value for this field, represented as a string
+ *
+ *
+ * max_length
+ * The maximum width of the field for the result set.
+ *
+ *
+ * length
+ * The width of the field, as specified in the table definition.
+ *
+ *
+ * charsetnr
+ * The character set number for the field.
+ *
+ *
+ * flags
+ * An integer representing the bit-flags for the field.
+ *
+ *
+ * type
+ * The data type used for this field
+ *
+ *
+ * decimals
+ * The number of decimals used (for integer fields)
+ *
+ *
+ */
+ #[TentativeType]
+ public function fetch_fields(): array {}
+
+ /**
+ * Fetch meta-data for a single field
+ * @link https://php.net/manual/en/mysqli-result.fetch-field-direct.php
+ * @param int $index
+ * The field number. This value must be in the range from
+ * 0 to number of fields - 1.
+ *
+ * @return object|false an object which contains field definition information or false
+ * if no field information for specified fieldnr is
+ * available.
+ *
+ *
+ *
+ * Object attributes
+ *
+ * Attribute
+ * Description
+ *
+ *
+ * name
+ * The name of the column
+ *
+ *
+ * orgname
+ * Original column name if an alias was specified
+ *
+ *
+ * table
+ * The name of the table this field belongs to (if not calculated)
+ *
+ *
+ * orgtable
+ * Original table name if an alias was specified
+ *
+ *
+ * def
+ * The default value for this field, represented as a string
+ *
+ *
+ * max_length
+ * The maximum width of the field for the result set.
+ *
+ *
+ * length
+ * The width of the field, as specified in the table definition.
+ *
+ *
+ * charsetnr
+ * The character set number for the field.
+ *
+ *
+ * flags
+ * An integer representing the bit-flags for the field.
+ *
+ *
+ * type
+ * The data type used for this field
+ *
+ *
+ * decimals
+ * The number of decimals used (for integer fields)
+ *
+ *
+ */
+ #[TentativeType]
+ public function fetch_field_direct(int $index): object|false {}
+
+ /**
+ * Fetches all result rows as an associative array, a numeric array, or both
+ * @link https://php.net/manual/en/mysqli-result.fetch-all.php
+ * @param int $mode [optional]
+ * This optional parameter is a constant indicating what type of array
+ * should be produced from the current row data. The possible values for
+ * this parameter are the constants MYSQLI_ASSOC,
+ * MYSQLI_NUM, or MYSQLI_BOTH.
+ *
+ * @return array an array of associative or numeric arrays holding result rows.
+ */
+ #[TentativeType]
+ public function fetch_all(#[PhpStormStubsElementAvailable(from: '7.0')] int $mode = MYSQLI_NUM): array {}
+
+ /**
+ * Fetch the next row of a result set as an associative, a numeric array, or both
+ * @link https://php.net/manual/en/mysqli-result.fetch-array.php
+ * @param int $mode [optional]
+ * This optional parameter is a constant indicating what type of array
+ * should be produced from the current row data. The possible values for
+ * this parameter are the constants MYSQLI_ASSOC,
+ * MYSQLI_NUM, or MYSQLI_BOTH.
+ *
+ *
+ * By using the MYSQLI_ASSOC constant this function
+ * will behave identically to the mysqli_fetch_assoc,
+ * while MYSQLI_NUM will behave identically to the
+ * mysqli_fetch_row function. The final option
+ * MYSQLI_BOTH will create a single array with the
+ * attributes of both.
+ *
+ * @return array|false|null an array representing the fetched row, null if there
+ * are no more rows in the result set, or false on failure.
+ */
+ #[TentativeType]
+ public function fetch_array(int $mode = MYSQLI_BOTH): array|false|null {}
+
+ /**
+ * Fetch the next row of a result set as an associative array
+ * @link https://php.net/manual/en/mysqli-result.fetch-assoc.php
+ * @return array|false|null an associative array representing the fetched row,
+ * where each key in the array represents the name of one of the result set's columns, null if there
+ * are no more rows in the result set, or false on failure.
+ */
+ #[TentativeType]
+ public function fetch_assoc(): array|false|null {}
+
+ /**
+ * @template T
+ *
+ * Fetch the next row of a result set as an object
+ * @link https://php.net/manual/en/mysqli-result.fetch-object.php
+ * @param class-string $class [optional]
+ * The name of the class to instantiate, set the properties of and return.
+ * If not specified, a stdClass object is returned.
+ *
+ * @param null|array $constructor_args [optional]
+ * An optional array of parameters to pass to the constructor
+ * for class_name objects.
+ *
+ * @return T|stdClass|false|null an object representing the fetched row, where each property
+ * represents the name of the result set's column, null if there
+ * are no more rows in the result set, or false on failure.
+ */
+ #[TentativeType]
+ public function fetch_object(string $class = 'stdClass', array $constructor_args = null): object|false|null {}
+
+ /**
+ * Fetch the next row of a result set as an enumerated array
+ * @link https://php.net/manual/en/mysqli-result.fetch-row.php
+ * @return array|false|null an enumerated array representing
+ * the fetched row, null if there
+ * are no more rows in the result set, or false on failure.
+ */
+ #[TentativeType]
+ public function fetch_row(): array|false|null {}
+ /**
+ * Fetch a single column from the next row of a result set
+ *
+ * @param int $column [optional]
+ * 0-indexed number of the column you wish to retrieve from the row.
+ * If no value is supplied, the first column will be returned.
+ *
+ * @return string|int|float|false|null a single column from
+ * the next row of a result set or false if there are no more rows.
+ */
+ #[PhpStormStubsElementAvailable('8.1')]
+ public function fetch_column(int $column = 0): string|int|float|false|null {}
+
+ /**
+ * Set result pointer to a specified field offset
+ * @link https://php.net/manual/en/mysqli-result.field-seek.php
+ * @param int $index
+ * The field number. This value must be in the range from
+ * 0 to number of fields - 1.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function field_seek(int $index): bool {}
+
+ /**
+ * Frees the memory associated with a result
+ * @return void
+ * @link https://php.net/manual/en/mysqli-result.free.php
+ */
+ #[TentativeType]
+ public function free_result(): void {}
+
+ /**
+ * @return Iterator
+ * @since 8.0
+ */
+ public function getIterator(): Iterator {}
}
/**
- * Represents a connection between PHP and a MySQL database.
- * @link https://php.net/manual/en/class.mysqli.php
+ * Represents a prepared statement.
+ * @link https://php.net/manual/en/class.mysqli-stmt.php
*/
-class mysqli {
- /**
- * @var int
- */
- public $affected_rows;
- /**
- * @var string
- */
- public $client_info;
- /**
- * @var int
- */
- public $client_version;
- /**
- * @var string
- */
- public $connect_errno;
- /**
- * @var string
- */
- public $connect_error;
- /**
- * @var int
- */
- public $errno;
- /**
- * @var string
- */
- public $error;
- /**
- * @var int
- */
- public $field_count;
- /**
- * @var string
- */
- public $host_info;
- /**
- * @var string
- */
- public $info;
- /**
- * @var mixed
- */
- public $insert_id;
- /**
- * @var string
- */
- public $server_info;
- /**
- * @var int
- */
- public $server_version;
- /**
- * @var string
- */
- public $sqlstate;
- /**
- * @var string
- */
- public $protocol_version;
- /**
- * @var int
- */
- public $thread_id;
- /**
- * @var int
- */
- public $warning_count;
+class mysqli_stmt
+{
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
+ public $affected_rows;
/**
- * @var array A list of errors, each as an associative array containing the errno, error, and sqlstate.
- * @link https://secure.php.net/manual/en/mysqli.error-list.php
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
+ public $insert_id;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int|string'], default: '')]
+ public $num_rows;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $param_count;
+
+ /**
+ * @var int
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $field_count;
+
+ /**
+ * @var int
*/
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $errno;
+
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $error;
+
+ /**
+ * @var array
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'array'], default: '')]
public $error_list;
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')]
+ public $sqlstate;
- /**
- * Open a new connection to the MySQL server
- *
- * @param string $host [optional] Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol. Prepending host by p: opens a persistent connection. mysqli_change_user() is automatically called on connections opened from the connection pool. Defaults to ini_get("mysqli.default_host")
- * @param string $username [optional] The MySQL user name. Defaults to ini_get("mysqli.default_user")
- * @param string $passwd [optional] If not provided or NULL, the MySQL server will attempt to authenticate the user against those user records which have no password only. This allows one username to be used with different permissions (depending on if a password as provided or not). Defaults to ini_get("mysqli.default_pw")
- * @param string $dbname [optional] If provided will specify the default database to be used when performing queries. Defaults to ""
- * @param int $port [optional] Specifies the port number to attempt to connect to the MySQL server. Defaults to ini_get("mysqli.default_port")
- * @param string $socket [optional] Specifies the socket or named pipe that should be used. Defaults to ini_get("mysqli.default_socket")
- * @since 5.0
- */
- public function __construct (
- $host = null,
- $username = null,
- $passwd = null,
- $dbname = null,
- $port = null,
- $socket = null
- ) {}
-
- /**
- * Turns on or off auto-commiting database modifications
- * @link https://php.net/manual/en/mysqli.autocommit.php
- * @param bool $mode
- * Whether to turn on auto-commit or not.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function autocommit ($mode) {}
+ /**
+ * @var string
+ */
+ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')]
+ public $id;
/**
- * Starts a transaction
- * @link https://secure.php.net/manual/en/mysqli.begin-transaction.php
- * @param int $flags [optional]
- * @param string $name [optional]
- * @return bool true on success or false on failure.
- * @since 5.5
+ * mysqli_stmt constructor
+ * @param mysqli $mysql
+ * @param string $query [optional]
*/
- public function begin_transaction ($flags = 0, $name = null) {}
-
- /**
- * Changes the user of the specified database connection
- * @link https://php.net/manual/en/mysqli.change-user.php
- * @param string $user
- * The MySQL user name.
- *
- * @param string $password
- * The MySQL password.
- *
- * @param string $database
- * The database to change to.
- *
- *
- * If desired, the null value may be passed resulting in only changing
- * the user and not selecting a database. To select a database in this
- * case use the mysqli_select_db function.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function change_user ($user, $password, $database) {}
-
- /**
- * Returns the default character set for the database connection
- * @link https://php.net/manual/en/mysqli.character-set-name.php
- * @return string The default character set for the current connection
- * @since 5.0
- */
- public function character_set_name () {}
-
- /**
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- */
- public function client_encoding () {}
-
- /**
- * Closes a previously opened database connection
- * @link https://php.net/manual/en/mysqli.close.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function close () {}
-
- /**
- * Commits the current transaction
- * @link https://php.net/manual/en/mysqli.commit.php
- * @param int $flags A bitmask of MYSQLI_TRANS_COR_* constants.
- * @param string $name If provided then COMMIT $name is executed.
- * @return bool true on success or false on failure.
- * @since 5.5 Added flags and name parameters.
- * @since 5.0
- */
- public function commit ($flags = null, $name = null) {}
-
- /**
- * @param $host [optional]
- * @param $user [optional]
- * @param $password [optional]
- * @param $database [optional]
- * @param $port [optional]
- * @param $socket [optional]
- */
- public function connect ($host, $user, $password, $database, $port, $socket) {}
-
- /**
- * Dump debugging information into the log
- * @link https://php.net/manual/en/mysqli.dump-debug-info.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function dump_debug_info () {}
-
- /**
- * Performs debugging operations
- * @link https://php.net/manual/en/mysqli.debug.php
- * @param string $message
- * A string representing the debugging operation to perform
- *
- * @return bool true.
- * @since 5.0
- */
- public function debug ($message) {}
-
- /**
- * Returns a character set object
- * @link https://php.net/manual/en/mysqli.get-charset.php
- * @return object The function returns a character set object with the following properties:
- * charset
- * Character set name
- * collation
- * Collation name
- * dir
- * Directory the charset description was fetched from (?) or "" for built-in character sets
- * min_length
- * Minimum character length in bytes
- * max_length
- * Maximum character length in bytes
- * number
- * Internal character set number
- * state
- * Character set status (?)
- * @since 5.1
- */
- public function get_charset () {}
-
- /**
- * Returns the MySQL client version as a string
- * @link https://php.net/manual/en/mysqli.get-client-info.php
- * @return string A string that represents the MySQL client library version
- * @since 5.0
- */
- public function get_client_info () {}
-
- /**
- * Returns statistics about the client connection
- * @link https://php.net/manual/en/mysqli.get-connection-stats.php
- * @return array|false an array with connection stats if success, false otherwise.
- * @since 5.3
- */
- public function get_connection_stats () {}
-
- /**
- * An undocumented function equivalent to the $server_info property
- * @link https://php.net/manual/en/mysqli.get-server-info.php
- * @return string A character string representing the server version.
- */
- public function get_server_info () {}
-
- /**
- * Get result of SHOW WARNINGS
- * @link https://php.net/manual/en/mysqli.get-warnings.php
- * @return mysqli_warning
- * @since 5.1
- */
- public function get_warnings () {}
-
- /**
- * Initializes MySQLi and returns a resource for use with mysqli_real_connect()
- * @link https://php.net/manual/en/mysqli.init.php
- * @return mysqli an object.
- * @since 5.0
- */
- public function init () {}
-
- /**
- * Asks the server to kill a MySQL thread
- * @link https://php.net/manual/en/mysqli.kill.php
- * @param int $processid
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function kill ($processid) {}
-
- /**
- * Performs a query on the database
- * @link https://php.net/manual/en/mysqli.multi-query.php
- * @param string $query
- * The query, as a string.
- *
- *
- * Data inside the query should be properly escaped.
- *
- * @return bool false if the first statement failed.
- * To retrieve subsequent errors from other statements you have to call
- * mysqli_next_result first.
- * @since 5.0
- */
- public function multi_query ($query) {}
-
- /**
- * @param string $host [optional]
- * @param string $user [optional]
- * @param string $password [optional]
- * @param string $database [optional]
- * @param int $port [optional]
- * @param string $socket [optional]
- */
- public function mysqli ($host = null, $user = null, $password = null, $database = null, $port = null, $socket = null) {}
-
- /**
- * Check if there are any more query results from a multi query
- * @link https://php.net/manual/en/mysqli.more-results.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function more_results () {}
-
- /**
- * Prepare next result from multi_query
- * @link https://php.net/manual/en/mysqli.next-result.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function next_result () {}
-
- /**
- * Set options
- * @link https://php.net/manual/en/mysqli.options.php
- * @param int $option
- * The option that you want to set. It can be one of the following values:
- *
- * Valid options
- *
- * Name
- * Description
- *
- *
- * MYSQLI_OPT_CONNECT_TIMEOUT
- * connection timeout in seconds (supported on Windows with TCP/IP since PHP 5.3.1)
- *
- *
- * MYSQLI_OPT_LOCAL_INFILE
- * enable/disable use of LOAD LOCAL INFILE
- *
- *
- * MYSQLI_INIT_COMMAND
- * command to execute after when connecting to MySQL server
- *
- *
- * MYSQLI_READ_DEFAULT_FILE
- *
- * Read options from named option file instead of my.cnf
- *
- *
- *
- * MYSQLI_READ_DEFAULT_GROUP
- *
- * Read options from the named group from my.cnf
- * or the file specified with MYSQL_READ_DEFAULT_FILE
- *
- *
+ public function __construct($mysql, $query) {}
+
+ /**
+ * Used to get the current value of a statement attribute
+ * @link https://php.net/manual/en/mysqli-stmt.attr-get.php
+ * @param int $attribute The attribute that you want to get.
+ * @return int Returns the value of the attribute.
+ */
+ #[TentativeType]
+ public function attr_get(int $attribute): int {}
+
+ /**
+ * Used to modify the behavior of a prepared statement
+ * @link https://php.net/manual/en/mysqli-stmt.attr-set.php
+ * @param int $attribute
+ * The attribute that you want to set. It can have one of the following values:
+ *
+ * Attribute values
*
- * MYSQLI_SERVER_PUBLIC_KEY
+ * Character
+ * Description
+ *
+ *
+ * MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
*
- * RSA public key file used with the SHA-256 based authentication.
+ * If set to 1, causes mysqli_stmt_store_result to
+ * update the metadata MYSQL_FIELD->max_length value.
+ *
+ *
+ *
+ * MYSQLI_STMT_ATTR_CURSOR_TYPE
+ *
+ * Type of cursor to open for statement when mysqli_stmt_execute
+ * is invoked. mode can be MYSQLI_CURSOR_TYPE_NO_CURSOR
+ * (the default) or MYSQLI_CURSOR_TYPE_READ_ONLY.
+ *
+ *
+ *
+ * MYSQLI_STMT_ATTR_PREFETCH_ROWS
+ *
+ * Number of rows to fetch from server at a time when using a cursor.
+ * mode can be in the range from 1 to the maximum
+ * value of unsigned long. The default is 1.
*
*
- *
- *
- * @param mixed $value
- * The value for the option.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function options ($option, $value) {}
-
- /**
- * Pings a server connection, or tries to reconnect if the connection has gone down
- * @link https://php.net/manual/en/mysqli.ping.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function ping () {}
-
- /**
- * Prepare an SQL statement for execution
- * @link https://php.net/manual/en/mysqli.prepare.php
- * @param string $query
- * The query, as a string.
- *
- *
- * You should not add a terminating semicolon or \g
- * to the statement.
- *
- *
- * This parameter can include one or more parameter markers in the SQL
- * statement by embedding question mark (?) characters
- * at the appropriate positions.
- *
- *
- * The markers are legal only in certain places in SQL statements.
- * For example, they are allowed in the VALUES()
- * list of an INSERT statement (to specify column
- * values for a row), or in a comparison with a column in a
- * WHERE clause to specify a comparison value.
- *
- *
- * However, they are not allowed for identifiers (such as table or
- * column names), in the select list that names the columns to be
- * returned by a SELECT statement, or to specify both
- * operands of a binary operator such as the = equal
- * sign. The latter restriction is necessary because it would be
- * impossible to determine the parameter type. It's not allowed to
- * compare marker with NULL by
- * ? IS NULL too. In general, parameters are legal
- * only in Data Manipulation Language (DML) statements, and not in Data
- * Definition Language (DDL) statements.
- *
- * @return mysqli_stmt|false mysqli_prepare returns a statement object or false if an error occurred.
- * @since 5.0
- */
- public function prepare ($query) {}
-
- /**
- * Performs a query on the database
- * @link https://php.net/manual/en/mysqli.query.php
- * @param string $query
- * The query string.
- *
- *
- * Data inside the query should be properly escaped.
- *
- * @param int $resultmode [optional]
- * Either the constant MYSQLI_USE_RESULT or
- * MYSQLI_STORE_RESULT depending on the desired
- * behavior. By default, MYSQLI_STORE_RESULT is used.
- *
- *
- * If you use MYSQLI_USE_RESULT all subsequent calls
- * will return error Commands out of sync unless you
- * call mysqli_free_result
- *
- *
- * With MYSQLI_ASYNC (available with mysqlnd), it is
- * possible to perform query asynchronously.
- * mysqli_poll is then used to get results from such
- * queries.
- *
- * @return mysqli_result|bool For successful SELECT, SHOW, DESCRIBE or
- * EXPLAIN queries mysqli_query will return
- * a mysqli_result object. For other successful queries mysqli_query will
- * return true and false on failure.
- * @since 5.0
- */
- public function query ($query, $resultmode = MYSQLI_STORE_RESULT) {}
-
- /**
- * Opens a connection to a mysql server
- * @link https://php.net/manual/en/mysqli.real-connect.php
- * @param string $host [optional]
- * Can be either a host name or an IP address. Passing the null value
- * or the string "localhost" to this parameter, the local host is
- * assumed. When possible, pipes will be used instead of the TCP/IP
- * protocol.
- *
- * @param string $username [optional]
- * The MySQL user name.
- *
- * @param string $passwd [optional]
- * If provided or null, the MySQL server will attempt to authenticate
- * the user against those user records which have no password only. This
- * allows one username to be used with different permissions (depending
- * on if a password as provided or not).
- *
- * @param string $dbname [optional]
- * If provided will specify the default database to be used when
- * performing queries.
- *
- * @param int $port [optional]
- * Specifies the port number to attempt to connect to the MySQL server.
- *
- * @param string $socket [optional]
- * Specifies the socket or named pipe that should be used.
- *
- *
- * Specifying the socket parameter will not
- * explicitly determine the type of connection to be used when
- * connecting to the MySQL server. How the connection is made to the
- * MySQL database is determined by the host
- * parameter.
- *
- * @param int $flags [optional]
- * With the parameter flags you can set different
- * connection options:
- *
- *
- * Supported flags
- *
- * Name
- * Description
- *
- *
- * MYSQLI_CLIENT_COMPRESS
- * Use compression protocol
- *
- *
- * MYSQLI_CLIENT_FOUND_ROWS
- * return number of matched rows, not the number of affected rows
- *
- *
- * MYSQLI_CLIENT_IGNORE_SPACE
- * Allow spaces after function names. Makes all function names reserved words.
- *
- *
- * MYSQLI_CLIENT_INTERACTIVE
- *
- * Allow interactive_timeout seconds (instead of
- * wait_timeout seconds) of inactivity before closing the connection
- *
- *
- *
- * MYSQLI_CLIENT_SSL
- * Use SSL (encryption)
- *
- *
- *
- * For security reasons the MULTI_STATEMENT flag is
- * not supported in PHP. If you want to execute multiple queries use the
- * mysqli_multi_query function.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function real_connect ($host = null, $username = null, $passwd = null, $dbname = null, $port = null, $socket = null, $flags = null) {}
-
- /**
- * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
- * @link https://php.net/manual/en/mysqli.real-escape-string.php
- * @param string $escapestr
- * The string to be escaped.
- *
- *
- * Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and
- * Control-Z.
- *
- * @return string an escaped string.
- * @since 5.0
- */
- public function real_escape_string ($escapestr) {}
-
- /**
- * Poll connections
- * @link https://php.net/manual/en/mysqli.poll.php
- * @param array $read
- *
- * @param array $error
- *
- * @param array $reject
- *
- * @param int $sec
- * Number of seconds to wait, must be non-negative.
- *
- * @param int $usec [optional]
- * Number of microseconds to wait, must be non-negative.
- *
- * @return int|false number of ready connections in success, false otherwise.
- * @since 5.3
- */
- public static function poll (array &$read , array &$error , array &$reject , $sec, $usec = null) {}
-
- /**
- * Get result from async query
- * @link https://php.net/manual/en/mysqli.reap-async-query.php
- * @return mysqli_result|false mysqli_result in success, false otherwise.
- * @since 5.3
- */
- public function reap_async_query () {}
-
- /**
- * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
- * @param string $escapestr The string to be escaped.
- * Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
- * @return string
- * @link https://secure.php.net/manual/en/mysqli.real-escape-string.php
- */
- public function escape_string ($escapestr) {}
-
- /**
- * Execute an SQL query
- * @link https://php.net/manual/en/mysqli.real-query.php
- * @param string $query
- * The query, as a string.
- *
- *
- * Data inside the query should be properly escaped.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function real_query ($query) {}
+ *
+ *
+ *
+ * If you use the MYSQLI_STMT_ATTR_CURSOR_TYPE option with
+ * MYSQLI_CURSOR_TYPE_READ_ONLY, a cursor is opened for the
+ * statement when you invoke mysqli_stmt_execute. If there
+ * is already an open cursor from a previous mysqli_stmt_execute call,
+ * it closes the cursor before opening a new one. mysqli_stmt_reset
+ * also closes any open cursor before preparing the statement for re-execution.
+ * mysqli_stmt_free_result closes any open cursor.
+ *
+ *
+ * If you open a cursor for a prepared statement, mysqli_stmt_store_result
+ * is unnecessary.
+ *
+ * @param int $value The value to assign to the attribute.
+ * @return bool
+ */
+ #[TentativeType]
+ public function attr_set(int $attribute, int $value): bool {}
/**
- * Execute an SQL query
- * @link https://php.net/manual/en/mysqli.release-savepoint.php
- * @param string $name
- * @return bool Returns TRUE on success or FALSE on failure.
- * @since 5.5
+ * Binds variables to a prepared statement as parameters
+ * @link https://php.net/manual/en/mysqli-stmt.bind-param.php
+ * @param string $types
+ * A string that contains one or more characters which specify the types
+ * for the corresponding bind variables:
+ *
+ * Type specification chars
+ *
+ * Character
+ * Description
+ *
+ *
+ * i
+ * corresponding variable has type integer
+ *
+ *
+ * d
+ * corresponding variable has type double
+ *
+ *
+ * s
+ * corresponding variable has type string
+ *
+ *
+ * b
+ * corresponding variable is a blob and will be sent in packets
+ *
+ *
+ *
+ * @param mixed &$var1
+ * The number of variables and length of string
+ * types must match the parameters in the statement.
+ *
+ * @param mixed &...$_ [optional]
+ * @return bool true on success or false on failure.
*/
- public function release_savepoint ($name) {}
+ public function bind_param($types, &$var1, &...$_) {}
- /**
- * Rolls back current transaction
- * @link https://php.net/manual/en/mysqli.rollback.php
- * @param int $flags A bitmask of MYSQLI_TRANS_COR_* constants.
- * @param string $name If provided then ROLLBACK $name is executed.
- * @return bool true on success or false on failure.
- * @since 5.5 Added flags and name parameters.
- * @since 5.0
- */
- public function rollback ($flags = null, $name = null) {}
+ /**
+ * Binds variables to a prepared statement for result storage
+ * @link https://php.net/manual/en/mysqli-stmt.bind-result.php
+ * @param mixed &$var1 The variable to be bound.
+ * @param mixed &...$_ The variables to be bound.
+ * @return bool true on success or false on failure.
+ */
+ public function bind_result(&$var1, &...$_) {}
/**
- * Set a named transaction savepoint
- * @link https://secure.php.net/manual/en/mysqli.savepoint.php
- * @param string $name
- * @return bool Returns TRUE on success or FALSE on failure.
- * @since 5.5
+ * Closes a prepared statement
+ * @link https://php.net/manual/en/mysqli-stmt.close.php
+ * @return bool true on success or false on failure.
*/
- public function savepoint ($name) {}
-
- /**
- * Selects the default database for database queries
- * @link https://php.net/manual/en/mysqli.select-db.php
- * @param string $dbname
- * The database name.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function select_db ($dbname) {}
-
- /**
- * Sets the default client character set
- * @link https://php.net/manual/en/mysqli.set-charset.php
- * @param string $charset
- * The charset to be set as default.
- *
- * @return bool true on success or false on failure.
- * @since 5.0.5
- */
- public function set_charset ($charset) {}
-
- /**
- * @param $option
- * @param $value
- */
- public function set_opt ($option, $value) {}
-
-
- /**
- * Used for establishing secure connections using SSL
- * @link https://secure.php.net/manual/en/mysqli.ssl-set.php
- * @param $key
- * The path name to the key file.
- *
- * @param $cert
- * The path name to the certificate file.
- *
- * @param $ca
- * The path name to the certificate authority file.
- *
- * @param $capath
- * The pathname to a directory that contains trusted SSL CA certificates in PEM format.
- *
- * @param $cipher
- * A list of allowable ciphers to use for SSL encryption.
- *
- * @return bool This function always returns TRUE value.
- * @since 5.0
- */
- public function ssl_set($key , $cert , $ca , $capath , $cipher) {}
-
- /**
- * Gets the current system status
- * @link https://php.net/manual/en/mysqli.stat.php
- * @return string|false A string describing the server status. false if an error occurred.
- * @since 5.0
- */
- public function stat () {}
-
- /**
- * Initializes a statement and returns an object for use with mysqli_stmt_prepare
- * @link https://php.net/manual/en/mysqli.stmt-init.php
- * @return mysqli_stmt an object.
- * @since 5.0
- */
- public function stmt_init () {}
-
- /**
- * Transfers a result set from the last query
- * @link https://php.net/manual/en/mysqli.store-result.php
- * @param int $option [optional] The option that you want to set
- * @return mysqli_result|false a buffered result object or false if an error occurred.
- *
- *
- * mysqli_store_result returns false in case the query
- * didn't return a result set (if the query was, for example an INSERT
- * statement). This function also returns false if the reading of the
- * result set failed. You can check if you have got an error by checking
- * if mysqli_error doesn't return an empty string, if
- * mysqli_errno returns a non zero value, or if
- * mysqli_field_count returns a non zero value.
- * Also possible reason for this function returning false after
- * successful call to mysqli_query can be too large
- * result set (memory for it cannot be allocated). If
- * mysqli_field_count returns a non-zero value, the
- * statement should have produced a non-empty result set.
- * @since 5.0
- */
- public function store_result ($option) {}
-
- /**
- * Returns whether thread safety is given or not
- * @link https://php.net/manual/en/mysqli.thread-safe.php
- * @return bool true if the client library is thread-safe, otherwise false.
- * @since 5.0
- */
- public function thread_safe () {}
-
- /**
- * Initiate a result set retrieval
- * @link https://php.net/manual/en/mysqli.use-result.php
- * @return mysqli_result|false an unbuffered result object or false if an error occurred.
- * @since 5.0
- */
- public function use_result () {}
-
- /**
- * @param $options
- */
- public function refresh ($options) {}
+ public function close() {}
-}
+ /**
+ * Seeks to an arbitrary row in statement result set
+ * @link https://php.net/manual/en/mysqli-stmt.data-seek.php
+ * @param int $offset
+ * Must be between zero and the total number of rows minus one (0..
+ * mysqli_stmt_num_rows - 1).
+ *
+ * @return void
+ */
+ #[TentativeType]
+ public function data_seek(int $offset): void {}
-/**
- * Represents one or more MySQL warnings.
- * @link https://php.net/manual/en/class.mysqli-warning.php
- */
-final class mysqli_warning {
- /**
- * @var string
- */
- public $message;
- /**
- * @var string
- */
- public $sqlstate;
- /**
- * @var int
- */
- public $errno;
-
-
- /**
- * The __construct purpose
- * @link https://php.net/manual/en/mysqli-warning.construct.php
- */
- protected function __construct () {}
-
- /**
- * Move to the next warning
- * @link https://php.net/manual/en/mysqli-warning.next.php
- * @return bool True if it successfully moved to the next warning
- */
- public function next () {}
+ /**
+ * Executes a prepared statement
+ * @link https://php.net/manual/en/mysqli-stmt.execute.php
+ * @param array|null $params [optional] An optional list array with as many elements
+ * as there are bound parameters in the SQL statement being executed. Each value is treated as a string.
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function execute(#[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}
-}
+ /**
+ * Fetch results from a prepared statement into the bound variables
+ * @link https://php.net/manual/en/mysqli-stmt.fetch.php
+ * @return bool|null
+ */
+ #[TentativeType]
+ public function fetch(): ?bool {}
-/**
- * Represents the result set obtained from a query against the database.
- * Implements Traversable since 5.4
- * @link https://php.net/manual/en/class.mysqli-result.php
- */
-class mysqli_result implements Traversable {
- /**
- * @var int
- */
- public $current_field;
- /**
- * @var int
- */
- public $field_count;
- /**
- * @var array
- */
- public $lengths;
- /**
- * @var int
- */
- public $num_rows;
- /**
- * @var mixed
- */
- public $type;
-
- /**
- * Constructor (no docs available)
- */
- public function __construct () {}
-
- /**
- * Frees the memory associated with a result
- * @return void
- * @link https://php.net/manual/en/mysqli-result.free.php
- * @since 5.0
- */
- public function close () {}
-
- /**
- * Frees the memory associated with a result
- * @link https://php.net/manual/en/mysqli-result.free.php
- * @return void
- * @since 5.0
- */
- public function free () {}
-
- /**
- * Adjusts the result pointer to an arbitary row in the result
- * @link https://php.net/manual/en/mysqli-result.data-seek.php
- * @param int $offset
- * The field offset. Must be between zero and the total number of rows
- * minus one (0..mysqli_num_rows - 1).
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function data_seek ($offset) {}
-
- /**
- * Returns the next field in the result set
- * @link https://php.net/manual/en/mysqli-result.fetch-field.php
- * @return object|false an object which contains field definition information or false
- * if no field information is available.
- *
- *
- *
- * Object properties
- *
- * Property
- * Description
- *
- *
- * name
- * The name of the column
- *
- *
- * orgname
- * Original column name if an alias was specified
- *
- *
- * table
- * The name of the table this field belongs to (if not calculated)
- *
- *
- * orgtable
- * Original table name if an alias was specified
- *
- *
- * def
- * Reserved for default value, currently always ""
- *
- *
- * db
- * Database (since PHP 5.3.6)
- *
- *
- * catalog
- * The catalog name, always "def" (since PHP 5.3.6)
- *
- *
- * max_length
- * The maximum width of the field for the result set.
- *
- *
- * length
- * The width of the field, as specified in the table definition.
- *
- *
- * charsetnr
- * The character set number for the field.
- *
- *
- * flags
- * An integer representing the bit-flags for the field.
- *
- *
- * type
- * The data type used for this field
- *
- *
- * decimals
- * The number of decimals used (for integer fields)
- *
- *
- * @since 5.0
- */
- public function fetch_field () {}
-
- /**
- * Returns an array of objects representing the fields in a result set
- * @link https://php.net/manual/en/mysqli-result.fetch-fields.php
- * @return array an array of objects which contains field definition information or
- * false if no field information is available.
- *
- *
- *
- * Object properties
- *
- * Property
- * Description
- *
- *
- * name
- * The name of the column
- *
- *
- * orgname
- * Original column name if an alias was specified
- *
- *
- * table
- * The name of the table this field belongs to (if not calculated)
- *
- *
- * orgtable
- * Original table name if an alias was specified
- *
- *
- * def
- * The default value for this field, represented as a string
- *
- *
- * max_length
- * The maximum width of the field for the result set.
- *
- *
- * length
- * The width of the field, as specified in the table definition.
- *
- *
- * charsetnr
- * The character set number for the field.
- *
- *
- * flags
- * An integer representing the bit-flags for the field.
- *
- *
- * type
- * The data type used for this field
- *
- *
- * decimals
- * The number of decimals used (for integer fields)
- *
- *
- * @since 5.0
- */
- public function fetch_fields () {}
-
- /**
- * Fetch meta-data for a single field
- * @link https://php.net/manual/en/mysqli-result.fetch-field-direct.php
- * @param int $fieldnr
- * The field number. This value must be in the range from
- * 0 to number of fields - 1.
- *
- * @return object|false an object which contains field definition information or false
- * if no field information for specified fieldnr is
- * available.
- *
- *
- *
- * Object attributes
- *
- * Attribute
- * Description
- *
- *
- * name
- * The name of the column
- *
- *
- * orgname
- * Original column name if an alias was specified
- *
- *
- * table
- * The name of the table this field belongs to (if not calculated)
- *
- *
- * orgtable
- * Original table name if an alias was specified
- *
- *
- * def
- * The default value for this field, represented as a string
- *
- *
- * max_length
- * The maximum width of the field for the result set.
- *
- *
- * length
- * The width of the field, as specified in the table definition.
- *
- *
- * charsetnr
- * The character set number for the field.
- *
- *
- * flags
- * An integer representing the bit-flags for the field.
- *
- *
- * type
- * The data type used for this field
- *
- *
- * decimals
- * The number of decimals used (for integer fields)
- *
- *
- * @since 5.0
- */
- public function fetch_field_direct ($fieldnr) {}
-
- /**
- * Fetches all result rows as an associative array, a numeric array, or both
- * @link https://php.net/manual/en/mysqli-result.fetch-all.php
- * @param int $resulttype [optional]
- * This optional parameter is a constant indicating what type of array
- * should be produced from the current row data. The possible values for
- * this parameter are the constants MYSQLI_ASSOC,
- * MYSQLI_NUM, or MYSQLI_BOTH.
- *
- * @return mixed an array of associative or numeric arrays holding result rows.
- * @since 5.3
- */
- public function fetch_all ($resulttype = null) {}
-
- /**
- * Fetch a result row as an associative, a numeric array, or both
- * @link https://php.net/manual/en/mysqli-result.fetch-array.php
- * @param int $resulttype [optional]
- * This optional parameter is a constant indicating what type of array
- * should be produced from the current row data. The possible values for
- * this parameter are the constants MYSQLI_ASSOC,
- * MYSQLI_NUM, or MYSQLI_BOTH.
- *
- *
- * By using the MYSQLI_ASSOC constant this function
- * will behave identically to the mysqli_fetch_assoc,
- * while MYSQLI_NUM will behave identically to the
- * mysqli_fetch_row function. The final option
- * MYSQLI_BOTH will create a single array with the
- * attributes of both.
- *
- * @return mixed an array of strings that corresponds to the fetched row or null if there
- * are no more rows in resultset.
- * @since 5.0
- */
- public function fetch_array ($resulttype = MYSQLI_BOTH) {}
-
- /**
- * Fetch a result row as an associative array
- * @link https://php.net/manual/en/mysqli-result.fetch-assoc.php
- * @return array|null an associative array of strings representing the fetched row in the result
- * set, where each key in the array represents the name of one of the result
- * set's columns or null if there are no more rows in resultset.
- *
- *
- * If two or more columns of the result have the same field names, the last
- * column will take precedence. To access the other column(s) of the same
- * name, you either need to access the result with numeric indices by using
- * mysqli_fetch_row or add alias names.
- * @since 5.0
- */
- public function fetch_assoc () {}
-
- /**
- * Returns the current row of a result set as an object
- * @link https://php.net/manual/en/mysqli-result.fetch-object.php
- * @param string $class_name [optional]
- * The name of the class to instantiate, set the properties of and return.
- * If not specified, a stdClass object is returned.
- *
- * @param array $params [optional]
- * An optional array of parameters to pass to the constructor
- * for class_name objects.
- *
- * @return stdClass|object an object with string properties that corresponds to the fetched
- * row or null if there are no more rows in resultset.
- * @since 5.0
- */
- public function fetch_object ($class_name = 'stdClass', array $params = null) {}
-
- /**
- * Get a result row as an enumerated array
- * @link https://php.net/manual/en/mysqli-result.fetch-row.php
- * @return mixed mysqli_fetch_row returns an array of strings that corresponds to the fetched row
- * or &null; if there are no more rows in result set.
- * @since 5.0
- */
- public function fetch_row () {}
-
- /**
- * Set result pointer to a specified field offset
- * @link https://php.net/manual/en/mysqli-result.field-seek.php
- * @param int $fieldnr
- * The field number. This value must be in the range from
- * 0 to number of fields - 1.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function field_seek ($fieldnr) {}
-
- /**
- * Frees the memory associated with a result
- * @return void
- * @link https://php.net/manual/en/mysqli-result.free.php
- * @since 5.0
- */
- public function free_result () {}
+ /**
+ * Get result of SHOW WARNINGS
+ * @link https://php.net/manual/en/mysqli-stmt.get-warnings.php
+ * @return object|false
+ */
+ #[TentativeType]
+ public function get_warnings(): mysqli_warning|false {}
-}
+ /**
+ * Returns result set metadata from a prepared statement
+ * @link https://php.net/manual/en/mysqli-stmt.result-metadata.php
+ * @return mysqli_result|false a result object or false if an error occurred.
+ */
+ #[TentativeType]
+ public function result_metadata(): mysqli_result|false {}
-/**
- * Represents a prepared statement.
- * @link https://php.net/manual/en/class.mysqli-stmt.php
- */
-class mysqli_stmt {
- /**
- * @var int
- */
- public $affected_rows;
- /**
- * @var int
- */
- public $insert_id;
- /**
- * @var int
- */
- public $num_rows;
- /**
- * @var int
- */
- public $param_count;
- /**
- * @var int
- */
- public $field_count;
- /**
- * @var int
- */
- public $errno;
- /**
- * @var string
- */
- public $error;
- /**
- * @var array
- */
- public $error_list;
- /**
- * @var string
- */
- public $sqlstate;
- /**
- * @var string
- */
- public $id;
-
- /**
- * mysqli_stmt constructor
- * @param mysqli $link
- * @param string $query [optional]
- */
- public function __construct ($link, $query) {}
-
- /**
- * Used to get the current value of a statement attribute
- * @link https://php.net/manual/en/mysqli-stmt.attr-get.php
- * @param int $attr
- * The attribute that you want to get.
- *
- * @return int|false false if the attribute is not found, otherwise returns the value of the attribute.
- * @since 5.0
- */
- public function attr_get ($attr) {}
-
- /**
- * Used to modify the behavior of a prepared statement
- * @link https://php.net/manual/en/mysqli-stmt.attr-set.php
- * @param int $attr
- * The attribute that you want to set. It can have one of the following values:
- *
- * Attribute values
- *
- * Character
- * Description
- *
- *
- * MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
- *
- * If set to 1, causes mysqli_stmt_store_result to
- * update the metadata MYSQL_FIELD->max_length value.
- *
- *
- *
- * MYSQLI_STMT_ATTR_CURSOR_TYPE
- *
- * Type of cursor to open for statement when mysqli_stmt_execute
- * is invoked. mode can be MYSQLI_CURSOR_TYPE_NO_CURSOR
- * (the default) or MYSQLI_CURSOR_TYPE_READ_ONLY.
- *
- *
- *
- * MYSQLI_STMT_ATTR_PREFETCH_ROWS
- *
- * Number of rows to fetch from server at a time when using a cursor.
- * mode can be in the range from 1 to the maximum
- * value of unsigned long. The default is 1.
- *
- *
- *
- *
- *
- * If you use the MYSQLI_STMT_ATTR_CURSOR_TYPE option with
- * MYSQLI_CURSOR_TYPE_READ_ONLY, a cursor is opened for the
- * statement when you invoke mysqli_stmt_execute. If there
- * is already an open cursor from a previous mysqli_stmt_execute call,
- * it closes the cursor before opening a new one. mysqli_stmt_reset
- * also closes any open cursor before preparing the statement for re-execution.
- * mysqli_stmt_free_result closes any open cursor.
- *
- *
- * If you open a cursor for a prepared statement, mysqli_stmt_store_result
- * is unnecessary.
- *
- * @param int $mode The value to assign to the attribute.
- * @return bool
- * @since 5.0
- */
- public function attr_set ($attr, $mode) {}
-
- /**
- * Binds variables to a prepared statement as parameters
- * @link https://php.net/manual/en/mysqli-stmt.bind-param.php
- * @param string $types
- * A string that contains one or more characters which specify the types
- * for the corresponding bind variables:
- *
- * Type specification chars
- *
- * Character
- * Description
- *
- *
- * i
- * corresponding variable has type integer
- *
- *
- * d
- * corresponding variable has type double
- *
- *
- * s
- * corresponding variable has type string
- *
- *
- * b
- * corresponding variable is a blob and will be sent in packets
- *
- *
- *
- * @param mixed $var1
- * The number of variables and length of string
- * types must match the parameters in the statement.
- *
- * @param mixed $_ [optional]
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function bind_param ($types, &$var1, &...$_) {}
-
- /**
- * Binds variables to a prepared statement for result storage
- * @link https://php.net/manual/en/mysqli-stmt.bind-result.php
- * @param mixed $var1 The variable to be bound.
- * @param mixed ...$_ The variables to be bound.
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function bind_result (&$var1, &...$_) {}
-
- /**
- * Closes a prepared statement
- * @link https://php.net/manual/en/mysqli-stmt.close.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function close () {}
-
- /**
- * Seeks to an arbitrary row in statement result set
- * @link https://php.net/manual/en/mysqli-stmt.data-seek.php
- * @param int $offset
- * Must be between zero and the total number of rows minus one (0..
- * mysqli_stmt_num_rows - 1).
- *
- * @return void
- * @since 5.0
- */
- public function data_seek ($offset) {}
-
- /**
- * Executes a prepared Query
- * @link https://php.net/manual/en/mysqli-stmt.execute.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function execute () {}
-
- /**
- * Fetch results from a prepared statement into the bound variables
- * @link https://php.net/manual/en/mysqli-stmt.fetch.php
- * @return bool
- * @since 5.0
- */
- public function fetch () {}
-
- /**
- * Get result of SHOW WARNINGS
- * @link https://php.net/manual/en/mysqli-stmt.get-warnings.php
- * @return object
- * @since 5.1
- */
- public function get_warnings () {}
-
- /**
- * Returns result set metadata from a prepared statement
- * @link https://php.net/manual/en/mysqli-stmt.result-metadata.php
- * @return mysqli_result|false a result object or false if an error occurred.
- * @since 5.0
- */
- public function result_metadata () {}
-
- /**
- * Check if there are more query results from a multiple query
- * @link https://php.net/manual/en/mysqli-stmt.more-results.php
- * @return bool
- */
- public function more_results () {}
-
- /**
- * Reads the next result from a multiple query
- * @link https://php.net/manual/en/mysqli-stmt.next-result.php
- * @return bool
- */
- public function next_result () {}
-
- /**
- * Return the number of rows in statements result set
- * @link https://php.net/manual/en/mysqli-stmt.num-rows.php
- * @return int An integer representing the number of rows in result set.
- * @since 5.0
- */
- public function num_rows () {}
-
- /**
- * Send data in blocks
- * @link https://php.net/manual/en/mysqli-stmt.send-long-data.php
- * @param int $param_nr
- * Indicates which parameter to associate the data with. Parameters are
- * numbered beginning with 0.
- *
- * @param string $data
- * A string containing data to be sent.
- *
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function send_long_data ($param_nr, $data) {}
-
- /**
- * No documentation available
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- */
- public function stmt () {}
-
- /**
- * Frees stored result memory for the given statement handle
- * @link https://php.net/manual/en/mysqli-stmt.free-result.php
- * @return void
- * @since 5.0
- */
- public function free_result () {}
-
- /**
- * Resets a prepared statement
- * @link https://php.net/manual/en/mysqli-stmt.reset.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function reset () {}
-
- /**
- * Prepare an SQL statement for execution
- * @link https://php.net/manual/en/mysqli-stmt.prepare.php
- * @param string $query
- * The query, as a string. It must consist of a single SQL statement.
- *
- *
- * You can include one or more parameter markers in the SQL statement by
- * embedding question mark (?) characters at the
- * appropriate positions.
- *
- *
- * You should not add a terminating semicolon or \g
- * to the statement.
- *
- *
- * The markers are legal only in certain places in SQL statements.
- * For example, they are allowed in the VALUES() list of an INSERT statement
- * (to specify column values for a row), or in a comparison with a column in
- * a WHERE clause to specify a comparison value.
- *
- *
- * However, they are not allowed for identifiers (such as table or column names),
- * in the select list that names the columns to be returned by a SELECT statement),
- * or to specify both operands of a binary operator such as the =
- * equal sign. The latter restriction is necessary because it would be impossible
- * to determine the parameter type. In general, parameters are legal only in Data
- * Manipulation Language (DML) statements, and not in Data Definition Language
- * (DDL) statements.
- *
- * @return mixed true on success or false on failure.
- * @since 5.0
- */
- public function prepare ($query) {}
-
- /**
- * Transfers a result set from a prepared statement
- * @link https://php.net/manual/en/mysqli-stmt.store-result.php
- * @return bool true on success or false on failure.
- * @since 5.0
- */
- public function store_result () {}
-
- /**
- * Gets a result set from a prepared statement
- * @link https://php.net/manual/en/mysqli-stmt.get-result.php
- * @return mysqli_result|false Returns a resultset or FALSE on failure
- */
- public function get_result () {}
+ /**
+ * Check if there are more query results from a multiple query
+ * @link https://php.net/manual/en/mysqli-stmt.more-results.php
+ * @return bool
+ */
+ #[TentativeType]
+ public function more_results(): bool {}
+
+ /**
+ * Reads the next result from a multiple query
+ * @link https://php.net/manual/en/mysqli-stmt.next-result.php
+ * @return bool
+ */
+ #[TentativeType]
+ public function next_result(): bool {}
+
+ /**
+ * Return the number of rows in statements result set
+ * @link https://php.net/manual/en/mysqli-stmt.num-rows.php
+ * @return string|int An integer representing the number of rows in result set.
+ */
+ #[TentativeType]
+ public function num_rows(): string|int {}
+
+ /**
+ * Send data in blocks
+ * @link https://php.net/manual/en/mysqli-stmt.send-long-data.php
+ * @param int $param_num
+ * Indicates which parameter to associate the data with. Parameters are
+ * numbered beginning with 0.
+ *
+ * @param string $data
+ * A string containing data to be sent.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function send_long_data(int $param_num, string $data): bool {}
+
+ /**
+ * No documentation available
+ * @removed 5.4
+ */
+ #[Deprecated(since: '5.3')]
+ public function stmt() {}
+
+ /**
+ * Frees stored result memory for the given statement handle
+ * @link https://php.net/manual/en/mysqli-stmt.free-result.php
+ * @return void
+ */
+ #[TentativeType]
+ public function free_result(): void {}
+
+ /**
+ * Resets a prepared statement
+ * @link https://php.net/manual/en/mysqli-stmt.reset.php
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function reset(): bool {}
+
+ /**
+ * Prepare an SQL statement for execution
+ * @link https://php.net/manual/en/mysqli-stmt.prepare.php
+ * @param string $query
+ * The query, as a string. It must consist of a single SQL statement.
+ *
+ *
+ * The SQL statement may contain zero or more parameter markers
+ * represented by question mark (?) characters at the appropriate positions.
+ *
+ *
+ * The markers are legal only in certain places in SQL statements.
+ * For example, they are permitted in the VALUES() list of an INSERT statement
+ * (to specify column values for a row), or in a comparison with a column in
+ * a WHERE clause to specify a comparison value.
+ *
+ *
+ * However, they are not permitted for identifiers (such as table or column names),
+ * or to specify both operands of a binary operator such as the =
+ * equal sign. The latter restriction is necessary because it would be impossible
+ * to determine the parameter type. In general, parameters are legal only in Data
+ * Manipulation Language (DML) statements, and not in Data Definition Language
+ * (DDL) statements.
+ *
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function prepare(string $query): bool {}
+ /**
+ * Stores a result set in an internal buffer
+ * @link https://php.net/manual/en/mysqli-stmt.store-result.php
+ * @return bool true on success or false on failure.
+ */
+ #[TentativeType]
+ public function store_result(): bool {}
+
+ /**
+ * Gets a result set from a prepared statement as a mysqli_result object
+ * @link https://php.net/manual/en/mysqli-stmt.get-result.php
+ * @return mysqli_result|false Returns a resultset or FALSE on failure
+ */
+ #[TentativeType]
+ public function get_result(): mysqli_result|false {}
}
/**
- * (PHP 5)
* Gets the number of affected rows in a previous MySQL operation
* @link https://secure.php.net/manual/en/mysqli.affected-rows.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return int An integer greater than zero indicates the number of rows affected or retrieved.
- * Zero indicates that no records where updated for an UPDATE statement,
- * no rows matched the WHERE clause in the query or that no query has yet been executed. -1 indicates that the query returned an error.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return string|int An integer greater than zero indicates the number of rows affected or retrieved.
+ * Zero indicates that no records were updated for an UPDATE statement,
+ * no rows matched the WHERE clause in the query or that no query has yet been executed. -1 indicates that the query returned an error
+ * or that mysqli_affected_rows was called for an unbuffered SELECT query.
*/
-function mysqli_affected_rows ($link) {}
+function mysqli_affected_rows(mysqli $mysql): string|int {}
/**
* Turns on or off auto-committing database modifications
* @link https://secure.php.net/manual/en/mysqli.autocommit.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param bool $mode Whether to turn on auto-commit or not.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param bool $enable Whether to turn on auto-commit or not.
* @return bool
*/
-function mysqli_autocommit ($link, $mode) {}
+function mysqli_autocommit(mysqli $mysql, bool $enable): bool {}
/**
* Starts a transaction
* @link https://secure.php.net/manual/en/mysqli.begin-transaction.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param int $flags [optional]
- * @param string $name [optional]
+ * @param string|null $name [optional]
* @return bool true on success or false on failure.
* @since 5.5
*/
-function mysqli_begin_transaction ($link, $flags = 0, $name = null) {}
+function mysqli_begin_transaction(mysqli $mysql, int $flags = 0, ?string $name): bool {}
/**
* Changes the user of the specified database connection
* @link https://php.net/manual/en/mysqli.change-user.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $user The MySQL user name.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string $username The MySQL user name.
* @param string $password The MySQL password.
* @param string|null $database The database to change to. If desired, the NULL value may be passed resulting in only changing the user and not selecting a database.
* @return bool
*/
-function mysqli_change_user ($link, $user, $password, $database) {}
+function mysqli_change_user(mysqli $mysql, string $username, string $password, ?string $database): bool {}
/**
- * Returns the default character set for the database connection
+ * Returns the current character set of the database connection
* @link https://php.net/manual/en/mysqli.character-set-name.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return string The default character set for the current connection
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return string The current character set of the connection
*/
-function mysqli_character_set_name ($link) {}
+function mysqli_character_set_name(mysqli $mysql): string {}
/**
* Closes a previously opened database connection
* @link https://php.net/manual/en/mysqli.close.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return bool
*/
-function mysqli_close ($link) {}
+#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
+function mysqli_close(mysqli $mysql): bool {}
/**
* Commits the current transaction
* @link https://php.net/manual/en/mysqli.commit.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param int $flags [optional] A bitmask of MYSQLI_TRANS_COR_* constants
- * @param string $name [optional If provided then COMMITname is executed
+ * @param string|null $name [optional] If provided then COMMITname is executed
* @return bool
*/
-function mysqli_commit ($link, $flags = 0, $name = null) {}
+function mysqli_commit(mysqli $mysql, int $flags = 0, ?string $name = null): bool {}
/**
* Open a new connection to the MySQL server
* Alias of mysqli::__construct
* @link https://php.net/manual/en/mysqli.construct.php
- * @param string $host Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.
- * @param string $user The MySQL user name.
- * @param string $password If not provided or NULL, the MySQL server will attempt to authenticate the user against those user records which have no password only.
- * @param string $database If provided will specify the default database to be used when performing queries.
- * @param string $port Specifies the port number to attempt to connect to the MySQL server.
- * @param string $socket Specifies the socket or named pipe that should be used.
+ * @param string|null $hostname Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol.
+ * @param string|null $username The MySQL user name.
+ * @param string|null $password If not provided or NULL, the MySQL server will attempt to authenticate the user against those user records which have no password only.
+ * @param string|null $database If provided will specify the default database to be used when performing queries.
+ * @param int|null $port Specifies the port number to attempt to connect to the MySQL server.
+ * @param string|null $socket Specifies the socket or named pipe that should be used.
* @return mysqli|false object which represents the connection to a MySQL Server or false if an error occurred.
*/
-function mysqli_connect ($host = '', $user = '', $password = '', $database = '', $port = '', $socket = '') {}
+function mysqli_connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null): mysqli|false {}
/**
* Returns the error code from last connect call
* @link https://php.net/manual/en/mysqli.connect-errno.php
* @return int Last error code number from the last call to mysqli_connect(). Zero means no error occurred.
*/
-function mysqli_connect_errno () {}
+function mysqli_connect_errno(): int {}
/**
* Returns a string description of the last connect error
* @link https://php.net/manual/en/mysqli.connect-error.php
- * @return string Last error message string from the last call to mysqli_connect().
+ * @return string|null Last error message string from the last call to mysqli_connect().
*/
-function mysqli_connect_error () {}
+function mysqli_connect_error(): ?string {}
/**
* Adjusts the result pointer to an arbitrary row in the result
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
+ * @link https://php.net/manual/en/mysqli-result.data-seek.php
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
* @param int $offset
* @return bool Returns TRUE on success or FALSE on failure.
*/
-function mysqli_data_seek ($result, $offset) {}
+function mysqli_data_seek(mysqli_result $result, int $offset): bool {}
/**
* Dump debugging information into the log
* @link https://php.net/manual/en/mysqli.dump-debug-info.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return bool
*/
-function mysqli_dump_debug_info ($link) {}
+function mysqli_dump_debug_info(mysqli $mysql): bool {}
/**
* Performs debugging operations using the Fred Fish debugging library.
* @link https://php.net/manual/en/mysqli.debug.php
- * @param string $message
+ * @param string $options
* @return bool
*/
-function mysqli_debug ($message) {}
+#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
+function mysqli_debug(string $options): bool {}
/**
* Returns the error code for the most recent function call
* @link https://php.net/manual/en/mysqli.errno.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return int An error code value for the last call, if it failed. zero means no error occurred.
*/
-function mysqli_errno ($link) {}
+function mysqli_errno(mysqli $mysql): int {}
/**
* Returns a list of errors from the last command executed
- * PHP > 5.4.0
* @link https://php.net/manual/en/mysqli.error-list.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return array A list of errors, each as an associative array containing the errno, error, and sqlstate.
+ * @since 5.4
*/
-function mysqli_error_list ($link) {}
+#[ArrayShape([
+ "errno" => "int",
+ "sqlstate" => "string",
+ "error" => "string",
+])]
+function mysqli_error_list(mysqli $mysql): array {}
/**
* Returns a list of errors from the last statement executed
- * PHP > 5.4.0
* @link https://secure.php.net/manual/en/mysqli-stmt.error-list.php
- * @param mysqli_stmt $stmt A statement identifier returned by mysqli_stmt_init().
+ * @param mysqli_stmt $statement A statement identifier returned by mysqli_stmt_init().
* @return array A list of errors, each as an associative array containing the errno, error, and sqlstate.
+ * @since 5.4
*/
-function mysqli_stmt_error_list ($stmt) {}
+function mysqli_stmt_error_list(mysqli_stmt $statement): array {}
/**
* Returns a string description of the last error
* @link https://secure.php.net/manual/en/mysqli.error.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return string
*/
-function mysqli_error ($link) {}
+function mysqli_error(mysqli $mysql): string {}
/**
- * Executes a prepared Query
+ * Executes a prepared statement
* @link https://php.net/manual/en/mysqli-stmt.execute.php
- * @param mysqli_stmt $stmt
- * @return bool
+ * @param mysqli_stmt $statement
+ * @param array|null $params [optional] An optional list array with as many elements
+ * as there are bound parameters in the SQL statement being executed. Each value is treated as a string.
+ * @return bool true on success or false on failure.
*/
-function mysqli_stmt_execute ($stmt) {}
+function mysqli_stmt_execute(mysqli_stmt $statement, #[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}
/**
- * Executes a prepared Query
- * @since 5.0
+ * Executes a prepared statement
* Alias for mysqli_stmt_execute
* @link https://php.net/manual/en/function.mysqli-execute.php
- * @param mysqli_stmt $stmt
- * @deprecated
+ * @param mysqli_stmt $statement
+ * @param array|null $params [optional] An optional list array with as many elements
+ * as there are bound parameters in the SQL statement being executed. Each value is treated as a string.
+ * @return bool
+ */
+#[Deprecated(since: '5.3')]
+function mysqli_execute(mysqli_stmt $statement, #[PhpStormStubsElementAvailable('8.1')] ?array $params = null): bool {}
+
+/**
+ * @param mysqli $mysql
+ * @param string $query
+ * @param array|null $params
+ * @return mysqli_result|bool
+ * @since 8.2
*/
-function mysqli_execute ($stmt) {}
+function mysqli_execute_query(mysqli $mysql, string $query, ?array $params = null): mysqli_result|bool {}
/**
* Returns the next field in the result set
* @link https://secure.php.net/manual/en/mysqli-result.fetch-field.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
* @return object|false Returns an object which contains field definition information or FALSE if no field information is available.
*/
-function mysqli_fetch_field ($result) {}
+function mysqli_fetch_field(mysqli_result $result): object|false {}
/**
* Returns an array of objects representing the fields in a result set
* @link https://secure.php.net/manual/en/mysqli-result.fetch-fields.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @return array|false Returns an array of objects which contains field definition information or FALSE if no field information is available.
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @return array Returns an array of objects which contains field definition information.
*/
-function mysqli_fetch_fields ($result) {}
+function mysqli_fetch_fields(mysqli_result $result): array {}
/**
* Fetch meta-data for a single field
* @link https://secure.php.net/manual/en/mysqli-result.fetch-field-direct.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @param int $fieldnr The field number. This value must be in the range from 0 to number of fields - 1.
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @param int $index The field number. This value must be in the range from 0 to number of fields - 1.
* @return object|false Returns an object which contains field definition information or FALSE if no field information for specified fieldnr is available.
*/
-function mysqli_fetch_field_direct ($result, $fieldnr) {}
+function mysqli_fetch_field_direct(mysqli_result $result, int $index): object|false {}
/**
* Returns the lengths of the columns of the current row in the result set
* @link https://php.net/manual/en/mysqli-result.lengths.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @return array|false An array of integers representing the size of each column (not including any terminating null characters). FALSE if an error occurred.
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @return int[]|false An array of integers representing the size of each column (not including any terminating null characters). FALSE if an error occurred.
*/
-function mysqli_fetch_lengths ($result) {}
+function mysqli_fetch_lengths(mysqli_result $result): array|false {}
/**
- * Fetches all result rows as an associative array, a numeric array, or both.
- * Available only with mysqlnd.
+ * Fetch all result rows as an associative array, a numeric array, or both
* @link https://php.net/manual/en/mysqli-result.fetch-all.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @param int $resulttype
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @param int $mode
* @return array Returns an array of associative or numeric arrays holding result rows.
*/
-function mysqli_fetch_all ($result, $resulttype = MYSQLI_NUM) {}
+function mysqli_fetch_all(
+ mysqli_result $result,
+ #[PhpStormStubsElementAvailable(from: '7.0')] int $mode = MYSQLI_NUM
+): array {}
/**
- * Fetch a result row as an associative, a numeric array, or both.
+ * Fetch the next row of a result set as an associative, a numeric array, or both
* @link https://php.net/manual/en/mysqli-result.fetch-array.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @param int $resulttype
- * @return array|null
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @param int $mode
+ * @return array|false|null an array representing the fetched row,
+ * null if there are no more rows in the result set, or false on failure.
*/
-function mysqli_fetch_array ($result, $resulttype = MYSQLI_BOTH) {}
+function mysqli_fetch_array(mysqli_result $result, int $mode = MYSQLI_BOTH): array|false|null {}
/**
- * Fetch a result row as an associative array
+ * Fetch the next row of a result set as an associative array
* @link https://php.net/manual/en/mysqli-result.fetch-assoc.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @return string[]|null Returns an associative array of strings representing the fetched row in the result set,
- * where each key in the array represents the name of one of the result set's columns or NULL if there are no more rows in resultset.
- * If two or more columns of the result have the same field names, the last column will take precedence.
- * To access the other column(s) of the same name,
- * you either need to access the result with numeric indices by using mysqli_fetch_row() or add alias names.
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @return array|false|null an associative array representing the fetched row,
+ * where each key in the array represents the name of one of the result set's columns,
+ * null if there are no more rows in the result set, or false on failure.
*/
-function mysqli_fetch_assoc ($result) {}
+function mysqli_fetch_assoc(mysqli_result $result): array|null|false {}
/**
- * Returns the current row of a result set as an object.
+ * @template T
+ *
+ * Fetch the next row of a result set as an object
* @link https://php.net/manual/en/mysqli-result.fetch-object.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @param string $class_name The name of the class to instantiate, set the properties of and return. If not specified, a stdClass object is returned.
- * @param array|null $params An optional array of parameters to pass to the constructor for class_name objects.
- * @return object|null Returns an object with string properties that corresponds to the fetched row or NULL if there are no more rows in resultset.
- * If two or more columns of the result have the same field names, the last column will take precedence.
- * To access the other column(s) of the same name,
- * you either need to access the result with numeric indices by using mysqli_fetch_row() or add alias names.
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @param class-string $class [optional] The name of the class to instantiate, set the properties of and return. If not specified, a stdClass object is returned.
+ * @param array $constructor_args [optional] An optional array of parameters to pass to the constructor for class_name objects.
+ * @return T|stdClass|null|false an object representing the fetched row,
+ * where each property represents the name of the result set's column,
+ * null if there are no more rows in the result set, or false on failure.
*/
-function mysqli_fetch_object ($result, $class_name = 'stdClass', $params = null) {}
+function mysqli_fetch_object(mysqli_result $result, string $class = 'stdClass', array $constructor_args = []): object|null|false {}
/**
- * Get a result row as an enumerated array
+ * Fetch the next row of a result set as an enumerated array
* @link https://php.net/manual/en/mysqli-result.fetch-row.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @return array|null|false an enumerated array representing the fetched row,
+ * null if there are no more rows in the result set, or false on failure.
* @link https://php.net/manual/en/mysqli-result.fetch-row.php
- * @return array|null mysqli_fetch_row returns an array of strings that corresponds to the fetched row
- * or &null; if there are no more rows in result set.
*/
-function mysqli_fetch_row ($result) {}
+function mysqli_fetch_row(mysqli_result $result): array|false|null {}
+
+/**
+ * Fetch a single column from the next row of a result set
+ * @link https://php.net/manual/en/mysqli-result.fetch-column.php
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @param int $column [optional]
+ * 0-indexed number of the column you wish to retrieve from the row.
+ * If no value is supplied, the first column will be returned.
+ *
+ * @return string|int|float|false|null a single column from
+ * the next row of a result set or false if there are no more rows.
+ */
+#[PhpStormStubsElementAvailable('8.1')]
+function mysqli_fetch_column(mysqli_result $result, int $column = 0): string|int|float|false|null {}
/**
* Returns the number of columns for the most recent query
* @link https://php.net/manual/en/mysqli.field-count.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return int An integer representing the number of fields in a result set.
*/
-function mysqli_field_count ($link) {}
+function mysqli_field_count(mysqli $mysql): int {}
/**
* Set result pointer to a specified field offset
* @link https://php.net/manual/en/mysqli-result.field-seek.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @param int $fieldnr The field number. This value must be in the range from 0 to number of fields - 1.
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @param int $index The field number. This value must be in the range from 0 to number of fields - 1.
* @return bool
*/
-function mysqli_field_seek ($result, $fieldnr) {}
+function mysqli_field_seek(mysqli_result $result, int $index): bool {}
/**
* Get current field offset of a result pointer
* @link https://php.net/manual/en/mysqli-result.current-field.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
* @return int
*/
-function mysqli_field_tell ($result) {}
+function mysqli_field_tell(mysqli_result $result): int {}
/**
* Frees the memory associated with a result
* @link https://php.net/manual/en/mysqli-result.free.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
* @return void
*/
-function mysqli_free_result ($result) {}
+function mysqli_free_result(mysqli_result $result): void {}
/**
* Returns client Zval cache statistics
- * @since 5.3
* Available only with mysqlnd.
- * @link https://php.net/manual/en/mysqli.get-cache-stats.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @link https://php.net/manual/en/function.mysqli-get-cache-stats.php
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return array|false an array with client Zval cache stats if success, false otherwise.
+ * @removed 5.4
*/
-function mysqli_get_cache_stats ($link) {}
+function mysqli_get_cache_stats(mysqli $mysql) {}
/**
* Returns statistics about the client connection
* @link https://php.net/manual/en/mysqli.get-connection-stats.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return array|false an array with connection stats if successful, FALSE otherwise.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return array an array with connection stats.
*/
-function mysqli_get_connection_stats ($link) {}
+function mysqli_get_connection_stats(mysqli $mysql): array {}
/**
* Returns client per-process statistics
- * @since 5.3
- * @link https://php.net/manual/en/mysqli.get-client-stats.php
- * @return array|false an array with client stats if success, false otherwise.
+ * @link https://php.net/manual/en/function.mysqli-get-client-stats.php
+ * @return array an array with client stats.
*/
-function mysqli_get_client_stats () {}
+function mysqli_get_client_stats(): array {}
/**
* Returns a character set object
* @link https://php.net/manual/en/mysqli.get-charset.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return object
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return object|null
*/
-function mysqli_get_charset ($link) {}
+function mysqli_get_charset(mysqli $mysql): ?object {}
/**
* Get MySQL client info
* @link https://php.net/manual/en/mysqli.get-client-info.php
- * @return string A string that represents the MySQL client library version
+ * @param mysqli|null $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return string|null A string that represents the MySQL client library version
*/
-function mysqli_get_client_info () {}
+#[LanguageLevelTypeAware(['8.0' => 'string'], default: '?string')]
+function mysqli_get_client_info(
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.1')] mysqli $mysql,
+ #[PhpStormStubsElementAvailable(from: '8.0')] ?mysqli $mysql = null
+) {}
/**
* Returns the MySQL client version as an integer
* @link https://php.net/manual/en/mysqli.get-client-version.php
* @return int
*/
-function mysqli_get_client_version () {}
+function mysqli_get_client_version(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $link): int {}
/**
* Returns a string representing the type of connection used
* @link https://php.net/manual/en/mysqli.get-host-info.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return string A character string representing the server hostname and the connection type.
*/
-function mysqli_get_host_info ($link) {}
+function mysqli_get_host_info(mysqli $mysql): string {}
/**
* Return information about open and cached links
+ * @link https://php.net/manual/en/function.mysqli-get-links-stats.php
* @return array mysqli_get_links_stats() returns an associative array with three elements, keyed as follows:
- *
*
* -
*
total
* -
- *
*
* An integer indicating the total number of open links in
* any state.
@@ -1886,9 +2108,7 @@ function mysqli_get_host_info ($link) {}
*
*
-
*
active_plinks
- *
* -
- *
*
* An integer representing the number of active persistent
* connections.
@@ -1896,10 +2116,8 @@ function mysqli_get_host_info ($link) {}
*
*
* -
- *
cached_plinks
- *
+ * cached_plinks
* -
- *
*
* An integer representing the number of inactive persistent
* connections.
@@ -1907,181 +2125,189 @@ function mysqli_get_host_info ($link) {}
*
*
*
- *
+ * @since 5.6
*/
-function mysqli_get_links_stats() {}
+#[ArrayShape(["total" => "int", "active_plinks" => "int", "cached_plinks" => "int"])]
+function mysqli_get_links_stats(): array {}
/**
* Returns the version of the MySQL protocol used
* @link https://php.net/manual/en/mysqli.get-proto-info.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return int Returns an integer representing the protocol version
*/
-function mysqli_get_proto_info ($link) {}
+function mysqli_get_proto_info(mysqli $mysql): int {}
/**
* Returns the version of the MySQL server
* @link https://php.net/manual/en/mysqli.get-server-info.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return string A character string representing the server version.
*/
-function mysqli_get_server_info ($link) {}
+function mysqli_get_server_info(mysqli $mysql): string {}
/**
* Returns the version of the MySQL server as an integer
* @link https://php.net/manual/en/mysqli.get-server-version.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return int An integer representing the server version.
* The form of this version number is main_version * 10000 + minor_version * 100 + sub_version (i.e. version 4.1.0 is 40100).
*/
-function mysqli_get_server_version ($link) {}
+function mysqli_get_server_version(mysqli $mysql): int {}
/**
* Get result of SHOW WARNINGS
* @link https://php.net/manual/en/mysqli.get-warnings.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return mysqli_warning
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return mysqli_warning|false
*/
-function mysqli_get_warnings ($link) {}
+function mysqli_get_warnings(mysqli $mysql): mysqli_warning|false {}
/**
* Initializes MySQLi and returns a resource for use with mysqli_real_connect()
* @link https://php.net/manual/en/mysqli.init.php
- * @return mysqli
+ * @return mysqli|false
* @see mysqli_real_connect()
*/
-function mysqli_init () {}
+function mysqli_init(): mysqli|false {}
/**
* Retrieves information about the most recently executed query
* @link https://php.net/manual/en/mysqli.info.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return string A character string representing additional information about the most recently executed query.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return string|null A character string representing additional information about the most recently executed query.
*/
-function mysqli_info ($link) {}
+function mysqli_info(mysqli $mysql): ?string {}
/**
- * Returns the auto generated id used in the last query
+ * Returns the value generated for an AUTO_INCREMENT column by the last query
* @link https://php.net/manual/en/mysqli.insert-id.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return int|string The value of the AUTO_INCREMENT field that was updated by the previous query. Returns zero if there was no previous query on the connection or if the query did not update an AUTO_INCREMENT value.
- * If the number is greater than maximal int value, mysqli_insert_id() will return a string.
+ * If the number is greater than the maximum int value, it will be returned as a string.
*/
-function mysqli_insert_id ($link) {}
+function mysqli_insert_id(mysqli $mysql): string|int {}
/**
* Asks the server to kill a MySQL thread
* @link https://php.net/manual/en/mysqli.kill.php
* @see mysqli_thread_id()
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param int $processid
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param int $process_id
* @return bool
*/
-function mysqli_kill ($link, $processid) {}
+function mysqli_kill(mysqli $mysql, int $process_id): bool {}
/**
* Unsets user defined handler for load local infile command
* @link https://php.net/manual/en/mysqli.set-local-infile-default.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return void
+ * @removed 5.5
*/
-function mysqli_set_local_infile_default ($link) {}
+function mysqli_set_local_infile_default(mysqli $mysql) {}
/**
* Set callback function for LOAD DATA LOCAL INFILE command
* @link https://php.net/manual/en/mysqli.set-local-infile-handler.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param callable $read_func
* @return bool
+ * @removed 5.5
*/
-function mysqli_set_local_infile_handler ($link, $read_func) {}
+function mysqli_set_local_infile_handler(mysqli $mysql, callable $read_func): bool {}
/**
* Check if there are any more query results from a multi query
* @link https://php.net/manual/en/mysqli.more-results.php
* @see mysqli_multi_query()
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return bool
*/
-function mysqli_more_results ($link) {}
+function mysqli_more_results(mysqli $mysql): bool {}
/**
- * Performs a query on the database
+ * Performs one or more queries on the database
* @link https://php.net/manual/en/mysqli.multi-query.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $query One or more queries which are separated by semicolons.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string $query A string containing the queries to be executed. Multiple queries must be separated by a semicolon.
* @return bool Returns FALSE if the first statement failed. To retrieve subsequent errors from other statements you have to call mysqli_next_result() first.
*/
-function mysqli_multi_query ($link, $query) {}
+function mysqli_multi_query(
+ mysqli $mysql,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] string $query,
+ #[PhpStormStubsElementAvailable(from: '7.1', to: '7.4')] string $query = null,
+ #[PhpStormStubsElementAvailable(from: '8.0')] string $query
+): bool {}
/**
* Prepare next result from multi_query
* @link https://php.net/manual/en/mysqli.next-result.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return bool
*/
-function mysqli_next_result ($link) {}
+function mysqli_next_result(mysqli $mysql): bool {}
/**
- * Get the number of fields in a result
+ * Gets the number of fields in the result set
* @link https://php.net/manual/en/mysqli-result.field-count.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
* @return int
*/
-function mysqli_num_fields ($result) {}
+function mysqli_num_fields(mysqli_result $result): int {}
/**
* Gets the number of rows in a result
* @link https://php.net/manual/en/mysqli-result.num-rows.php
- * @param mysqli_result $result A result set identifier returned by mysqli_query(),
- * mysqli_store_result() or mysqli_use_result().
- * @return int Returns number of rows in the result set.
+ * @param mysqli_result $result A mysqli_result object returned by mysqli_query(),
+ * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result().
+ * @return string|int Returns number of rows in the result set.
*/
-function mysqli_num_rows ($result) {}
+function mysqli_num_rows(mysqli_result $result): string|int {}
/**
* Set options
* @link https://php.net/manual/en/mysqli.options.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param int $option
- * @param mixed $value
+ * @param string|int $value
* @return bool
*/
-function mysqli_options ($link, $option, $value) {}
+function mysqli_options(mysqli $mysql, int $option, $value): bool {}
/**
* Pings a server connection, or tries to reconnect if the connection has gone down
* @link https://php.net/manual/en/mysqli.ping.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return bool
*/
-function mysqli_ping ($link) {}
+function mysqli_ping(mysqli $mysql): bool {}
/**
* Poll connections
* @link https://php.net/manual/en/mysqli.poll.php
- * @param array $read
- * @param array $error
- * @param array $reject
- * @param int $sec
- * @param int $usec
+ * @param array|null &$read
+ * @param array|null &$error
+ * @param array &$reject
+ * @param int $seconds
+ * @param int $microseconds [optional]
* @return int|false number of ready connections upon success, FALSE otherwise.
*/
-function mysqli_poll (array &$read = null, array &$error = null, &$reject = null, $sec, $usec = 0) {}
+function mysqli_poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false {}
/**
- * Prepare an SQL statement for execution
+ * Prepares an SQL statement for execution
* @link https://php.net/manual/en/mysqli.prepare.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $query
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string $query The query, as a string. It must consist of a single SQL statement.
+ * The SQL statement may contain zero or more parameter markers represented by question mark (?) characters at the appropriate positions.
* @return mysqli_stmt|false A statement object or FALSE if an error occurred.
*/
-function mysqli_prepare ($link, $query) {}
+function mysqli_prepare(mysqli $mysql, string $query): mysqli_stmt|false {}
/**
* Enables or disables internal report functions
- * @since 5.0
* @link https://php.net/manual/en/function.mysqli-report.php
* @param int $flags
*
@@ -2117,188 +2343,197 @@ function mysqli_prepare ($link, $query) {}
*
* @return bool
*/
-function mysqli_report ($flags) {}
+function mysqli_report(int $flags): bool {}
/**
* Performs a query on the database
* @link https://php.net/manual/en/mysqli.query.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param string $query An SQL query
- * @param int $resultmode
+ * @param int $result_mode
* @return mysqli_result|bool
* For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries, mysqli_query() will return a mysqli_result object.
* For other successful queries mysqli_query() will return TRUE.
* Returns FALSE on failure.
*/
-function mysqli_query ($link, $query, $resultmode = MYSQLI_STORE_RESULT) {}
+function mysqli_query(
+ mysqli $mysql,
+ string $query,
+ #[PhpStormStubsElementAvailable(from: '7.1')] int $result_mode = MYSQLI_STORE_RESULT
+): mysqli_result|bool {}
/**
* Opens a connection to a mysql server
* @link https://php.net/manual/en/mysqli.real-connect.php
* @see mysqli_connect()
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $host
- * @param string $user
- * @param string $password
- * @param string $database
- * @param string $port
- * @param string $socket
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string|null $hostname [optional]
+ * @param string|null $username [optional]
+ * @param string|null $password [optional]
+ * @param string|null $database [optional]
+ * @param int|null $port [optional]
+ * @param string|null $socket [optional]
* @param int $flags
* @return bool
*/
-function mysqli_real_connect ($link, $host = '', $user = '', $password = '', $database = '', $port = '', $socket = '', $flags = null) {}
+function mysqli_real_connect(mysqli $mysql, ?string $hostname, ?string $username, ?string $password, ?string $database, ?int $port, ?string $socket, int $flags = 0): bool {}
/**
* Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
* @link https://php.net/manual/en/mysqli.real-escape-string.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $escapestr The string to be escaped. Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string $string The string to be escaped. Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
* @return string
*/
-function mysqli_real_escape_string ($link, $escapestr) {}
+function mysqli_real_escape_string(mysqli $mysql, string $string): string {}
/**
* Execute an SQL query
* @link https://php.net/manual/en/mysqli.real-query.php
- * @see mysqli_field_count()
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param string $query
* @return bool
*/
-function mysqli_real_query ($link, $query) {}
+function mysqli_real_query(
+ mysqli $mysql,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] string $query,
+ #[PhpStormStubsElementAvailable(from: '7.1', to: '7.4')] string $query = null,
+ #[PhpStormStubsElementAvailable(from: '8.0')] string $query
+): bool {}
/**
* Get result from async query
* Available only with mysqlnd.
* @link https://php.net/manual/en/mysqli.reap-async-query.php
* @see mysqli_poll()
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return mysqli_result|false mysqli_result in success, FALSE otherwise.
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return mysqli_result|bool mysqli_result in success, FALSE otherwise.
*/
-function mysqli_reap_async_query ($link) {}
+function mysqli_reap_async_query(mysqli $mysql): mysqli_result|bool {}
/**
- * Set a named transaction savepoint
+ * Removes the named savepoint from the set of savepoints of the current transaction
* @link https://secure.php.net/manual/en/mysqli.release-savepoint.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param string $name
* @return bool Returns TRUE on success or FALSE on failure.
* @since 5.5
*/
-function mysqli_release_savepoint ($link ,$name) {}
+function mysqli_release_savepoint(mysqli $mysql, string $name): bool {}
/**
* Rolls back current transaction
* @link https://php.net/manual/en/mysqli.rollback.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param int $flags [optional] A bitmask of MYSQLI_TRANS_COR_* constants
- * @param string $name [optional] If provided then ROLLBACKname is executed
+ * @param string|null $name [optional] If provided then ROLLBACKname is executed
* @return bool
*/
-function mysqli_rollback ($link, $flags = 0, $name = null) {}
+function mysqli_rollback(mysqli $mysql, int $flags = 0, ?string $name): bool {}
/**
* Set a named transaction savepoint
* @link https://secure.php.net/manual/en/mysqli.savepoint.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param string $name
* @return bool Returns TRUE on success or FALSE on failure.
* @since 5.5
*/
-function mysqli_savepoint ($link ,$name) {}
+function mysqli_savepoint(mysqli $mysql, string $name): bool {}
/**
* Selects the default database for database queries
* @link https://php.net/manual/en/mysqli.select-db.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $dbname
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string $database
* @return bool
*/
-function mysqli_select_db ($link, $dbname) {}
+function mysqli_select_db(mysqli $mysql, string $database): bool {}
/**
- * Sets the default client character set
+ * Sets the client character set
* @link https://php.net/manual/en/mysqli.set-charset.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param string $charset
* @return bool
*/
-function mysqli_set_charset ($link, $charset) {}
+function mysqli_set_charset(mysqli $mysql, string $charset): bool {}
/**
- * Returns the total number of rows changed, deleted, or inserted by the last executed statement
+ * Returns the total number of rows changed, deleted, inserted, or matched by the last statement executed
* @link https://php.net/manual/en/mysqli-stmt.affected-rows.php
- * @param mysqli_stmt $stmt
- * @return int|string If the number of affected rows is greater than maximal PHP int value, the number of affected rows will be returned as a string value.
+ * @param mysqli_stmt $statement
+ * @return int|string If the number of affected rows is greater than maximum PHP int value, the number of affected rows will be returned as a string value.
*/
-function mysqli_stmt_affected_rows ($stmt) {}
+function mysqli_stmt_affected_rows(mysqli_stmt $statement): string|int {}
/**
- * Get the current value of a statement attribute
+ * Used to get the current value of a statement attribute
* @link https://php.net/manual/en/mysqli-stmt.attr-get.php
- * @param mysqli_stmt $stmt
- * @param int $attr
+ * @param mysqli_stmt $statement
+ * @param int $attribute
* @return int|false Returns FALSE if the attribute is not found, otherwise returns the value of the attribute.
*/
-function mysqli_stmt_attr_get ($stmt, $attr) {}
+#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
+function mysqli_stmt_attr_get(mysqli_stmt $statement, int $attribute): false|int {}
/**
- * Modify the behavior of a prepared statement
+ * Used to modify the behavior of a prepared statement
* @link https://php.net/manual/en/mysqli-stmt.attr-set.php
- * @param mysqli_stmt $stmt
- * @param int $attr
- * @param int $mode
+ * @param mysqli_stmt $statement
+ * @param int $attribute
+ * @param int $value
* @return bool
*/
-function mysqli_stmt_attr_set ($stmt, $attr, $mode) {}
+function mysqli_stmt_attr_set(mysqli_stmt $statement, int $attribute, int $value): bool {}
/**
* Returns the number of fields in the given statement
* @link https://php.net/manual/en/mysqli-stmt.field-count.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return int
*/
-function mysqli_stmt_field_count ($stmt) {}
+function mysqli_stmt_field_count(mysqli_stmt $statement): int {}
/**
* Initializes a statement and returns an object for use with mysqli_stmt_prepare
* @link https://php.net/manual/en/mysqli.stmt-init.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @return mysqli_stmt
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @return mysqli_stmt|false
*/
-function mysqli_stmt_init ($link) {}
+function mysqli_stmt_init(mysqli $mysql): mysqli_stmt|false {}
/**
- * Prepare an SQL statement for execution
+ * Prepares an SQL statement for execution
* @link https://php.net/manual/en/mysqli-stmt.prepare.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @param string $query
* @return bool
*/
-function mysqli_stmt_prepare ($stmt, $query) {}
+function mysqli_stmt_prepare(mysqli_stmt $statement, string $query): bool {}
/**
* Returns result set metadata from a prepared statement
* @link https://php.net/manual/en/mysqli-stmt.result-metadata.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return mysqli_result|false Returns a result object or FALSE if an error occurred
*/
-function mysqli_stmt_result_metadata ($stmt) {}
+function mysqli_stmt_result_metadata(mysqli_stmt $statement): mysqli_result|false {}
/**
* Send data in blocks
* @link https://php.net/manual/en/mysqli-stmt.send-long-data.php
- * @param mysqli_stmt $stmt
- * @param int $param_nr
+ * @param mysqli_stmt $statement
+ * @param int $param_num
* @param string $data
* @return bool
*/
-function mysqli_stmt_send_long_data ($stmt, $param_nr, $data) {}
+function mysqli_stmt_send_long_data(mysqli_stmt $statement, int $param_num, string $data): bool {}
/**
* Binds variables to a prepared statement as parameters
* @link https://php.net/manual/en/mysqli-stmt.bind-param.php
- * @param mysqli_stmt $stmt A statement identifier returned by mysqli_stmt_init()
+ * @param mysqli_stmt $statement A statement identifier returned by mysqli_stmt_init()
* @param string $types
* A string that contains one or more characters which specify the types
* for the corresponding bind variables:
@@ -2326,327 +2561,350 @@ function mysqli_stmt_send_long_data ($stmt, $param_nr, $data) {}
*
*
*
- * @param mixed $var1
+ * @param mixed &$var1
* The number of variables and length of string
* types must match the parameters in the statement.
*
- * @param mixed $_ [optional]
+ * @param mixed &...$vars
* @return bool true on success or false on failure.
*/
-function mysqli_stmt_bind_param ($stmt, $types, &$var1, &...$_) {}
+function mysqli_stmt_bind_param(
+ mysqli_stmt $statement,
+ string $types,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed &$vars,
+ mixed &...$vars
+): bool {}
/**
* Binds variables to a prepared statement for result storage
* @link https://php.net/manual/en/mysqli-stmt.bind-result.php
- * @param mysqli_stmt $stmt Statement
- * @param mixed $var1 The variable to be bound.
- * @param mixed ...$_ The variables to be bound.
+ * @param mysqli_stmt $statement Statement
+ * @param mixed &...$vars The variables to be bound.
* @return bool
*/
-function mysqli_stmt_bind_result ($stmt, &$var1, &...$_) {}
+function mysqli_stmt_bind_result(
+ mysqli_stmt $statement,
+ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] mixed &$vars,
+ mixed &...$vars
+): bool {}
/**
* Fetch results from a prepared statement into the bound variables
* @link https://php.net/manual/en/mysqli-stmt.fetch.php
- * @param mysqli_stmt $stmt
- * @return bool
+ * @param mysqli_stmt $statement
+ * @return bool|null
*/
-function mysqli_stmt_fetch ($stmt) {}
+function mysqli_stmt_fetch(mysqli_stmt $statement): ?bool {}
/**
* Frees stored result memory for the given statement handle
* @link https://php.net/manual/en/mysqli-stmt.free-result.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return void
*/
-function mysqli_stmt_free_result ($stmt) {}
+function mysqli_stmt_free_result(mysqli_stmt $statement): void {}
/**
- * Gets a result set from a prepared statement
+ * Gets a result set from a prepared statement as a mysqli_result object
* @link https://php.net/manual/en/mysqli-stmt.get-result.php
- * @param mysqli_stmt $stmt
- * @return mysqli_result|false Returns a resultset or FALSE on failure.
+ * @param mysqli_stmt $statement
+ * @return mysqli_result|false Returns false on failure. For successful queries which produce a result set,
+ * such as SELECT, SHOW, DESCRIBE or EXPLAIN, mysqli_stmt_get_result() will return a mysqli_result object.
+ * For other successful queries, mysqli_stmt_get_result() will return false.
*/
-function mysqli_stmt_get_result ($stmt) {}
+function mysqli_stmt_get_result(mysqli_stmt $statement): mysqli_result|false {}
/**
* Get result of SHOW WARNINGS
* @link https://php.net/manual/en/mysqli-stmt.get-warnings.php
- * @param mysqli_stmt $stmt
- * @return object (not documented, but it's probably a mysqli_warning object)
+ * @param mysqli_stmt $statement
+ * @return mysqli_warning|false (not documented, but it's probably a mysqli_warning object)
*/
-function mysqli_stmt_get_warnings ($stmt) {}
+function mysqli_stmt_get_warnings(mysqli_stmt $statement): mysqli_warning|false {}
/**
* Get the ID generated from the previous INSERT operation
* @link https://php.net/manual/en/mysqli-stmt.insert-id.php
- * @param mysqli_stmt $stmt
- * @return mixed
+ * @param mysqli_stmt $statement
+ * @return string|int
*/
-function mysqli_stmt_insert_id ($stmt) {}
+function mysqli_stmt_insert_id(mysqli_stmt $statement): string|int {}
/**
* Resets a prepared statement
* @link https://php.net/manual/en/mysqli-stmt.reset.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return bool
*/
-function mysqli_stmt_reset ($stmt) {}
+function mysqli_stmt_reset(mysqli_stmt $statement): bool {}
/**
* Returns the number of parameter for the given statement
* @link https://php.net/manual/en/mysqli-stmt.param-count.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return int
*/
-function mysqli_stmt_param_count ($stmt) {}
+function mysqli_stmt_param_count(mysqli_stmt $statement): int {}
/**
* Returns the SQLSTATE error from previous MySQL operation
* @link https://php.net/manual/en/mysqli.sqlstate.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return string Returns a string containing the SQLSTATE error code for the last error. The error code consists of five characters. '00000' means no error.
*/
-function mysqli_sqlstate ($link) {}
+function mysqli_sqlstate(mysqli $mysql): string {}
/**
* Gets the current system status
* @link https://php.net/manual/en/mysqli.stat.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return string|false A string describing the server status. FALSE if an error occurred.
*/
-function mysqli_stat ($link) {}
+function mysqli_stat(mysqli $mysql): string|false {}
/**
* Used for establishing secure connections using SSL
* @link https://secure.php.net/manual/en/mysqli.ssl-set.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $key The path name to the key file
- * @param string $cert The path name to the certificate file
- * @param string $ca The path name to the certificate authority file
- * @param string $capath The pathname to a directory that contains trusted SSL CA certificates in PEM format
- * @param string $cipher A list of allowable ciphers to use for SSL encryption
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string|null $key The path name to the key file
+ * @param string|null $certificate The path name to the certificate file
+ * @param string|null $ca_certificate The path name to the certificate authority file
+ * @param string|null $ca_path The pathname to a directory that contains trusted SSL CA certificates in PEM format
+ * @param string|null $cipher_algos A list of allowable ciphers to use for SSL encryption
* @return bool This function always returns TRUE value.
- * @since 5.0
*/
-function mysqli_ssl_set($link, $key , $cert , $ca , $capath , $cipher) {}
+#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
+function mysqli_ssl_set(
+ mysqli $mysql,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $key,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $certificate,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $ca_certificate,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $ca_path,
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $cipher_algos
+): bool {}
/**
* Closes a prepared statement
* @link https://php.net/manual/en/mysqli-stmt.close.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return bool
*/
-function mysqli_stmt_close ($stmt) {}
+#[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')]
+function mysqli_stmt_close(mysqli_stmt $statement): bool {}
/**
* Seeks to an arbitrary row in statement result set
* @link https://php.net/manual/en/mysqli-stmt.data-seek.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @param int $offset
* @return void
*/
-function mysqli_stmt_data_seek ($stmt, $offset) {}
+function mysqli_stmt_data_seek(mysqli_stmt $statement, int $offset): void {}
/**
* Returns the error code for the most recent statement call
* @link https://php.net/manual/en/mysqli-stmt.errno.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return int
*/
-function mysqli_stmt_errno ($stmt) {}
+function mysqli_stmt_errno(mysqli_stmt $statement): int {}
/**
* Returns a string description for last statement error
* @link https://php.net/manual/en/mysqli-stmt.error.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return string
*/
-function mysqli_stmt_error ($stmt) {}
+function mysqli_stmt_error(mysqli_stmt $statement): string {}
/**
* Check if there are more query results from a multiple query
* @link https://php.net/manual/en/mysqli-stmt.more-results.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return bool
*/
-function mysqli_stmt_more_results ($stmt) {}
+function mysqli_stmt_more_results(mysqli_stmt $statement): bool {}
/**
* Reads the next result from a multiple query
* @link https://php.net/manual/en/mysqli-stmt.next-result.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return bool
*/
-function mysqli_stmt_next_result ($stmt) {}
+function mysqli_stmt_next_result(mysqli_stmt $statement): bool {}
/**
* Return the number of rows in statements result set
* @link https://php.net/manual/en/mysqli-stmt.num-rows.php
- * @param mysqli_stmt $stmt
- * @return int
+ * @param mysqli_stmt $statement
+ * @return string|int
*/
-function mysqli_stmt_num_rows ($stmt) {}
+function mysqli_stmt_num_rows(mysqli_stmt $statement): string|int {}
/**
* Returns SQLSTATE error from previous statement operation
* @link https://php.net/manual/en/mysqli-stmt.sqlstate.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return string Returns a string containing the SQLSTATE error code for the last error. The error code consists of five characters. '00000' means no error.
*/
-function mysqli_stmt_sqlstate ($stmt) {}
+function mysqli_stmt_sqlstate(mysqli_stmt $statement): string {}
/**
* Transfers a result set from a prepared statement
* @link https://php.net/manual/en/mysqli-stmt.store-result.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return bool
*/
-function mysqli_stmt_store_result ($stmt) {}
+function mysqli_stmt_store_result(mysqli_stmt $statement): bool {}
/**
* Transfers a result set from the last query
* @link https://php.net/manual/en/mysqli.store-result.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param int $option [optional] The option that you want to set
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param int $mode [optional] The option that you want to set
* @return mysqli_result|false
*/
-function mysqli_store_result ($link, int $option) {}
+function mysqli_store_result(mysqli $mysql, int $mode = 0): mysqli_result|false {}
/**
* Returns the thread ID for the current connection
* @link https://php.net/manual/en/mysqli.thread-id.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return int Returns the Thread ID for the current connection.
*/
-function mysqli_thread_id ($link) {}
+function mysqli_thread_id(mysqli $mysql): int {}
/**
* Returns whether thread safety is given or not
* @link https://php.net/manual/en/mysqli.thread-safe.php
* @return bool
*/
-function mysqli_thread_safe () {}
+function mysqli_thread_safe(): bool {}
/**
* Initiate a result set retrieval
* @link https://php.net/manual/en/mysqli.use-result.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return mysqli_result|false
*/
-function mysqli_use_result ($link) {}
+function mysqli_use_result(mysqli $mysql): mysqli_result|false {}
/**
* Returns the number of warnings from the last query for the given link
* @link https://php.net/manual/en/mysqli.warning-count.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return int
*/
-function mysqli_warning_count ($link) {}
+function mysqli_warning_count(mysqli $mysql): int {}
/**
* Flushes tables or caches, or resets the replication server information
* @link https://php.net/manual/en/mysqli.refresh.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param int $options
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param int $flags
* @return bool
*/
-function mysqli_refresh ($link, $options) {}
+function mysqli_refresh(mysqli $mysql, int $flags): bool {}
/**
* Alias for mysqli_stmt_bind_param
* @link https://php.net/manual/en/function.mysqli-bind-param.php
- * @param mysqli_stmt $stmt
- * @param $types
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- * @since 5.0
+ * @param mysqli_stmt $statement
+ * @param string $types
+ * @removed 5.4
*/
-function mysqli_bind_param ($stmt, $types) {}
+#[Deprecated(since: '5.3')]
+function mysqli_bind_param(mysqli_stmt $statement, string $types) {}
/**
* Alias for mysqli_stmt_bind_result
* @link https://php.net/manual/en/function.mysqli-bind-result.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @param string $types
- * @param mixed $var1
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- * @since 5.0
+ * @param mixed &$var1
+ * @removed 5.4
*/
-function mysqli_bind_result ($stmt, $types, &$var1) {}
+#[Deprecated(since: '5.3')]
+function mysqli_bind_result(mysqli_stmt $statement, string $types, mixed &$var1) {}
/**
* Alias of mysqli_character_set_name
* @link https://php.net/manual/en/function.mysqli-client-encoding.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @return string
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- * @since 5.0
+ * @removed 5.4
*/
-function mysqli_client_encoding ($link) {}
+#[Deprecated(since: '5.3')]
+function mysqli_client_encoding(mysqli $mysql): string {}
/**
* Alias of mysqli_real_escape_string
* @link https://php.net/manual/en/function.mysqli-escape-string.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
- * @param string $escapestr The string to be escaped
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param string $string The string to be escaped
* @return string
- * @since 5.0
*/
-function mysqli_escape_string ($link, $escapestr) {}
+function mysqli_escape_string(
+ mysqli $mysql,
+ string $string,
+ #[PhpStormStubsElementAvailable(from: '7.1', to: '7.4')] $resultmode = null
+): string {}
/**
* Alias for mysqli_stmt_fetch
* @link https://php.net/manual/en/function.mysqli-fetch.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return bool
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- * @since 5.0
+ * @removed 5.4
*/
-function mysqli_fetch ($stmt) {}
+#[Deprecated(since: '5.3')]
+function mysqli_fetch(mysqli_stmt $statement): bool {}
/**
* Alias for mysqli_stmt_param_count
* @link https://php.net/manual/en/function.mysqli-param-count.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return int
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- * @since 5.0
+ * @removed 5.4
*/
-function mysqli_param_count ($stmt) {}
+#[Deprecated(since: '5.3')]
+function mysqli_param_count(mysqli_stmt $statement): int {}
/**
* Alias for mysqli_stmt_result_metadata
* @link https://php.net/manual/en/function.mysqli-get-metadata.php
- * @param mysqli_stmt $stmt
+ * @param mysqli_stmt $statement
* @return mysqli_result|false Returns a result object or FALSE if an error occurred
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- * @since 5.0
+ * @removed 5.4
*/
-function mysqli_get_metadata ($stmt) {}
+#[Deprecated(since: '5.3')]
+function mysqli_get_metadata(mysqli_stmt $statement): false|mysqli_result {}
/**
* Alias for mysqli_stmt_send_long_data
* @link https://php.net/manual/en/function.mysqli-send-long-data.php
- * @param mysqli_stmt $stmt
- * @param int $param_nr
+ * @param mysqli_stmt $statement
+ * @param int $param_num
* @param string $data
* @return bool
- * @deprecated 5.3 This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
- * @since 5.0
+ * @removed 5.4
*/
-function mysqli_send_long_data ($stmt, $param_nr, $data) {}
+#[Deprecated(since: '5.3')]
+function mysqli_send_long_data(mysqli_stmt $statement, int $param_num, string $data): bool {}
/**
* Alias of mysqli_options
* @link https://php.net/manual/en/function.mysqli-set-opt.php
- * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
+ * @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param int $option
- * @param mixed $value
+ * @param string|int $value
* @return bool
- * @since 5.0
*/
-function mysqli_set_opt ($link, $option, $value) {}
-
+function mysqli_set_opt(
+ #[PhpStormStubsElementAvailable(from: '8.0')] mysqli $mysql,
+ #[PhpStormStubsElementAvailable(from: '8.0')] int $option,
+ #[PhpStormStubsElementAvailable(from: '8.0')] $value
+): bool {}
/**
*
@@ -2655,7 +2913,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_READ_DEFAULT_GROUP', 5);
+define('MYSQLI_READ_DEFAULT_GROUP', 5);
/**
*
@@ -2663,7 +2921,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_READ_DEFAULT_FILE', 4);
+define('MYSQLI_READ_DEFAULT_FILE', 4);
/**
*
@@ -2671,7 +2929,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_OPT_CONNECT_TIMEOUT', 0);
+define('MYSQLI_OPT_CONNECT_TIMEOUT', 0);
/**
*
@@ -2679,7 +2937,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_OPT_LOCAL_INFILE', 8);
+define('MYSQLI_OPT_LOCAL_INFILE', 8);
/**
*
@@ -2687,7 +2945,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_SERVER_PUBLIC_KEY', 35);
+define('MYSQLI_SERVER_PUBLIC_KEY', 35);
/**
*
@@ -2695,10 +2953,10 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_INIT_COMMAND', 3);
-define ('MYSQLI_OPT_NET_CMD_BUFFER_SIZE', 202);
-define ('MYSQLI_OPT_NET_READ_BUFFER_SIZE', 203);
-define ('MYSQLI_OPT_INT_AND_FLOAT_NATIVE', 201);
+define('MYSQLI_INIT_COMMAND', 3);
+define('MYSQLI_OPT_NET_CMD_BUFFER_SIZE', 202);
+define('MYSQLI_OPT_NET_READ_BUFFER_SIZE', 203);
+define('MYSQLI_OPT_INT_AND_FLOAT_NATIVE', 201);
/**
*
@@ -2707,7 +2965,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CLIENT_SSL', 2048);
+define('MYSQLI_CLIENT_SSL', 2048);
/**
*
@@ -2715,7 +2973,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CLIENT_COMPRESS', 32);
+define('MYSQLI_CLIENT_COMPRESS', 32);
/**
*
@@ -2727,7 +2985,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CLIENT_INTERACTIVE', 1024);
+define('MYSQLI_CLIENT_INTERACTIVE', 1024);
/**
*
@@ -2735,7 +2993,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CLIENT_IGNORE_SPACE', 256);
+define('MYSQLI_CLIENT_IGNORE_SPACE', 256);
/**
*
@@ -2743,8 +3001,8 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CLIENT_NO_SCHEMA', 16);
-define ('MYSQLI_CLIENT_FOUND_ROWS', 2);
+define('MYSQLI_CLIENT_NO_SCHEMA', 16);
+define('MYSQLI_CLIENT_FOUND_ROWS', 2);
/**
*
@@ -2752,7 +3010,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_STORE_RESULT', 0);
+define('MYSQLI_STORE_RESULT', 0);
/**
*
@@ -2760,8 +3018,8 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_USE_RESULT', 1);
-define ('MYSQLI_ASYNC', 8);
+define('MYSQLI_USE_RESULT', 1);
+define('MYSQLI_ASYNC', 8);
/**
*
@@ -2769,7 +3027,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_ASSOC', 1);
+define('MYSQLI_ASSOC', 1);
/**
*
@@ -2777,7 +3035,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_NUM', 2);
+define('MYSQLI_NUM', 2);
/**
*
@@ -2785,56 +3043,42 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_BOTH', 3);
+define('MYSQLI_BOTH', 3);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH', 0);
+define('MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH', 0);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_STMT_ATTR_CURSOR_TYPE', 1);
+define('MYSQLI_STMT_ATTR_CURSOR_TYPE', 1);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CURSOR_TYPE_NO_CURSOR', 0);
+define('MYSQLI_CURSOR_TYPE_NO_CURSOR', 0);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CURSOR_TYPE_READ_ONLY', 1);
+define('MYSQLI_CURSOR_TYPE_READ_ONLY', 1);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CURSOR_TYPE_FOR_UPDATE', 2);
+define('MYSQLI_CURSOR_TYPE_FOR_UPDATE', 2);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_CURSOR_TYPE_SCROLLABLE', 4);
+define('MYSQLI_CURSOR_TYPE_SCROLLABLE', 4);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_STMT_ATTR_PREFETCH_ROWS', 2);
+define('MYSQLI_STMT_ATTR_PREFETCH_ROWS', 2);
/**
*
@@ -2842,7 +3086,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_NOT_NULL_FLAG', 1);
+define('MYSQLI_NOT_NULL_FLAG', 1);
/**
*
@@ -2850,7 +3094,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_PRI_KEY_FLAG', 2);
+define('MYSQLI_PRI_KEY_FLAG', 2);
/**
*
@@ -2858,7 +3102,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_UNIQUE_KEY_FLAG', 4);
+define('MYSQLI_UNIQUE_KEY_FLAG', 4);
/**
*
@@ -2866,7 +3110,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_MULTIPLE_KEY_FLAG', 8);
+define('MYSQLI_MULTIPLE_KEY_FLAG', 8);
/**
*
@@ -2874,7 +3118,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_BLOB_FLAG', 16);
+define('MYSQLI_BLOB_FLAG', 16);
/**
*
@@ -2882,7 +3126,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_UNSIGNED_FLAG', 32);
+define('MYSQLI_UNSIGNED_FLAG', 32);
/**
*
@@ -2890,7 +3134,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_ZEROFILL_FLAG', 64);
+define('MYSQLI_ZEROFILL_FLAG', 64);
/**
*
@@ -2898,7 +3142,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_AUTO_INCREMENT_FLAG', 512);
+define('MYSQLI_AUTO_INCREMENT_FLAG', 512);
/**
*
@@ -2906,7 +3150,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TIMESTAMP_FLAG', 1024);
+define('MYSQLI_TIMESTAMP_FLAG', 1024);
/**
*
@@ -2914,7 +3158,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_SET_FLAG', 2048);
+define('MYSQLI_SET_FLAG', 2048);
/**
*
@@ -2922,7 +3166,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_NUM_FLAG', 32768);
+define('MYSQLI_NUM_FLAG', 32768);
/**
*
@@ -2930,7 +3174,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_PART_KEY_FLAG', 16384);
+define('MYSQLI_PART_KEY_FLAG', 16384);
/**
*
@@ -2938,7 +3182,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_GROUP_FLAG', 32768);
+define('MYSQLI_GROUP_FLAG', 32768);
/**
*
@@ -2946,10 +3190,10 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_ENUM_FLAG', 256);
-define ('MYSQLI_BINARY_FLAG', 128);
-define ('MYSQLI_NO_DEFAULT_VALUE_FLAG', 4096);
-define ('MYSQLI_ON_UPDATE_NOW_FLAG', 8192);
+define('MYSQLI_ENUM_FLAG', 256);
+define('MYSQLI_BINARY_FLAG', 128);
+define('MYSQLI_NO_DEFAULT_VALUE_FLAG', 4096);
+define('MYSQLI_ON_UPDATE_NOW_FLAG', 8192);
define('MYSQLI_TRANS_START_READ_ONLY', 4);
define('MYSQLI_TRANS_START_READ_WRITE', 2);
@@ -2960,7 +3204,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_DECIMAL', 0);
+define('MYSQLI_TYPE_DECIMAL', 0);
/**
*
@@ -2968,7 +3212,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_TINY', 1);
+define('MYSQLI_TYPE_TINY', 1);
/**
*
@@ -2976,7 +3220,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_SHORT', 2);
+define('MYSQLI_TYPE_SHORT', 2);
/**
*
@@ -2984,7 +3228,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_LONG', 3);
+define('MYSQLI_TYPE_LONG', 3);
/**
*
@@ -2992,7 +3236,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_FLOAT', 4);
+define('MYSQLI_TYPE_FLOAT', 4);
/**
*
@@ -3000,7 +3244,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_DOUBLE', 5);
+define('MYSQLI_TYPE_DOUBLE', 5);
/**
*
@@ -3008,7 +3252,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_NULL', 6);
+define('MYSQLI_TYPE_NULL', 6);
/**
*
@@ -3016,7 +3260,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_TIMESTAMP', 7);
+define('MYSQLI_TYPE_TIMESTAMP', 7);
/**
*
@@ -3024,7 +3268,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_LONGLONG', 8);
+define('MYSQLI_TYPE_LONGLONG', 8);
/**
*
@@ -3032,7 +3276,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_INT24', 9);
+define('MYSQLI_TYPE_INT24', 9);
/**
*
@@ -3040,7 +3284,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_DATE', 10);
+define('MYSQLI_TYPE_DATE', 10);
/**
*
@@ -3048,7 +3292,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_TIME', 11);
+define('MYSQLI_TYPE_TIME', 11);
/**
*
@@ -3056,7 +3300,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_DATETIME', 12);
+define('MYSQLI_TYPE_DATETIME', 12);
/**
*
@@ -3064,7 +3308,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_YEAR', 13);
+define('MYSQLI_TYPE_YEAR', 13);
/**
*
@@ -3072,7 +3316,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_NEWDATE', 14);
+define('MYSQLI_TYPE_NEWDATE', 14);
/**
*
@@ -3080,7 +3324,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_ENUM', 247);
+define('MYSQLI_TYPE_ENUM', 247);
/**
*
@@ -3088,7 +3332,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_SET', 248);
+define('MYSQLI_TYPE_SET', 248);
/**
*
@@ -3096,7 +3340,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_TINY_BLOB', 249);
+define('MYSQLI_TYPE_TINY_BLOB', 249);
/**
*
@@ -3104,7 +3348,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_MEDIUM_BLOB', 250);
+define('MYSQLI_TYPE_MEDIUM_BLOB', 250);
/**
*
@@ -3112,7 +3356,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_LONG_BLOB', 251);
+define('MYSQLI_TYPE_LONG_BLOB', 251);
/**
*
@@ -3120,7 +3364,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_BLOB', 252);
+define('MYSQLI_TYPE_BLOB', 252);
/**
*
@@ -3128,7 +3372,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_VAR_STRING', 253);
+define('MYSQLI_TYPE_VAR_STRING', 253);
/**
*
@@ -3136,7 +3380,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_STRING', 254);
+define('MYSQLI_TYPE_STRING', 254);
/**
*
@@ -3144,7 +3388,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_CHAR', 1);
+define('MYSQLI_TYPE_CHAR', 1);
/**
*
@@ -3152,7 +3396,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_INTERVAL', 247);
+define('MYSQLI_TYPE_INTERVAL', 247);
/**
*
@@ -3160,7 +3404,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_GEOMETRY', 255);
+define('MYSQLI_TYPE_GEOMETRY', 255);
/**
*
@@ -3168,7 +3412,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_NEWDECIMAL', 246);
+define('MYSQLI_TYPE_NEWDECIMAL', 246);
/**
*
@@ -3176,14 +3420,12 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_TYPE_BIT', 16);
+define('MYSQLI_TYPE_BIT', 16);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_SET_CHARSET_NAME', 7);
+define('MYSQLI_SET_CHARSET_NAME', 7);
/**
*
@@ -3191,7 +3433,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_NO_DATA', 100);
+define('MYSQLI_NO_DATA', 100);
/**
*
@@ -3199,7 +3441,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_DATA_TRUNCATED', 101);
+define('MYSQLI_DATA_TRUNCATED', 101);
/**
*
@@ -3207,7 +3449,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REPORT_INDEX', 4);
+define('MYSQLI_REPORT_INDEX', 4);
/**
*
@@ -3215,7 +3457,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REPORT_ERROR', 1);
+define('MYSQLI_REPORT_ERROR', 1);
/**
*
@@ -3223,7 +3465,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REPORT_STRICT', 2);
+define('MYSQLI_REPORT_STRICT', 2);
/**
*
@@ -3231,7 +3473,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REPORT_ALL', 255);
+define('MYSQLI_REPORT_ALL', 255);
/**
*
@@ -3239,7 +3481,7 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REPORT_OFF', 0);
+define('MYSQLI_REPORT_OFF', 0);
/**
*
@@ -3247,85 +3489,63 @@ function mysqli_set_opt ($link, $option, $value) {}
*
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_DEBUG_TRACE_ENABLED', 0);
+define('MYSQLI_DEBUG_TRACE_ENABLED', 0);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED', 16);
+define('MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED', 16);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_SERVER_QUERY_NO_INDEX_USED', 32);
+define('MYSQLI_SERVER_QUERY_NO_INDEX_USED', 32);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_GRANT', 1);
+define('MYSQLI_REFRESH_GRANT', 1);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_LOG', 2);
+define('MYSQLI_REFRESH_LOG', 2);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_TABLES', 4);
+define('MYSQLI_REFRESH_TABLES', 4);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_HOSTS', 8);
+define('MYSQLI_REFRESH_HOSTS', 8);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_STATUS', 16);
+define('MYSQLI_REFRESH_STATUS', 16);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_THREADS', 32);
+define('MYSQLI_REFRESH_THREADS', 32);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_SLAVE', 64);
+define('MYSQLI_REFRESH_SLAVE', 64);
/**
- *
- *
* @link https://php.net/manual/en/mysqli.constants.php
*/
-define ('MYSQLI_REFRESH_MASTER', 128);
+define('MYSQLI_REFRESH_MASTER', 128);
-
-define ('MYSQLI_SERVER_QUERY_WAS_SLOW', 2048);
-define ('MYSQLI_REFRESH_BACKUP_LOG', 2097152);
+define('MYSQLI_SERVER_QUERY_WAS_SLOW', 2048);
+define('MYSQLI_REFRESH_BACKUP_LOG', 2097152);
// End of mysqli v.0.1
-
/** @link https://php.net/manual/en/mysqli.constants.php */
define('MYSQLI_OPT_SSL_VERIFY_SERVER_CERT', 21);
/** @link https://php.net/manual/en/mysqli.constants.php */
@@ -3345,3 +3565,9 @@ function mysqli_set_opt ($link, $option, $value) {}
define('MYSQLI_TRANS_COR_AND_NO_CHAIN', 2);
define('MYSQLI_TRANS_COR_RELEASE', 4);
define('MYSQLI_TRANS_COR_NO_RELEASE', 8);
+define('MYSQLI_OPT_LOAD_DATA_LOCAL_DIR', 43);
+define('MYSQLI_REFRESH_REPLICA', 64);
+/**
+ * @since 8.1
+ */
+define('MYSQLI_IS_MARIADB', 0);
diff --git a/ncurses/ncurses.php b/ncurses/ncurses.php
index 419318533..093bcf588 100644
--- a/ncurses/ncurses.php
+++ b/ncurses/ncurses.php
@@ -5,352 +5,331 @@
/**
* Add character at current position and advance cursor
* @link https://php.net/manual/en/function.ncurses-addch.php
- * @param $ch int
+ * @param int $ch
*
- * @return int
+ * @return int
*/
-function ncurses_addch ($ch) {}
+function ncurses_addch($ch) {}
/**
* Set fore- and background color
* @link https://php.net/manual/en/function.ncurses-color-set.php
- * @param $pair int
+ * @param int $pair
*
- * @return int
+ * @return int
*/
-function ncurses_color_set ($pair) {}
+function ncurses_color_set($pair) {}
/**
* Delete a ncurses window
* @link https://php.net/manual/en/function.ncurses-delwin.php
- * @param $window resource
+ * @param resource $window
*
- * @return bool
+ * @return bool
*/
-function ncurses_delwin ($window) {}
+function ncurses_delwin($window) {}
/**
* Stop using ncurses, clean up the screen
* @link https://php.net/manual/en/function.ncurses-end.php
- * @return int
+ * @return int
*/
-function ncurses_end () {}
+function ncurses_end() {}
/**
* Read a character from keyboard
* @link https://php.net/manual/en/function.ncurses-getch.php
- * @return int
+ * @return int
*/
-function ncurses_getch () {}
+function ncurses_getch() {}
/**
* Check if terminal has colors
* @link https://php.net/manual/en/function.ncurses-has-colors.php
* @return bool Return true if the terminal has color capacities, false otherwise.
- *
*/
-function ncurses_has_colors () {}
+function ncurses_has_colors() {}
/**
* Initialize ncurses
* @link https://php.net/manual/en/function.ncurses-init.php
- * @return void &return.void;
- *
+ * @return void
*/
-function ncurses_init () {}
+function ncurses_init() {}
/**
* Allocate a color pair
* @link https://php.net/manual/en/function.ncurses-init-pair.php
- * @param $pair int
+ * @param int $pair
*
- * @param $fg int
+ * @param int $fg
*
- * @param $bg int
+ * @param int $bg
*
- * @return int
+ * @return int
*/
-function ncurses_init_pair ($pair, $fg, $bg) {}
+function ncurses_init_pair($pair, $fg, $bg) {}
/**
* Gets the RGB value for color
* @link https://php.net/manual/en/function.ncurses-color-content.php
- * @param $color int
+ * @param int $color
*
- * @param $r int
+ * @param int &$r
*
- * @param $g int
+ * @param int &$g
*
- * @param $b int
+ * @param int &$b
*
- * @return int
+ * @return int
*/
-function ncurses_color_content ($color, &$r, &$g, &$b) {}
+function ncurses_color_content($color, &$r, &$g, &$b) {}
/**
* Gets the RGB value for color
* @link https://php.net/manual/en/function.ncurses-pair-content.php
- * @param $pair int
+ * @param int $pair
*
- * @param $f int
+ * @param int &$f
*
- * @param $b int
+ * @param int &$b
*
- * @return int
+ * @return int
*/
-function ncurses_pair_content ($pair, &$f, &$b) {}
+function ncurses_pair_content($pair, &$f, &$b) {}
/**
* Move output position
* @link https://php.net/manual/en/function.ncurses-move.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @return int
+ * @return int
*/
-function ncurses_move ($y, $x) {}
+function ncurses_move($y, $x) {}
/**
* Create a new window
* @link https://php.net/manual/en/function.ncurses-newwin.php
- * @param $rows int
+ * @param int $rows
* Number of rows
*
- * @param $cols int
+ * @param int $cols
* Number of columns
*
- * @param $y int
+ * @param int $y
* y-ccordinate of the origin
*
- * @param $x int
+ * @param int $x
* x-ccordinate of the origin
*
* @return resource a resource ID for the new window.
- *
*/
-function ncurses_newwin ($rows, $cols, $y, $x) {}
+function ncurses_newwin($rows, $cols, $y, $x) {}
/**
* Refresh screen
* @link https://php.net/manual/en/function.ncurses-refresh.php
- * @param $ch int
+ * @param int $ch
*
- * @return int
+ * @return int
*/
-function ncurses_refresh ($ch) {}
+function ncurses_refresh($ch) {}
/**
* Start using colors
* @link https://php.net/manual/en/function.ncurses-start-color.php
- * @return int
+ * @return int
*/
-function ncurses_start_color () {}
+function ncurses_start_color() {}
/**
* Start using 'standout' attribute
* @link https://php.net/manual/en/function.ncurses-standout.php
- * @return int
+ * @return int
*/
-function ncurses_standout () {}
+function ncurses_standout() {}
/**
* Stop using 'standout' attribute
* @link https://php.net/manual/en/function.ncurses-standend.php
- * @return int
+ * @return int
*/
-function ncurses_standend () {}
+function ncurses_standend() {}
/**
* Returns baudrate of terminal
* @link https://php.net/manual/en/function.ncurses-baudrate.php
- * @return int
+ * @return int
*/
-function ncurses_baudrate () {}
+function ncurses_baudrate() {}
/**
* Let the terminal beep
* @link https://php.net/manual/en/function.ncurses-beep.php
- * @return int
+ * @return int
*/
-function ncurses_beep () {}
+function ncurses_beep() {}
/**
* Check if we can change terminals colors
* @link https://php.net/manual/en/function.ncurses-can-change-color.php
* @return bool Return true if the terminal has color capabilities and you can change
* the colors, false otherwise.
- *
*/
-function ncurses_can_change_color () {}
+function ncurses_can_change_color() {}
/**
* Switch of input buffering
* @link https://php.net/manual/en/function.ncurses-cbreak.php
* @return bool true or NCURSES_ERR if any error occurred.
- *
*/
-function ncurses_cbreak () {}
+function ncurses_cbreak() {}
/**
* Clear screen
* @link https://php.net/manual/en/function.ncurses-clear.php
- * @return bool &return.success;
- *
+ * @return bool
*/
-function ncurses_clear () {}
+function ncurses_clear() {}
/**
* Clear screen from current position to bottom
* @link https://php.net/manual/en/function.ncurses-clrtobot.php
- * @return bool &return.success;
- *
+ * @return bool
*/
-function ncurses_clrtobot () {}
+function ncurses_clrtobot() {}
/**
* Clear screen from current position to end of line
* @link https://php.net/manual/en/function.ncurses-clrtoeol.php
- * @return bool &return.success;
- *
+ * @return bool
*/
-function ncurses_clrtoeol () {}
+function ncurses_clrtoeol() {}
/**
* Saves terminals (program) mode
* @link https://php.net/manual/en/function.ncurses-def-prog-mode.php
* @return bool false on success, otherwise true.
- *
*/
-function ncurses_def_prog_mode () {}
+function ncurses_def_prog_mode() {}
/**
* Resets the prog mode saved by def_prog_mode
* @link https://php.net/manual/en/function.ncurses-reset-prog-mode.php
- * @return int
+ * @return int
*/
-function ncurses_reset_prog_mode () {}
+function ncurses_reset_prog_mode() {}
/**
* Saves terminals (shell) mode
* @link https://php.net/manual/en/function.ncurses-def-shell-mode.php
* @return bool false on success, true otherwise.
- *
*/
-function ncurses_def_shell_mode () {}
+function ncurses_def_shell_mode() {}
/**
* Resets the shell mode saved by def_shell_mode
* @link https://php.net/manual/en/function.ncurses-reset-shell-mode.php
- * @return int
+ * @return int
*/
-function ncurses_reset_shell_mode () {}
+function ncurses_reset_shell_mode() {}
/**
* Delete character at current position, move rest of line left
* @link https://php.net/manual/en/function.ncurses-delch.php
* @return bool false on success, true otherwise.
- *
*/
-function ncurses_delch () {}
+function ncurses_delch() {}
/**
* Delete line at current position, move rest of screen up
* @link https://php.net/manual/en/function.ncurses-deleteln.php
* @return bool false on success, otherwise true.
- *
*/
-function ncurses_deleteln () {}
+function ncurses_deleteln() {}
/**
* Write all prepared refreshes to terminal
* @link https://php.net/manual/en/function.ncurses-doupdate.php
- * @return bool &return.success;
- *
+ * @return bool
*/
-function ncurses_doupdate () {}
+function ncurses_doupdate() {}
/**
* Activate keyboard input echo
* @link https://php.net/manual/en/function.ncurses-echo.php
* @return bool false on success, true if any error occurred.
- *
*/
-function ncurses_echo () {}
+function ncurses_echo() {}
/**
* Erase terminal screen
* @link https://php.net/manual/en/function.ncurses-erase.php
- * @return bool &return.success;
- *
+ * @return bool
*/
-function ncurses_erase () {}
+function ncurses_erase() {}
/**
* Erase window contents
* @link https://php.net/manual/en/function.ncurses-werase.php
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_werase ($window) {}
+function ncurses_werase($window) {}
/**
* Returns current erase character
* @link https://php.net/manual/en/function.ncurses-erasechar.php
* @return string The current erase char, as a string.
- *
*/
-function ncurses_erasechar () {}
+function ncurses_erasechar() {}
/**
* Flash terminal screen (visual bell)
* @link https://php.net/manual/en/function.ncurses-flash.php
* @return bool false on success, otherwise true.
- *
*/
-function ncurses_flash () {}
+function ncurses_flash() {}
/**
* Flush keyboard input buffer
* @link https://php.net/manual/en/function.ncurses-flushinp.php
* @return bool false on success, otherwise true.
- *
*/
-function ncurses_flushinp () {}
+function ncurses_flushinp() {}
/**
* Check for insert- and delete-capabilities
* @link https://php.net/manual/en/function.ncurses-has-ic.php
* @return bool true if the terminal has insert/delete-capabilities, false
* otherwise.
- *
*/
-function ncurses_has_ic () {}
+function ncurses_has_ic() {}
/**
* Check for line insert- and delete-capabilities
* @link https://php.net/manual/en/function.ncurses-has-il.php
* @return bool true if the terminal has insert/delete-line capabilities,
* false otherwise.
- *
*/
-function ncurses_has_il () {}
+function ncurses_has_il() {}
/**
* Get character and attribute at current position
* @link https://php.net/manual/en/function.ncurses-inch.php
* @return string the character, as a string.
- *
*/
-function ncurses_inch () {}
+function ncurses_inch() {}
/**
* Insert a line, move rest of screen down
* @link https://php.net/manual/en/function.ncurses-insertln.php
- * @return int
+ * @return int
*/
-function ncurses_insertln () {}
+function ncurses_insertln() {}
/**
* Ncurses is in endwin mode, normal screen output may be performed
@@ -358,315 +337,305 @@ function ncurses_insertln () {}
* @return bool true, if ncurses_endwin has been called
* without any subsequent calls to ncurses_wrefresh,
* false otherwise.
- *
*/
-function ncurses_isendwin () {}
+function ncurses_isendwin() {}
/**
* Returns current line kill character
* @link https://php.net/manual/en/function.ncurses-killchar.php
* @return string the kill character, as a string.
- *
*/
-function ncurses_killchar () {}
+function ncurses_killchar() {}
/**
* Translate newline and carriage return / line feed
* @link https://php.net/manual/en/function.ncurses-nl.php
- * @return bool
+ * @return bool
*/
-function ncurses_nl () {}
+function ncurses_nl() {}
/**
* Switch terminal to cooked mode
* @link https://php.net/manual/en/function.ncurses-nocbreak.php
* @return bool true if any error occurred, otherwise false.
- *
*/
-function ncurses_nocbreak () {}
+function ncurses_nocbreak() {}
/**
* Switch off keyboard input echo
* @link https://php.net/manual/en/function.ncurses-noecho.php
* @return bool true if any error occurred, false otherwise.
- *
*/
-function ncurses_noecho () {}
+function ncurses_noecho() {}
/**
* Do not translate newline and carriage return / line feed
* @link https://php.net/manual/en/function.ncurses-nonl.php
- * @return bool
+ * @return bool
*/
-function ncurses_nonl () {}
+function ncurses_nonl() {}
/**
* Switch terminal out of raw mode
* @link https://php.net/manual/en/function.ncurses-noraw.php
* @return bool true if any error occurred, otherwise false.
- *
*/
-function ncurses_noraw () {}
+function ncurses_noraw() {}
/**
* Switch terminal into raw mode
* @link https://php.net/manual/en/function.ncurses-raw.php
* @return bool true if any error occurred, otherwise false.
- *
*/
-function ncurses_raw () {}
+function ncurses_raw() {}
/**
* Enables/Disable 8-bit meta key information
* @link https://php.net/manual/en/function.ncurses-meta.php
- * @param $window resource
+ * @param resource $window
*
* @param $bit8 bool
*
- * @return int
+ * @return int
*/
-function ncurses_meta ($window, $bit8) {}
+function ncurses_meta($window, $bit8) {}
/**
* Restores saved terminal state
* @link https://php.net/manual/en/function.ncurses-resetty.php
* @return bool Always returns false.
- *
*/
-function ncurses_resetty () {}
+function ncurses_resetty() {}
/**
* Saves terminal state
* @link https://php.net/manual/en/function.ncurses-savetty.php
* @return bool Always returns false.
- *
*/
-function ncurses_savetty () {}
+function ncurses_savetty() {}
/**
* Returns a logical OR of all attribute flags supported by terminal
* @link https://php.net/manual/en/function.ncurses-termattrs.php
- * @return bool
+ * @return bool
*/
-function ncurses_termattrs () {}
+function ncurses_termattrs() {}
/**
* Assign terminal default colors to color id -1
* @link https://php.net/manual/en/function.ncurses-use-default-colors.php
- * @return bool
+ * @return bool
*/
-function ncurses_use_default_colors () {}
+function ncurses_use_default_colors() {}
/**
* Returns current soft label key attribute
* @link https://php.net/manual/en/function.ncurses-slk-attr.php
* @return int The attribute, as an integer.
- *
*/
-function ncurses_slk_attr () {}
+function ncurses_slk_attr() {}
/**
* Clears soft labels from screen
* @link https://php.net/manual/en/function.ncurses-slk-clear.php
* @return bool true on errors, false otherwise.
- *
*/
-function ncurses_slk_clear () {}
+function ncurses_slk_clear() {}
/**
* Copies soft label keys to virtual screen
* @link https://php.net/manual/en/function.ncurses-slk-noutrefresh.php
- * @return bool
+ * @return bool
*/
-function ncurses_slk_noutrefresh () {}
+function ncurses_slk_noutrefresh() {}
/**
* Copies soft label keys to screen
* @link https://php.net/manual/en/function.ncurses-slk-refresh.php
- * @return int
+ * @return int
*/
-function ncurses_slk_refresh () {}
+function ncurses_slk_refresh() {}
/**
* Restores soft label keys
* @link https://php.net/manual/en/function.ncurses-slk-restore.php
- * @return int
+ * @return int
*/
-function ncurses_slk_restore () {}
+function ncurses_slk_restore() {}
/**
* Forces output when ncurses_slk_noutrefresh is performed
* @link https://php.net/manual/en/function.ncurses-slk-touch.php
- * @return int
+ * @return int
*/
-function ncurses_slk_touch () {}
+function ncurses_slk_touch() {}
/**
* Turn off the given attributes
* @link https://php.net/manual/en/function.ncurses-attroff.php
- * @param $attributes int
+ * @param int $attributes
*
- * @return int
+ * @return int
*/
-function ncurses_attroff ($attributes) {}
+function ncurses_attroff($attributes) {}
/**
* Turn on the given attributes
* @link https://php.net/manual/en/function.ncurses-attron.php
- * @param $attributes int
+ * @param int $attributes
*
- * @return int
+ * @return int
*/
-function ncurses_attron ($attributes) {}
+function ncurses_attron($attributes) {}
/**
* Set given attributes
* @link https://php.net/manual/en/function.ncurses-attrset.php
- * @param $attributes int
+ * @param int $attributes
*
- * @return int
+ * @return int
*/
-function ncurses_attrset ($attributes) {}
+function ncurses_attrset($attributes) {}
/**
* Set background property for terminal screen
* @link https://php.net/manual/en/function.ncurses-bkgd.php
- * @param $attrchar int
+ * @param int $attrchar
*
- * @return int
+ * @return int
*/
-function ncurses_bkgd ($attrchar) {}
+function ncurses_bkgd($attrchar) {}
/**
* Set cursor state
* @link https://php.net/manual/en/function.ncurses-curs-set.php
- * @param $visibility int
+ * @param int $visibility
*
- * @return int
+ * @return int
*/
-function ncurses_curs_set ($visibility) {}
+function ncurses_curs_set($visibility) {}
/**
* Delay output on terminal using padding characters
* @link https://php.net/manual/en/function.ncurses-delay-output.php
- * @param $milliseconds int
+ * @param int $milliseconds
*
- * @return int
+ * @return int
*/
-function ncurses_delay_output ($milliseconds) {}
+function ncurses_delay_output($milliseconds) {}
/**
* Single character output including refresh
* @link https://php.net/manual/en/function.ncurses-echochar.php
- * @param $character int
+ * @param int $character
*
- * @return int
+ * @return int
*/
-function ncurses_echochar ($character) {}
+function ncurses_echochar($character) {}
/**
* Put terminal into halfdelay mode
* @link https://php.net/manual/en/function.ncurses-halfdelay.php
- * @param $tenth int
+ * @param int $tenth
*
- * @return int
+ * @return int
*/
-function ncurses_halfdelay ($tenth) {}
+function ncurses_halfdelay($tenth) {}
/**
* Check for presence of a function key on terminal keyboard
* @link https://php.net/manual/en/function.ncurses-has-key.php
- * @param $keycode int
+ * @param int $keycode
*
- * @return int
+ * @return int
*/
-function ncurses_has_key ($keycode) {}
+function ncurses_has_key($keycode) {}
/**
* Insert character moving rest of line including character at current position
* @link https://php.net/manual/en/function.ncurses-insch.php
- * @param $character int
+ * @param int $character
*
- * @return int
+ * @return int
*/
-function ncurses_insch ($character) {}
+function ncurses_insch($character) {}
/**
* Insert lines before current line scrolling down (negative numbers delete and scroll up)
* @link https://php.net/manual/en/function.ncurses-insdelln.php
- * @param $count int
+ * @param int $count
*
- * @return int
+ * @return int
*/
-function ncurses_insdelln ($count) {}
+function ncurses_insdelln($count) {}
/**
* Set timeout for mouse button clicks
* @link https://php.net/manual/en/function.ncurses-mouseinterval.php
- * @param $milliseconds int
+ * @param int $milliseconds
*
- * @return int
+ * @return int
*/
-function ncurses_mouseinterval ($milliseconds) {}
+function ncurses_mouseinterval($milliseconds) {}
/**
* Sleep
* @link https://php.net/manual/en/function.ncurses-napms.php
- * @param $milliseconds int
+ * @param int $milliseconds
*
- * @return int
+ * @return int
*/
-function ncurses_napms ($milliseconds) {}
+function ncurses_napms($milliseconds) {}
/**
* Scroll window content up or down without changing current position
* @link https://php.net/manual/en/function.ncurses-scrl.php
- * @param $count int
+ * @param int $count
*
- * @return int
+ * @return int
*/
-function ncurses_scrl ($count) {}
+function ncurses_scrl($count) {}
/**
* Turn off the given attributes for soft function-key labels
* @link https://php.net/manual/en/function.ncurses-slk-attroff.php
- * @param $intarg int
+ * @param int $intarg
*
- * @return int
+ * @return int
*/
-function ncurses_slk_attroff ($intarg) {}
+function ncurses_slk_attroff($intarg) {}
/**
* Turn on the given attributes for soft function-key labels
* @link https://php.net/manual/en/function.ncurses-slk-attron.php
- * @param $intarg int
+ * @param int $intarg
*
- * @return int
+ * @return int
*/
-function ncurses_slk_attron ($intarg) {}
+function ncurses_slk_attron($intarg) {}
/**
* Set given attributes for soft function-key labels
* @link https://php.net/manual/en/function.ncurses-slk-attrset.php
- * @param $intarg int
+ * @param int $intarg
*
- * @return int
+ * @return int
*/
-function ncurses_slk_attrset ($intarg) {}
+function ncurses_slk_attrset($intarg) {}
/**
* Sets color for soft label keys
* @link https://php.net/manual/en/function.ncurses-slk-color.php
- * @param $intarg int
+ * @param int $intarg
*
- * @return int
+ * @return int
*/
-function ncurses_slk_color ($intarg) {}
+function ncurses_slk_color($intarg) {}
/**
* Initializes soft label key functions
* @link https://php.net/manual/en/function.ncurses-slk-init.php
- * @param $format int
+ * @param int $format
* If ncurses_initscr eventually uses a line from
* stdscr to emulate the soft labels, then this parameter determines how
* the labels are arranged of the screen.
@@ -676,504 +645,500 @@ function ncurses_slk_color ($intarg) {}
* arrangement and 2 indicates the PC like 4-4-4 mode, but in addition an
* index line will be created.
*
- * @return bool &return.success;
- *
+ * @return bool
*/
-function ncurses_slk_init ($format) {}
+function ncurses_slk_init($format) {}
/**
* Sets function key labels
* @link https://php.net/manual/en/function.ncurses-slk-set.php
- * @param $labelnr int
+ * @param int $labelnr
*
- * @param $label string
+ * @param string $label
*
- * @param $format int
+ * @param int $format
*
- * @return bool
+ * @return bool
*/
-function ncurses_slk_set ($labelnr, $label, $format) {}
+function ncurses_slk_set($labelnr, $label, $format) {}
/**
* Specify different filedescriptor for typeahead checking
* @link https://php.net/manual/en/function.ncurses-typeahead.php
- * @param $fd int
+ * @param int $fd
*
- * @return int
+ * @return int
*/
-function ncurses_typeahead ($fd) {}
+function ncurses_typeahead($fd) {}
/**
* Put a character back into the input stream
* @link https://php.net/manual/en/function.ncurses-ungetch.php
- * @param $keycode int
+ * @param int $keycode
*
- * @return int
+ * @return int
*/
-function ncurses_ungetch ($keycode) {}
+function ncurses_ungetch($keycode) {}
/**
* Display the string on the terminal in the video attribute mode
* @link https://php.net/manual/en/function.ncurses-vidattr.php
- * @param $intarg int
+ * @param int $intarg
*
- * @return int
+ * @return int
*/
-function ncurses_vidattr ($intarg) {}
+function ncurses_vidattr($intarg) {}
/**
* Refresh window on terminal screen
* @link https://php.net/manual/en/function.ncurses-wrefresh.php
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_wrefresh ($window) {}
+function ncurses_wrefresh($window) {}
/**
* Control use of extended names in terminfo descriptions
* @link https://php.net/manual/en/function.ncurses-use-extended-names.php
- * @param $flag bool
+ * @param bool $flag
*
- * @return int
+ * @return int
*/
-function ncurses_use_extended_names ($flag) {}
+function ncurses_use_extended_names($flag) {}
/**
* Control screen background
* @link https://php.net/manual/en/function.ncurses-bkgdset.php
- * @param $attrchar int
+ * @param int $attrchar
*
- * @return void
+ * @return void
*/
-function ncurses_bkgdset ($attrchar) {}
+function ncurses_bkgdset($attrchar) {}
/**
* Set LINES for iniscr() and newterm() to 1
* @link https://php.net/manual/en/function.ncurses-filter.php
- * @return void
+ * @return void
*/
-function ncurses_filter () {}
+function ncurses_filter() {}
/**
* Do not flush on signal characters
* @link https://php.net/manual/en/function.ncurses-noqiflush.php
- * @return void
+ * @return void
*/
-function ncurses_noqiflush () {}
+function ncurses_noqiflush() {}
/**
* Flush on signal characters
* @link https://php.net/manual/en/function.ncurses-qiflush.php
- * @return void
+ * @return void
*/
-function ncurses_qiflush () {}
+function ncurses_qiflush() {}
/**
* Set timeout for special key sequences
* @link https://php.net/manual/en/function.ncurses-timeout.php
- * @param $millisec int
+ * @param int $millisec
*
- * @return void
+ * @return void
*/
-function ncurses_timeout ($millisec) {}
+function ncurses_timeout($millisec) {}
/**
* Control use of environment information about terminal size
* @link https://php.net/manual/en/function.ncurses-use-env.php
- * @param $flag bool
+ * @param bool $flag
*
- * @return void
+ * @return void
*/
-function ncurses_use_env ($flag) {}
+function ncurses_use_env($flag) {}
/**
* Output text at current position
* @link https://php.net/manual/en/function.ncurses-addstr.php
- * @param $text string
+ * @param string $text
*
- * @return int
+ * @return int
*/
-function ncurses_addstr ($text) {}
+function ncurses_addstr($text) {}
/**
* Apply padding information to the string and output it
* @link https://php.net/manual/en/function.ncurses-putp.php
- * @param $text string
+ * @param string $text
*
- * @return int
+ * @return int
*/
-function ncurses_putp ($text) {}
+function ncurses_putp($text) {}
/**
* Dump screen content to file
* @link https://php.net/manual/en/function.ncurses-scr-dump.php
- * @param $filename string
+ * @param string $filename
*
- * @return int
+ * @return int
*/
-function ncurses_scr_dump ($filename) {}
+function ncurses_scr_dump($filename) {}
/**
* Initialize screen from file dump
* @link https://php.net/manual/en/function.ncurses-scr-init.php
- * @param $filename string
+ * @param string $filename
*
- * @return int
+ * @return int
*/
-function ncurses_scr_init ($filename) {}
+function ncurses_scr_init($filename) {}
/**
* Restore screen from file dump
* @link https://php.net/manual/en/function.ncurses-scr-restore.php
- * @param $filename string
+ * @param string $filename
*
- * @return int
+ * @return int
*/
-function ncurses_scr_restore ($filename) {}
+function ncurses_scr_restore($filename) {}
/**
* Inherit screen from file dump
* @link https://php.net/manual/en/function.ncurses-scr-set.php
- * @param $filename string
+ * @param string $filename
*
- * @return int
+ * @return int
*/
-function ncurses_scr_set ($filename) {}
+function ncurses_scr_set($filename) {}
/**
* Move current position and add character
* @link https://php.net/manual/en/function.ncurses-mvaddch.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @param $c int
+ * @param int $c
*
- * @return int
+ * @return int
*/
-function ncurses_mvaddch ($y, $x, $c) {}
+function ncurses_mvaddch($y, $x, $c) {}
/**
* Move position and add attributed string with specified length
* @link https://php.net/manual/en/function.ncurses-mvaddchnstr.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @param $s string
+ * @param string $s
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_mvaddchnstr ($y, $x, $s, $n) {}
+function ncurses_mvaddchnstr($y, $x, $s, $n) {}
/**
* Add attributed string with specified length at current position
* @link https://php.net/manual/en/function.ncurses-addchnstr.php
- * @param $s string
+ * @param string $s
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_addchnstr ($s, $n) {}
+function ncurses_addchnstr($s, $n) {}
/**
* Move position and add attributed string
* @link https://php.net/manual/en/function.ncurses-mvaddchstr.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @param $s string
+ * @param string $s
*
- * @return int
+ * @return int
*/
-function ncurses_mvaddchstr ($y, $x, $s) {}
+function ncurses_mvaddchstr($y, $x, $s) {}
/**
* Add attributed string at current position
* @link https://php.net/manual/en/function.ncurses-addchstr.php
- * @param $s string
+ * @param string $s
*
- * @return int
+ * @return int
*/
-function ncurses_addchstr ($s) {}
+function ncurses_addchstr($s) {}
/**
* Move position and add string with specified length
* @link https://php.net/manual/en/function.ncurses-mvaddnstr.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @param $s string
+ * @param string $s
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_mvaddnstr ($y, $x, $s, $n) {}
+function ncurses_mvaddnstr($y, $x, $s, $n) {}
/**
* Add string with specified length at current position
* @link https://php.net/manual/en/function.ncurses-addnstr.php
- * @param $s string
+ * @param string $s
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_addnstr ($s, $n) {}
+function ncurses_addnstr($s, $n) {}
/**
* Move position and add string
* @link https://php.net/manual/en/function.ncurses-mvaddstr.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @param $s string
+ * @param string $s
*
- * @return int
+ * @return int
*/
-function ncurses_mvaddstr ($y, $x, $s) {}
+function ncurses_mvaddstr($y, $x, $s) {}
/**
* Move position and delete character, shift rest of line left
* @link https://php.net/manual/en/function.ncurses-mvdelch.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @return int
+ * @return int
*/
-function ncurses_mvdelch ($y, $x) {}
+function ncurses_mvdelch($y, $x) {}
/**
* Move position and get character at new position
* @link https://php.net/manual/en/function.ncurses-mvgetch.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @return int
+ * @return int
*/
-function ncurses_mvgetch ($y, $x) {}
+function ncurses_mvgetch($y, $x) {}
/**
* Move position and get attributed character at new position
* @link https://php.net/manual/en/function.ncurses-mvinch.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @return int
+ * @return int
*/
-function ncurses_mvinch ($y, $x) {}
+function ncurses_mvinch($y, $x) {}
/**
* Add string at new position in window
* @link https://php.net/manual/en/function.ncurses-mvwaddstr.php
- * @param $window resource
+ * @param resource $window
*
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @param $text string
+ * @param string $text
*
- * @return int
+ * @return int
*/
-function ncurses_mvwaddstr ($window, $y, $x, $text) {}
+function ncurses_mvwaddstr($window, $y, $x, $text) {}
/**
* Insert string at current position, moving rest of line right
* @link https://php.net/manual/en/function.ncurses-insstr.php
- * @param $text string
+ * @param string $text
*
- * @return int
+ * @return int
*/
-function ncurses_insstr ($text) {}
+function ncurses_insstr($text) {}
/**
* Reads string from terminal screen
* @link https://php.net/manual/en/function.ncurses-instr.php
- * @param $buffer string
+ * @param string &$buffer
* The characters. Attributes will be stripped.
*
* @return int the number of characters.
- *
*/
-function ncurses_instr (&$buffer) {}
+function ncurses_instr(&$buffer) {}
/**
* Set new position and draw a horizontal line using an attributed character and max. n characters long
* @link https://php.net/manual/en/function.ncurses-mvhline.php
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @param $attrchar int
+ * @param int $attrchar
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_mvhline ($y, $x, $attrchar, $n) {}
+function ncurses_mvhline($y, $x, $attrchar, $n) {}
/**
* Move cursor immediately
* @link https://php.net/manual/en/function.ncurses-mvcur.php
- * @param $old_y int
+ * @param int $old_y
*
- * @param $old_x int
+ * @param int $old_x
*
- * @param $new_y int
+ * @param int $new_y
*
- * @param $new_x int
+ * @param int $new_x
*
- * @return int
+ * @return int
*/
-function ncurses_mvcur ($old_y, $old_x, $new_y, $new_x) {}
+function ncurses_mvcur($old_y, $old_x, $new_y, $new_x) {}
/**
* Set new RGB value for color
* @link https://php.net/manual/en/function.ncurses-init-color.php
- * @param $color int
+ * @param int $color
*
- * @param $r int
+ * @param int $r
*
- * @param $g int
+ * @param int $g
*
- * @param $b int
+ * @param int $b
*
- * @return int
+ * @return int
*/
-function ncurses_init_color ($color, $r, $g, $b) {}
+function ncurses_init_color($color, $r, $g, $b) {}
/**
* Draw a border around the screen using attributed characters
* @link https://php.net/manual/en/function.ncurses-border.php
- * @param $left int
+ * @param int $left
*
- * @param $right int
+ * @param int $right
*
- * @param $top int
+ * @param int $top
*
- * @param $bottom int
+ * @param int $bottom
*
- * @param $tl_corner int
+ * @param int $tl_corner
* Top left corner
*
- * @param $tr_corner int
+ * @param int $tr_corner
* Top right corner
*
- * @param $bl_corner int
+ * @param int $bl_corner
* Bottom left corner
*
- * @param $br_corner int
+ * @param int $br_corner
* Bottom right corner
*
- * @return int
+ * @return int
*/
-function ncurses_border ($left, $right, $top, $bottom, $tl_corner, $tr_corner, $bl_corner, $br_corner) {}
+function ncurses_border($left, $right, $top, $bottom, $tl_corner, $tr_corner, $bl_corner, $br_corner) {}
/**
* Define default colors for color 0
* @link https://php.net/manual/en/function.ncurses-assume-default-colors.php
- * @param $fg int
+ * @param int $fg
*
- * @param $bg int
+ * @param int $bg
*
- * @return int
+ * @return int
*/
-function ncurses_assume_default_colors ($fg, $bg) {}
+function ncurses_assume_default_colors($fg, $bg) {}
/**
* Define a keycode
* @link https://php.net/manual/en/function.ncurses-define-key.php
- * @param $definition string
+ * @param string $definition
*
- * @param $keycode int
+ * @param int $keycode
*
- * @return int
+ * @return int
*/
-function ncurses_define_key ($definition, $keycode) {}
+function ncurses_define_key($definition, $keycode) {}
/**
* Draw a horizontal line at current position using an attributed character and max. n characters long
* @link https://php.net/manual/en/function.ncurses-hline.php
- * @param $charattr int
+ * @param int $charattr
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_hline ($charattr, $n) {}
+function ncurses_hline($charattr, $n) {}
/**
* Draw a vertical line at current position using an attributed character and max. n characters long
* @link https://php.net/manual/en/function.ncurses-vline.php
- * @param $charattr int
+ * @param int $charattr
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_vline ($charattr, $n) {}
+function ncurses_vline($charattr, $n) {}
/**
* Enable or disable a keycode
* @link https://php.net/manual/en/function.ncurses-keyok.php
- * @param $keycode int
+ * @param int $keycode
*
- * @param $enable bool
+ * @param bool $enable
*
- * @return int
+ * @return int
*/
-function ncurses_keyok ($keycode, $enable) {}
+function ncurses_keyok($keycode, $enable) {}
/**
* Returns terminals (short)-name
* @link https://php.net/manual/en/function.ncurses-termname.php
- * @return string the shortname of the terminal, truncated to 14 characters.
- * On errors, returns &null;.
- *
+ * @return string|null the shortname of the terminal, truncated to 14 characters.
+ * On errors, returns null.
*/
-function ncurses_termname () {}
+function ncurses_termname() {}
/**
* Returns terminals description
* @link https://php.net/manual/en/function.ncurses-longname.php
- * @return string the description, as a string truncated to 128 characters.
- * On errors, returns &null;.
- *
+ * @return string|null the description, as a string truncated to 128 characters.
+ * On errors, returns null.
*/
-function ncurses_longname () {}
+function ncurses_longname() {}
/**
* Sets mouse options
* @link https://php.net/manual/en/function.ncurses-mousemask.php
- * @param $newmask int
+ * @param int $newmask
* Mouse mask options can be set with the following predefined constants:
*
NCURSES_BUTTON1_PRESSED
- * @param $oldmask int
+ * @param int &$oldmask
* This will be set to the previous value of the mouse event mask.
*
- * @return int a mask to indicated which of the in parameter
+ * @return int a mask to indicated which of the in parameter
* newmask specified mouse events can be reported. On
* complete failure, it returns 0.
*
*/
-function ncurses_mousemask ($newmask, &$oldmask) {}
+function ncurses_mousemask($newmask, &$oldmask) {}
/**
* Reads mouse event
* @link https://php.net/manual/en/function.ncurses-getmouse.php
- * @param $mevent array
+ * @param array &$mevent
* Event options will be delivered in this parameter which has to be an
* array, passed by reference (see example below).
*
@@ -1186,582 +1151,579 @@ function ncurses_mousemask ($newmask, &$oldmask) {}
* otherwise returns true.
*
*/
-function ncurses_getmouse (array &$mevent) {}
+function ncurses_getmouse(array &$mevent) {}
/**
* Pushes mouse event to queue
* @link https://php.net/manual/en/function.ncurses-ungetmouse.php
- * @param $mevent array
+ * @param array $mevent
* An associative array specifying the event options:
- *
"id" : Id to distinguish multiple devices
- * @return bool false on success, true otherwise.
+ * "id" : Id to distinguish multiple devices
*
+ * @return bool false on success, true otherwise.
*/
-function ncurses_ungetmouse (array $mevent) {}
+function ncurses_ungetmouse(array $mevent) {}
/**
* Transforms coordinates
* @link https://php.net/manual/en/function.ncurses-mouse-trafo.php
- * @param $y int
+ * @param int &$y
*
- * @param $x int
+ * @param int &$x
*
- * @param $toscreen bool
+ * @param bool $toscreen
*
- * @return bool
+ * @return bool
*/
-function ncurses_mouse_trafo (&$y, &$x, $toscreen) {}
+function ncurses_mouse_trafo(&$y, &$x, $toscreen) {}
/**
* Transforms window/stdscr coordinates
* @link https://php.net/manual/en/function.ncurses-wmouse-trafo.php
- * @param $window resource
+ * @param resource $window
*
- * @param $y int
+ * @param int &$y
*
- * @param $x int
+ * @param int &$x
*
- * @param $toscreen bool
+ * @param bool $toscreen
*
- * @return bool
+ * @return bool
*/
-function ncurses_wmouse_trafo ($window, &$y, &$x, $toscreen) {}
+function ncurses_wmouse_trafo($window, &$y, &$x, $toscreen) {}
/**
- * Outputs text at current postion in window
+ * Outputs text at current position in window
* @link https://php.net/manual/en/function.ncurses-waddstr.php
- * @param $window resource
+ * @param resource $window
*
- * @param $str string
+ * @param string $str
*
- * @param $n int[optional]
+ * @param int $n [optional]
*
- * @return int
+ * @return int
*/
-function ncurses_waddstr ($window, $str, $n = null) {}
+function ncurses_waddstr($window, $str, $n = null) {}
/**
* Copies window to virtual screen
* @link https://php.net/manual/en/function.ncurses-wnoutrefresh.php
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_wnoutrefresh ($window) {}
+function ncurses_wnoutrefresh($window) {}
/**
* Clears window
* @link https://php.net/manual/en/function.ncurses-wclear.php
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_wclear ($window) {}
+function ncurses_wclear($window) {}
/**
* Sets windows color pairings
* @link https://php.net/manual/en/function.ncurses-wcolor-set.php
- * @param $window resource
+ * @param resource $window
*
- * @param $color_pair int
+ * @param int $color_pair
*
- * @return int
+ * @return int
*/
-function ncurses_wcolor_set ($window, $color_pair) {}
+function ncurses_wcolor_set($window, $color_pair) {}
/**
* Reads a character from keyboard (window)
* @link https://php.net/manual/en/function.ncurses-wgetch.php
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_wgetch ($window) {}
+function ncurses_wgetch($window) {}
/**
* Turns keypad on or off
* @link https://php.net/manual/en/function.ncurses-keypad.php
- * @param $window resource
+ * @param resource $window
*
- * @param $bf bool
+ * @param bool $bf
*
- * @return int
+ * @return int
*/
-function ncurses_keypad ($window, $bf) {}
+function ncurses_keypad($window, $bf) {}
/**
* Moves windows output position
* @link https://php.net/manual/en/function.ncurses-wmove.php
- * @param $window resource
+ * @param resource $window
*
- * @param $y int
+ * @param int $y
*
- * @param $x int
+ * @param int $x
*
- * @return int
+ * @return int
*/
-function ncurses_wmove ($window, $y, $x) {}
+function ncurses_wmove($window, $y, $x) {}
/**
* Creates a new pad (window)
* @link https://php.net/manual/en/function.ncurses-newpad.php
- * @param $rows int
+ * @param int $rows
*
- * @param $cols int
+ * @param int $cols
*
- * @return resource
+ * @return resource
*/
-function ncurses_newpad ($rows, $cols) {}
+function ncurses_newpad($rows, $cols) {}
/**
* Copies a region from a pad into the virtual screen
* @link https://php.net/manual/en/function.ncurses-prefresh.php
- * @param $pad resource
+ * @param resource $pad
*
- * @param $pminrow int
+ * @param int $pminrow
*
- * @param $pmincol int
+ * @param int $pmincol
*
- * @param $sminrow int
+ * @param int $sminrow
*
- * @param $smincol int
+ * @param int $smincol
*
- * @param $smaxrow int
+ * @param int $smaxrow
*
- * @param $smaxcol int
+ * @param int $smaxcol
*
- * @return int
+ * @return int
*/
-function ncurses_prefresh ($pad, $pminrow, $pmincol, $sminrow, $smincol, $smaxrow, $smaxcol) {}
+function ncurses_prefresh($pad, $pminrow, $pmincol, $sminrow, $smincol, $smaxrow, $smaxcol) {}
/**
* Copies a region from a pad into the virtual screen
* @link https://php.net/manual/en/function.ncurses-pnoutrefresh.php
- * @param $pad resource
+ * @param resource $pad
*
- * @param $pminrow int
+ * @param int $pminrow
*
- * @param $pmincol int
+ * @param int $pmincol
*
- * @param $sminrow int
+ * @param int $sminrow
*
- * @param $smincol int
+ * @param int $smincol
*
- * @param $smaxrow int
+ * @param int $smaxrow
*
- * @param $smaxcol int
+ * @param int $smaxcol
*
- * @return int
+ * @return int
*/
-function ncurses_pnoutrefresh ($pad, $pminrow, $pmincol, $sminrow, $smincol, $smaxrow, $smaxcol) {}
+function ncurses_pnoutrefresh($pad, $pminrow, $pmincol, $sminrow, $smincol, $smaxrow, $smaxcol) {}
/**
* Enter standout mode for a window
* @link https://php.net/manual/en/function.ncurses-wstandout.php
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_wstandout ($window) {}
+function ncurses_wstandout($window) {}
/**
* End standout mode for a window
* @link https://php.net/manual/en/function.ncurses-wstandend.php
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_wstandend ($window) {}
+function ncurses_wstandend($window) {}
/**
* Set the attributes for a window
* @link https://php.net/manual/en/function.ncurses-wattrset.php
- * @param $window resource
+ * @param resource $window
*
- * @param $attrs int
+ * @param int $attrs
*
- * @return int
+ * @return int
*/
-function ncurses_wattrset ($window, $attrs) {}
+function ncurses_wattrset($window, $attrs) {}
/**
* Turns on attributes for a window
* @link https://php.net/manual/en/function.ncurses-wattron.php
- * @param $window resource
+ * @param resource $window
*
- * @param $attrs int
+ * @param int $attrs
*
- * @return int
+ * @return int
*/
-function ncurses_wattron ($window, $attrs) {}
+function ncurses_wattron($window, $attrs) {}
/**
* Turns off attributes for a window
* @link https://php.net/manual/en/function.ncurses-wattroff.php
- * @param $window resource
+ * @param resource $window
*
- * @param $attrs int
+ * @param int $attrs
*
- * @return int
+ * @return int
*/
-function ncurses_wattroff ($window, $attrs) {}
+function ncurses_wattroff($window, $attrs) {}
/**
* Adds character at current position in a window and advance cursor
* @link https://php.net/manual/en/function.ncurses-waddch.php
- * @param $window resource
+ * @param resource $window
*
- * @param $ch int
+ * @param int $ch
*
- * @return int
+ * @return int
*/
-function ncurses_waddch ($window, $ch) {}
+function ncurses_waddch($window, $ch) {}
/**
* Draws a border around the window using attributed characters
* @link https://php.net/manual/en/function.ncurses-wborder.php
- * @param $window resource
+ * @param resource $window
* The window on which we operate
*
- * @param $left int
+ * @param int $left
*
- * @param $right int
+ * @param int $right
*
- * @param $top int
+ * @param int $top
*
- * @param $bottom int
+ * @param int $bottom
*
- * @param $tl_corner int
+ * @param int $tl_corner
* Top left corner
*
- * @param $tr_corner int
+ * @param int $tr_corner
* Top right corner
*
- * @param $bl_corner int
+ * @param int $bl_corner
* Bottom left corner
*
- * @param $br_corner int
+ * @param int $br_corner
* Bottom right corner
*
- * @return int
+ * @return int
*/
-function ncurses_wborder ($window, $left, $right, $top, $bottom, $tl_corner, $tr_corner, $bl_corner, $br_corner) {}
+function ncurses_wborder($window, $left, $right, $top, $bottom, $tl_corner, $tr_corner, $bl_corner, $br_corner) {}
/**
* Draws a horizontal line in a window at current position using an attributed character and max. n characters long
* @link https://php.net/manual/en/function.ncurses-whline.php
- * @param $window resource
+ * @param resource $window
*
- * @param $charattr int
+ * @param int $charattr
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_whline ($window, $charattr, $n) {}
+function ncurses_whline($window, $charattr, $n) {}
/**
* Draws a vertical line in a window at current position using an attributed character and max. n characters long
* @link https://php.net/manual/en/function.ncurses-wvline.php
- * @param $window resource
+ * @param resource $window
*
- * @param $charattr int
+ * @param int $charattr
*
- * @param $n int
+ * @param int $n
*
- * @return int
+ * @return int
*/
-function ncurses_wvline ($window, $charattr, $n) {}
+function ncurses_wvline($window, $charattr, $n) {}
/**
* Returns the current cursor position for a window
* @link https://php.net/manual/en/function.ncurses-getyx.php
- * @param $window resource
+ * @param resource $window
*
- * @param $y int
+ * @param int &$y
*
- * @param $x int
+ * @param int &$x
*
- * @return void
+ * @return void
*/
-function ncurses_getyx ($window, &$y, &$x) {}
+function ncurses_getyx($window, &$y, &$x) {}
/**
* Returns the size of a window
* @link https://php.net/manual/en/function.ncurses-getmaxyx.php
- * @param $window resource
+ * @param resource $window
* The measured window
*
- * @param $y int
+ * @param int &$y
* This will be set to the window height
*
- * @param $x int
+ * @param int &$x
* This will be set to the window width
*
- * @return void &return.void;
- *
+ * @return void
*/
-function ncurses_getmaxyx ($window, &$y, &$x) {}
+function ncurses_getmaxyx($window, &$y, &$x) {}
/**
* Refreshes the virtual screen to reflect the relations between panels in the stack
* @link https://php.net/manual/en/function.ncurses-update-panels.php
- * @return void
+ * @return void
*/
-function ncurses_update_panels () {}
+function ncurses_update_panels() {}
/**
* Returns the window associated with panel
* @link https://php.net/manual/en/function.ncurses-panel-window.php
- * @param $panel resource
+ * @param resource $panel
*
- * @return resource
+ * @return resource
*/
-function ncurses_panel_window ($panel) {}
+function ncurses_panel_window($panel) {}
/**
* Returns the panel below panel
* @link https://php.net/manual/en/function.ncurses-panel-below.php
- * @param $panel resource
+ * @param resource $panel
*
- * @return resource
+ * @return resource
*/
-function ncurses_panel_below ($panel) {}
+function ncurses_panel_below($panel) {}
/**
* Returns the panel above panel
* @link https://php.net/manual/en/function.ncurses-panel-above.php
- * @param $panel resource
+ * @param resource $panel
*
* @return resource If panel is null, returns the bottom panel in the stack.
- *
*/
-function ncurses_panel_above ($panel) {}
+function ncurses_panel_above($panel) {}
/**
* Replaces the window associated with panel
* @link https://php.net/manual/en/function.ncurses-replace-panel.php
- * @param $panel resource
+ * @param resource $panel
*
- * @param $window resource
+ * @param resource $window
*
- * @return int
+ * @return int
*/
-function ncurses_replace_panel ($panel, $window) {}
+function ncurses_replace_panel($panel, $window) {}
/**
* Moves a panel so that its upper-left corner is at [startx, starty]
* @link https://php.net/manual/en/function.ncurses-move-panel.php
- * @param $panel resource
+ * @param resource $panel
*
- * @param $startx int
+ * @param int $startx
*
- * @param $starty int
+ * @param int $starty
*
- * @return int
+ * @return int
*/
-function ncurses_move_panel ($panel, $startx, $starty) {}
+function ncurses_move_panel($panel, $startx, $starty) {}
/**
* Moves a visible panel to the bottom of the stack
* @link https://php.net/manual/en/function.ncurses-bottom-panel.php
- * @param $panel resource
+ * @param resource $panel
*
- * @return int
+ * @return int
*/
-function ncurses_bottom_panel ($panel) {}
+function ncurses_bottom_panel($panel) {}
/**
* Moves a visible panel to the top of the stack
* @link https://php.net/manual/en/function.ncurses-top-panel.php
- * @param $panel resource
+ * @param resource $panel
*
- * @return int
+ * @return int
*/
-function ncurses_top_panel ($panel) {}
+function ncurses_top_panel($panel) {}
/**
* Places an invisible panel on top of the stack, making it visible
* @link https://php.net/manual/en/function.ncurses-show-panel.php
- * @param $panel resource
+ * @param resource $panel
*
- * @return int
+ * @return int
*/
-function ncurses_show_panel ($panel) {}
+function ncurses_show_panel($panel) {}
/**
* Remove panel from the stack, making it invisible
* @link https://php.net/manual/en/function.ncurses-hide-panel.php
- * @param $panel resource
+ * @param resource $panel
*
- * @return int
+ * @return int
*/
-function ncurses_hide_panel ($panel) {}
+function ncurses_hide_panel($panel) {}
/**
* Remove panel from the stack and delete it (but not the associated window)
* @link https://php.net/manual/en/function.ncurses-del-panel.php
- * @param $panel resource
+ * @param resource $panel
*
- * @return bool
+ * @return bool
*/
-function ncurses_del_panel ($panel) {}
+function ncurses_del_panel($panel) {}
/**
* Create a new panel and associate it with window
* @link https://php.net/manual/en/function.ncurses-new-panel.php
- * @param $window resource
- *
- * @return resource
- */
-function ncurses_new_panel ($window) {}
-
-define ('NCURSES_COLOR_BLACK', 0);
-define ('NCURSES_COLOR_RED', 1);
-define ('NCURSES_COLOR_GREEN', 2);
-define ('NCURSES_COLOR_YELLOW', 3);
-define ('NCURSES_COLOR_BLUE', 4);
-define ('NCURSES_COLOR_MAGENTA', 5);
-define ('NCURSES_COLOR_CYAN', 6);
-define ('NCURSES_COLOR_WHITE', 7);
-define ('NCURSES_KEY_DOWN', 258);
-define ('NCURSES_KEY_UP', 259);
-define ('NCURSES_KEY_LEFT', 260);
-define ('NCURSES_KEY_RIGHT', 261);
-define ('NCURSES_KEY_HOME', 262);
-define ('NCURSES_KEY_END', 360);
-define ('NCURSES_KEY_BACKSPACE', 263);
-define ('NCURSES_KEY_MOUSE', 409);
-define ('NCURSES_KEY_F0', 264);
-define ('NCURSES_KEY_F1', 265);
-define ('NCURSES_KEY_F2', 266);
-define ('NCURSES_KEY_F3', 267);
-define ('NCURSES_KEY_F4', 268);
-define ('NCURSES_KEY_F5', 269);
-define ('NCURSES_KEY_F6', 270);
-define ('NCURSES_KEY_F7', 271);
-define ('NCURSES_KEY_F8', 272);
-define ('NCURSES_KEY_F9', 273);
-define ('NCURSES_KEY_F10', 274);
-define ('NCURSES_KEY_F11', 275);
-define ('NCURSES_KEY_F12', 276);
-define ('NCURSES_KEY_DL', 328);
-define ('NCURSES_KEY_IL', 329);
-define ('NCURSES_KEY_DC', 330);
-define ('NCURSES_KEY_IC', 331);
-define ('NCURSES_KEY_EIC', 332);
-define ('NCURSES_KEY_CLEAR', 333);
-define ('NCURSES_KEY_EOS', 334);
-define ('NCURSES_KEY_EOL', 335);
-define ('NCURSES_KEY_SF', 336);
-define ('NCURSES_KEY_SR', 337);
-define ('NCURSES_KEY_NPAGE', 338);
-define ('NCURSES_KEY_PPAGE', 339);
-define ('NCURSES_KEY_STAB', 340);
-define ('NCURSES_KEY_CTAB', 341);
-define ('NCURSES_KEY_CATAB', 342);
-define ('NCURSES_KEY_ENTER', 343);
-define ('NCURSES_KEY_SRESET', 344);
-define ('NCURSES_KEY_RESET', 345);
-define ('NCURSES_KEY_PRINT', 346);
-define ('NCURSES_KEY_LL', 347);
-define ('NCURSES_KEY_A1', 348);
-define ('NCURSES_KEY_A3', 349);
-define ('NCURSES_KEY_B2', 350);
-define ('NCURSES_KEY_C1', 351);
-define ('NCURSES_KEY_C3', 352);
-define ('NCURSES_KEY_BTAB', 353);
-define ('NCURSES_KEY_BEG', 354);
-define ('NCURSES_KEY_CANCEL', 355);
-define ('NCURSES_KEY_CLOSE', 356);
-define ('NCURSES_KEY_COMMAND', 357);
-define ('NCURSES_KEY_COPY', 358);
-define ('NCURSES_KEY_CREATE', 359);
-define ('NCURSES_KEY_EXIT', 361);
-define ('NCURSES_KEY_FIND', 362);
-define ('NCURSES_KEY_HELP', 363);
-define ('NCURSES_KEY_MARK', 364);
-define ('NCURSES_KEY_MESSAGE', 365);
-define ('NCURSES_KEY_MOVE', 366);
-define ('NCURSES_KEY_NEXT', 367);
-define ('NCURSES_KEY_OPEN', 368);
-define ('NCURSES_KEY_OPTIONS', 369);
-define ('NCURSES_KEY_PREVIOUS', 370);
-define ('NCURSES_KEY_REDO', 371);
-define ('NCURSES_KEY_REFERENCE', 372);
-define ('NCURSES_KEY_REFRESH', 373);
-define ('NCURSES_KEY_REPLACE', 374);
-define ('NCURSES_KEY_RESTART', 375);
-define ('NCURSES_KEY_RESUME', 376);
-define ('NCURSES_KEY_SAVE', 377);
-define ('NCURSES_KEY_SBEG', 378);
-define ('NCURSES_KEY_SCANCEL', 379);
-define ('NCURSES_KEY_SCOMMAND', 380);
-define ('NCURSES_KEY_SCOPY', 381);
-define ('NCURSES_KEY_SCREATE', 382);
-define ('NCURSES_KEY_SDC', 383);
-define ('NCURSES_KEY_SDL', 384);
-define ('NCURSES_KEY_SELECT', 385);
-define ('NCURSES_KEY_SEND', 386);
-define ('NCURSES_KEY_SEOL', 387);
-define ('NCURSES_KEY_SEXIT', 388);
-define ('NCURSES_KEY_SFIND', 389);
-define ('NCURSES_KEY_SHELP', 390);
-define ('NCURSES_KEY_SHOME', 391);
-define ('NCURSES_KEY_SIC', 392);
-define ('NCURSES_KEY_SLEFT', 393);
-define ('NCURSES_KEY_SMESSAGE', 394);
-define ('NCURSES_KEY_SMOVE', 395);
-define ('NCURSES_KEY_SNEXT', 396);
-define ('NCURSES_KEY_SOPTIONS', 397);
-define ('NCURSES_KEY_SPREVIOUS', 398);
-define ('NCURSES_KEY_SPRINT', 399);
-define ('NCURSES_KEY_SREDO', 400);
-define ('NCURSES_KEY_SREPLACE', 401);
-define ('NCURSES_KEY_SRIGHT', 402);
-define ('NCURSES_KEY_SRSUME', 403);
-define ('NCURSES_KEY_SSAVE', 404);
-define ('NCURSES_KEY_SSUSPEND', 405);
-define ('NCURSES_KEY_SUNDO', 406);
-define ('NCURSES_KEY_SUSPEND', 407);
-define ('NCURSES_KEY_UNDO', 408);
-define ('NCURSES_KEY_RESIZE', 410);
-define ('NCURSES_A_NORMAL', 0);
-define ('NCURSES_A_STANDOUT', 65536);
-define ('NCURSES_A_UNDERLINE', 131072);
-define ('NCURSES_A_REVERSE', 262144);
-define ('NCURSES_A_BLINK', 524288);
-define ('NCURSES_A_DIM', 1048576);
-define ('NCURSES_A_BOLD', 2097152);
-define ('NCURSES_A_PROTECT', 16777216);
-define ('NCURSES_A_INVIS', 8388608);
-define ('NCURSES_A_ALTCHARSET', 4194304);
-define ('NCURSES_A_CHARTEXT', 255);
-define ('NCURSES_BUTTON1_PRESSED', 2);
-define ('NCURSES_BUTTON1_RELEASED', 1);
-define ('NCURSES_BUTTON1_CLICKED', 4);
-define ('NCURSES_BUTTON1_DOUBLE_CLICKED', 8);
-define ('NCURSES_BUTTON1_TRIPLE_CLICKED', 16);
-define ('NCURSES_BUTTON2_PRESSED', 128);
-define ('NCURSES_BUTTON2_RELEASED', 64);
-define ('NCURSES_BUTTON2_CLICKED', 256);
-define ('NCURSES_BUTTON2_DOUBLE_CLICKED', 512);
-define ('NCURSES_BUTTON2_TRIPLE_CLICKED', 1024);
-define ('NCURSES_BUTTON3_PRESSED', 8192);
-define ('NCURSES_BUTTON3_RELEASED', 4096);
-define ('NCURSES_BUTTON3_CLICKED', 16384);
-define ('NCURSES_BUTTON3_DOUBLE_CLICKED', 32768);
-define ('NCURSES_BUTTON3_TRIPLE_CLICKED', 65536);
-define ('NCURSES_BUTTON4_PRESSED', 524288);
-define ('NCURSES_BUTTON4_RELEASED', 262144);
-define ('NCURSES_BUTTON4_CLICKED', 1048576);
-define ('NCURSES_BUTTON4_DOUBLE_CLICKED', 2097152);
-define ('NCURSES_BUTTON4_TRIPLE_CLICKED', 4194304);
-define ('NCURSES_BUTTON_SHIFT', 33554432);
-define ('NCURSES_BUTTON_CTRL', 16777216);
-define ('NCURSES_BUTTON_ALT', 67108864);
-define ('NCURSES_ALL_MOUSE_EVENTS', 134217727);
-define ('NCURSES_REPORT_MOUSE_POSITION', 134217728);
+ * @param resource $window
+ *
+ * @return resource
+ */
+function ncurses_new_panel($window) {}
+
+define('NCURSES_COLOR_BLACK', 0);
+define('NCURSES_COLOR_RED', 1);
+define('NCURSES_COLOR_GREEN', 2);
+define('NCURSES_COLOR_YELLOW', 3);
+define('NCURSES_COLOR_BLUE', 4);
+define('NCURSES_COLOR_MAGENTA', 5);
+define('NCURSES_COLOR_CYAN', 6);
+define('NCURSES_COLOR_WHITE', 7);
+define('NCURSES_KEY_DOWN', 258);
+define('NCURSES_KEY_UP', 259);
+define('NCURSES_KEY_LEFT', 260);
+define('NCURSES_KEY_RIGHT', 261);
+define('NCURSES_KEY_HOME', 262);
+define('NCURSES_KEY_END', 360);
+define('NCURSES_KEY_BACKSPACE', 263);
+define('NCURSES_KEY_MOUSE', 409);
+define('NCURSES_KEY_F0', 264);
+define('NCURSES_KEY_F1', 265);
+define('NCURSES_KEY_F2', 266);
+define('NCURSES_KEY_F3', 267);
+define('NCURSES_KEY_F4', 268);
+define('NCURSES_KEY_F5', 269);
+define('NCURSES_KEY_F6', 270);
+define('NCURSES_KEY_F7', 271);
+define('NCURSES_KEY_F8', 272);
+define('NCURSES_KEY_F9', 273);
+define('NCURSES_KEY_F10', 274);
+define('NCURSES_KEY_F11', 275);
+define('NCURSES_KEY_F12', 276);
+define('NCURSES_KEY_DL', 328);
+define('NCURSES_KEY_IL', 329);
+define('NCURSES_KEY_DC', 330);
+define('NCURSES_KEY_IC', 331);
+define('NCURSES_KEY_EIC', 332);
+define('NCURSES_KEY_CLEAR', 333);
+define('NCURSES_KEY_EOS', 334);
+define('NCURSES_KEY_EOL', 335);
+define('NCURSES_KEY_SF', 336);
+define('NCURSES_KEY_SR', 337);
+define('NCURSES_KEY_NPAGE', 338);
+define('NCURSES_KEY_PPAGE', 339);
+define('NCURSES_KEY_STAB', 340);
+define('NCURSES_KEY_CTAB', 341);
+define('NCURSES_KEY_CATAB', 342);
+define('NCURSES_KEY_ENTER', 343);
+define('NCURSES_KEY_SRESET', 344);
+define('NCURSES_KEY_RESET', 345);
+define('NCURSES_KEY_PRINT', 346);
+define('NCURSES_KEY_LL', 347);
+define('NCURSES_KEY_A1', 348);
+define('NCURSES_KEY_A3', 349);
+define('NCURSES_KEY_B2', 350);
+define('NCURSES_KEY_C1', 351);
+define('NCURSES_KEY_C3', 352);
+define('NCURSES_KEY_BTAB', 353);
+define('NCURSES_KEY_BEG', 354);
+define('NCURSES_KEY_CANCEL', 355);
+define('NCURSES_KEY_CLOSE', 356);
+define('NCURSES_KEY_COMMAND', 357);
+define('NCURSES_KEY_COPY', 358);
+define('NCURSES_KEY_CREATE', 359);
+define('NCURSES_KEY_EXIT', 361);
+define('NCURSES_KEY_FIND', 362);
+define('NCURSES_KEY_HELP', 363);
+define('NCURSES_KEY_MARK', 364);
+define('NCURSES_KEY_MESSAGE', 365);
+define('NCURSES_KEY_MOVE', 366);
+define('NCURSES_KEY_NEXT', 367);
+define('NCURSES_KEY_OPEN', 368);
+define('NCURSES_KEY_OPTIONS', 369);
+define('NCURSES_KEY_PREVIOUS', 370);
+define('NCURSES_KEY_REDO', 371);
+define('NCURSES_KEY_REFERENCE', 372);
+define('NCURSES_KEY_REFRESH', 373);
+define('NCURSES_KEY_REPLACE', 374);
+define('NCURSES_KEY_RESTART', 375);
+define('NCURSES_KEY_RESUME', 376);
+define('NCURSES_KEY_SAVE', 377);
+define('NCURSES_KEY_SBEG', 378);
+define('NCURSES_KEY_SCANCEL', 379);
+define('NCURSES_KEY_SCOMMAND', 380);
+define('NCURSES_KEY_SCOPY', 381);
+define('NCURSES_KEY_SCREATE', 382);
+define('NCURSES_KEY_SDC', 383);
+define('NCURSES_KEY_SDL', 384);
+define('NCURSES_KEY_SELECT', 385);
+define('NCURSES_KEY_SEND', 386);
+define('NCURSES_KEY_SEOL', 387);
+define('NCURSES_KEY_SEXIT', 388);
+define('NCURSES_KEY_SFIND', 389);
+define('NCURSES_KEY_SHELP', 390);
+define('NCURSES_KEY_SHOME', 391);
+define('NCURSES_KEY_SIC', 392);
+define('NCURSES_KEY_SLEFT', 393);
+define('NCURSES_KEY_SMESSAGE', 394);
+define('NCURSES_KEY_SMOVE', 395);
+define('NCURSES_KEY_SNEXT', 396);
+define('NCURSES_KEY_SOPTIONS', 397);
+define('NCURSES_KEY_SPREVIOUS', 398);
+define('NCURSES_KEY_SPRINT', 399);
+define('NCURSES_KEY_SREDO', 400);
+define('NCURSES_KEY_SREPLACE', 401);
+define('NCURSES_KEY_SRIGHT', 402);
+define('NCURSES_KEY_SRSUME', 403);
+define('NCURSES_KEY_SSAVE', 404);
+define('NCURSES_KEY_SSUSPEND', 405);
+define('NCURSES_KEY_SUNDO', 406);
+define('NCURSES_KEY_SUSPEND', 407);
+define('NCURSES_KEY_UNDO', 408);
+define('NCURSES_KEY_RESIZE', 410);
+define('NCURSES_A_NORMAL', 0);
+define('NCURSES_A_STANDOUT', 65536);
+define('NCURSES_A_UNDERLINE', 131072);
+define('NCURSES_A_REVERSE', 262144);
+define('NCURSES_A_BLINK', 524288);
+define('NCURSES_A_DIM', 1048576);
+define('NCURSES_A_BOLD', 2097152);
+define('NCURSES_A_PROTECT', 16777216);
+define('NCURSES_A_INVIS', 8388608);
+define('NCURSES_A_ALTCHARSET', 4194304);
+define('NCURSES_A_CHARTEXT', 255);
+define('NCURSES_BUTTON1_PRESSED', 2);
+define('NCURSES_BUTTON1_RELEASED', 1);
+define('NCURSES_BUTTON1_CLICKED', 4);
+define('NCURSES_BUTTON1_DOUBLE_CLICKED', 8);
+define('NCURSES_BUTTON1_TRIPLE_CLICKED', 16);
+define('NCURSES_BUTTON2_PRESSED', 128);
+define('NCURSES_BUTTON2_RELEASED', 64);
+define('NCURSES_BUTTON2_CLICKED', 256);
+define('NCURSES_BUTTON2_DOUBLE_CLICKED', 512);
+define('NCURSES_BUTTON2_TRIPLE_CLICKED', 1024);
+define('NCURSES_BUTTON3_PRESSED', 8192);
+define('NCURSES_BUTTON3_RELEASED', 4096);
+define('NCURSES_BUTTON3_CLICKED', 16384);
+define('NCURSES_BUTTON3_DOUBLE_CLICKED', 32768);
+define('NCURSES_BUTTON3_TRIPLE_CLICKED', 65536);
+define('NCURSES_BUTTON4_PRESSED', 524288);
+define('NCURSES_BUTTON4_RELEASED', 262144);
+define('NCURSES_BUTTON4_CLICKED', 1048576);
+define('NCURSES_BUTTON4_DOUBLE_CLICKED', 2097152);
+define('NCURSES_BUTTON4_TRIPLE_CLICKED', 4194304);
+define('NCURSES_BUTTON_SHIFT', 33554432);
+define('NCURSES_BUTTON_CTRL', 16777216);
+define('NCURSES_BUTTON_ALT', 67108864);
+define('NCURSES_ALL_MOUSE_EVENTS', 134217727);
+define('NCURSES_REPORT_MOUSE_POSITION', 134217728);
// End of ncurses v.
-?>
diff --git a/newrelic/newrelic.php b/newrelic/newrelic.php
index 85d2f9536..f9be8700d 100644
--- a/newrelic/newrelic.php
+++ b/newrelic/newrelic.php
@@ -1,453 +1,648 @@
tag.
+ * If includeTags omitted or set to true, the returned JavaScript string will be enclosed in a "script"-tag.
*
- * @link https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-api#api-rum-footer
+ * @link https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_get_browser_timing_footer/
*
* @param bool $includeTags [optional]
*
* @return string
*/
-function newrelic_get_browser_timing_footer ($includeTags = true) {}
+function newrelic_get_browser_timing_footer(bool $includeTags = true): string {}
/**
- * Returns the JavaScript string to inject as part of the header for page load timing (sometimes referred to as real
- * user monitoring or RUM).
+ * Returns a browser monitoring snippet to inject in the head of your HTML output.
*
- * If includeTags are omitted or set to true, the returned JavaScript string will be enclosed in a